Skip to content
Snippets Groups Projects
Commit 79fe377f authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Update integration tests

parent b2dd3ed4
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment