Skip to content

Commit 79fe377

Browse files
committed
Update integration tests
1 parent b2dd3ed commit 79fe377

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

test/integration/blocks.test.js

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ describe('Working with the blocks', () => {
182182

183183
// Rename the costume
184184
await clickText('Costumes');
185-
const el = await findByXpath("//input[@value='costume1']");
185+
await clickText('costume2', scope.costumesTab);
186+
const el = await findByXpath("//input[@value='costume2']");
186187
await el.sendKeys('newname');
187188

188189
// Make sure it is updated in the block menu
@@ -197,7 +198,8 @@ describe('Working with the blocks', () => {
197198

198199
// Rename the costume
199200
await clickText('Costumes');
200-
const el = await findByXpath("//input[@value='costume1']");
201+
await clickText('costume2', scope.costumesTab);
202+
const el = await findByXpath("//input[@value='costume2']");
201203
await el.sendKeys('<NewCostume>');
202204

203205
// Make sure it is updated in the block menu
@@ -209,40 +211,36 @@ describe('Working with the blocks', () => {
209211
await clickText('Sound', scope.blocksTab);
210212
});
211213

212-
// NOTE: This test describes the current behavior so that changes are not
213-
// introduced inadvertly, but I know this is not the desired behavior
214-
test('Adding costumes DOES NOT update the default costume name in the toolbox', async () => {
214+
test('Adding costumes DOES update the default costume name in the toolbox', async () => {
215215
await loadUri(uri);
216216

217217
// By default, costume1 is in the costume tab
218218
await clickText('Looks', scope.blocksTab);
219219
await driver.sleep(500); // Wait for scroll to finish
220220
await clickText('costume1', scope.blocksTab);
221221

222-
// Also check that adding a new costume does not update the list
222+
// Also check that adding a new costume does update the list
223223
await clickText('Costumes');
224224
const el = await findByXpath('//button[@aria-label="Choose a Costume"]');
225225
await driver.actions().mouseMove(el)
226226
.perform();
227227
await driver.sleep(500); // Wait for thermometer menu to come up
228228
await clickXpath('//button[@aria-label="Paint"]');
229229
await clickText('costume3', scope.costumesTab);
230-
// Check that the menu has not been updated
230+
// Check that the menu has been updated
231231
await clickText('Code');
232-
await clickText('costume1', scope.blocksTab);
232+
await clickText('costume3', scope.blocksTab);
233233
});
234234

235-
// NOTE: This test describes the current behavior so that changes are not
236-
// introduced inadvertly, but I know this is not the desired behavior
237-
test('Adding a sound DOES NOT update the default sound name in the toolbox', async () => {
235+
test('Adding a sound DOES update the default sound name in the toolbox', async () => {
238236
await loadUri(uri);
239237
await clickText('Sounds');
240238
await clickXpath('//button[@aria-label="Choose a Sound"]');
241239
await clickText('A Bass', scope.modal); // Should close the modal
242240
await clickText('Code');
243241
await clickText('Sound', scope.blocksTab);
244242
await driver.sleep(500); // Wait for scroll to finish
245-
await clickText('Meow', scope.blocksTab); // Meow, not A Bass
243+
await clickText('A Bass', scope.blocksTab);
246244
});
247245

248246
// Regression test for switching between editor/player causing toolbox to stop updating

0 commit comments

Comments
 (0)