diff --git a/test/integration/blocks.test.js b/test/integration/blocks.test.js index e896e239b163391d1f4983e4a67039dedd876e86..7f034c7dd8501023a9193ae0a7a2d0ec5c589082 100644 --- a/test/integration/blocks.test.js +++ b/test/integration/blocks.test.js @@ -182,7 +182,8 @@ describe('Working with the blocks', () => { // Rename the costume await clickText('Costumes'); - const el = await findByXpath("//input[@value='costume1']"); + await clickText('costume2', scope.costumesTab); + const el = await findByXpath("//input[@value='costume2']"); await el.sendKeys('newname'); // Make sure it is updated in the block menu @@ -197,7 +198,8 @@ describe('Working with the blocks', () => { // Rename the costume await clickText('Costumes'); - const el = await findByXpath("//input[@value='costume1']"); + await clickText('costume2', scope.costumesTab); + const el = await findByXpath("//input[@value='costume2']"); await el.sendKeys('<NewCostume>'); // Make sure it is updated in the block menu @@ -209,9 +211,7 @@ describe('Working with the blocks', () => { await clickText('Sound', scope.blocksTab); }); - // NOTE: This test describes the current behavior so that changes are not - // introduced inadvertly, but I know this is not the desired behavior - test('Adding costumes DOES NOT update the default costume name in the toolbox', async () => { + test('Adding costumes DOES update the default costume name in the toolbox', async () => { await loadUri(uri); // By default, costume1 is in the costume tab @@ -219,7 +219,7 @@ describe('Working with the blocks', () => { await driver.sleep(500); // Wait for scroll to finish await clickText('costume1', scope.blocksTab); - // Also check that adding a new costume does not update the list + // Also check that adding a new costume does update the list await clickText('Costumes'); const el = await findByXpath('//button[@aria-label="Choose a Costume"]'); await driver.actions().mouseMove(el) @@ -227,14 +227,12 @@ describe('Working with the blocks', () => { await driver.sleep(500); // Wait for thermometer menu to come up await clickXpath('//button[@aria-label="Paint"]'); await clickText('costume3', scope.costumesTab); - // Check that the menu has not been updated + // Check that the menu has been updated await clickText('Code'); - await clickText('costume1', scope.blocksTab); + await clickText('costume3', scope.blocksTab); }); - // NOTE: This test describes the current behavior so that changes are not - // introduced inadvertly, but I know this is not the desired behavior - test('Adding a sound DOES NOT update the default sound name in the toolbox', async () => { + test('Adding a sound DOES update the default sound name in the toolbox', async () => { await loadUri(uri); await clickText('Sounds'); await clickXpath('//button[@aria-label="Choose a Sound"]'); @@ -242,7 +240,7 @@ describe('Working with the blocks', () => { await clickText('Code'); await clickText('Sound', scope.blocksTab); await driver.sleep(500); // Wait for scroll to finish - await clickText('Meow', scope.blocksTab); // Meow, not A Bass + await clickText('A Bass', scope.blocksTab); }); // Regression test for switching between editor/player causing toolbox to stop updating