@@ -182,7 +182,8 @@ describe('Working with the blocks', () => {
182
182
183
183
// Rename the costume
184
184
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']" ) ;
186
187
await el . sendKeys ( 'newname' ) ;
187
188
188
189
// Make sure it is updated in the block menu
@@ -197,7 +198,8 @@ describe('Working with the blocks', () => {
197
198
198
199
// Rename the costume
199
200
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']" ) ;
201
203
await el . sendKeys ( '<NewCostume>' ) ;
202
204
203
205
// Make sure it is updated in the block menu
@@ -209,40 +211,36 @@ describe('Working with the blocks', () => {
209
211
await clickText ( 'Sound' , scope . blocksTab ) ;
210
212
} ) ;
211
213
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 ( ) => {
215
215
await loadUri ( uri ) ;
216
216
217
- // By default, costume1 is in the costume tab
217
+ // By default, costume2 is in the costume tab
218
218
await clickText ( 'Looks' , scope . blocksTab ) ;
219
219
await driver . sleep ( 500 ) ; // Wait for scroll to finish
220
- await clickText ( 'costume1 ' , scope . blocksTab ) ;
220
+ await clickText ( 'costume2 ' , scope . blocksTab ) ;
221
221
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
223
223
await clickText ( 'Costumes' ) ;
224
224
const el = await findByXpath ( '//button[@aria-label="Choose a Costume"]' ) ;
225
225
await driver . actions ( ) . mouseMove ( el )
226
226
. perform ( ) ;
227
227
await driver . sleep ( 500 ) ; // Wait for thermometer menu to come up
228
228
await clickXpath ( '//button[@aria-label="Paint"]' ) ;
229
229
await clickText ( 'costume3' , scope . costumesTab ) ;
230
- // Check that the menu has not been updated
230
+ // Check that the menu has been updated
231
231
await clickText ( 'Code' ) ;
232
- await clickText ( 'costume1 ' , scope . blocksTab ) ;
232
+ await clickText ( 'costume3 ' , scope . blocksTab ) ;
233
233
} ) ;
234
234
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 ( ) => {
238
236
await loadUri ( uri ) ;
239
237
await clickText ( 'Sounds' ) ;
240
238
await clickXpath ( '//button[@aria-label="Choose a Sound"]' ) ;
241
239
await clickText ( 'A Bass' , scope . modal ) ; // Should close the modal
242
240
await clickText ( 'Code' ) ;
243
241
await clickText ( 'Sound' , scope . blocksTab ) ;
244
242
await driver . sleep ( 500 ) ; // Wait for scroll to finish
245
- await clickText ( 'Meow ' , scope . blocksTab ) ; // Meow, not A Bass
243
+ await clickText ( 'A\u00A0Bass ' , scope . blocksTab ) ; // Need for block text
246
244
} ) ;
247
245
248
246
// Regression test for switching between editor/player causing toolbox to stop updating
0 commit comments