@@ -13,6 +13,7 @@ const {
1313 getLogs,
1414 Key,
1515 loadUri,
16+ notExistsByXpath,
1617 rightClickText,
1718 scope
1819} = new SeleniumHelper ( ) ;
@@ -35,6 +36,7 @@ describe('Working with the blocks', () => {
3536
3637 test ( 'Blocks report when clicked in the toolbox' , async ( ) => {
3738 await loadUri ( uri ) ;
39+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
3840 await clickText ( 'Code' ) ;
3941 await clickBlocksCategory ( 'Operators' ) ;
4042 await clickText ( 'join' , scope . blocksTab ) ; // Click "join <hello> <world>" block
@@ -45,6 +47,7 @@ describe('Working with the blocks', () => {
4547
4648 test ( 'Switching sprites updates the block menus' , async ( ) => {
4749 await loadUri ( uri ) ;
50+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
4851 await clickBlocksCategory ( 'Sound' ) ;
4952 // "Meow" sound block should be visible
5053 await findByText ( 'Meow' , scope . blocksTab ) ;
@@ -60,6 +63,7 @@ describe('Working with the blocks', () => {
6063
6164 test ( 'Creating variables' , async ( ) => {
6265 await loadUri ( uri ) ;
66+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
6367 await clickText ( 'Code' ) ;
6468 await clickBlocksCategory ( 'Variables' ) ;
6569
@@ -107,6 +111,7 @@ describe('Working with the blocks', () => {
107111
108112 test ( 'Creating a list' , async ( ) => {
109113 await loadUri ( uri ) ;
114+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
110115 await clickText ( 'Code' ) ;
111116 await clickBlocksCategory ( 'Variables' ) ;
112117
@@ -147,6 +152,7 @@ describe('Working with the blocks', () => {
147152
148153 test ( 'Custom procedures' , async ( ) => {
149154 await loadUri ( uri ) ;
155+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
150156 await clickBlocksCategory ( 'My Blocks' ) ;
151157 await clickText ( 'Make a Block' ) ;
152158 // Click on the "add an input" buttons
@@ -164,6 +170,7 @@ describe('Working with the blocks', () => {
164170
165171 test ( 'Adding an extension' , async ( ) => {
166172 await loadUri ( uri ) ;
173+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
167174 await clickXpath ( '//button[@title="Add Extension"]' ) ;
168175
169176 await clickText ( 'Pen' ) ;
@@ -177,6 +184,7 @@ describe('Working with the blocks', () => {
177184
178185 test ( 'Record option from sound block menu opens sound recorder' , async ( ) => {
179186 await loadUri ( uri ) ;
187+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
180188 await clickText ( 'Code' ) ;
181189 await clickBlocksCategory ( 'Sound' ) ;
182190 await clickText ( 'Meow' , scope . blocksTab ) ; // Click "play sound <Meow> until done" block
@@ -192,6 +200,7 @@ describe('Working with the blocks', () => {
192200
193201 test ( 'Renaming costume changes the default costume name in the toolbox' , async ( ) => {
194202 await loadUri ( uri ) ;
203+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
195204
196205 // Rename the costume
197206 await clickText ( 'Costumes' ) ;
@@ -209,8 +218,9 @@ describe('Working with the blocks', () => {
209218 await clickText ( 'newname' , scope . blocksTab ) ;
210219 } ) ;
211220
212- test . skip ( 'Renaming costume with a special character should not break toolbox' , async ( ) => {
221+ test ( 'Renaming costume with a special character should not break toolbox' , async ( ) => {
213222 await loadUri ( uri ) ;
223+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
214224
215225 // Rename the costume
216226 await clickText ( 'Costumes' ) ;
@@ -232,6 +242,7 @@ describe('Working with the blocks', () => {
232242
233243 test ( 'Adding costumes DOES update the default costume name in the toolbox' , async ( ) => {
234244 await loadUri ( uri ) ;
245+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
235246
236247 // By default, costume2 is in the costume tab
237248 await clickBlocksCategory ( 'Looks' ) ;
@@ -256,6 +267,7 @@ describe('Working with the blocks', () => {
256267 // Skipped because it was flakey on travis, but seems to run locally ok
257268 test ( 'Adding a sound DOES update the default sound name in the toolbox' , async ( ) => {
258269 await loadUri ( uri ) ;
270+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
259271 await clickText ( 'Sounds' ) ;
260272 await clickXpath ( '//button[@aria-label="Choose a Sound"]' ) ;
261273 await clickText ( 'A Bass' , scope . modal ) ; // Should close the modal
@@ -271,6 +283,7 @@ describe('Working with the blocks', () => {
271283 test ( '"See inside" after being on project page re-initializing variables' , async ( ) => {
272284 const playerUri = path . resolve ( __dirname , '../../build/player.html' ) ;
273285 await loadUri ( playerUri ) ;
286+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
274287 await clickText ( 'See inside' ) ;
275288 await clickBlocksCategory ( 'Variables' ) ;
276289 await clickText ( 'my\u00A0variable' ) ;
@@ -285,6 +298,7 @@ describe('Working with the blocks', () => {
285298 // Regression test for switching editor tabs causing toolbox to stop updating
286299 test ( 'Creating variables after adding extensions updates the toolbox' , async ( ) => {
287300 await loadUri ( uri ) ;
301+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
288302 await clickText ( 'Costumes' ) ;
289303 await clickText ( 'Code' ) ;
290304 await clickBlocksCategory ( 'Variables' ) ;
@@ -300,6 +314,7 @@ describe('Working with the blocks', () => {
300314 const changeVariableByScope = "*[@data-id='data_changevariableby']" ;
301315
302316 await loadUri ( uri ) ;
317+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
303318
304319 await clickText ( 'Code' ) ;
305320 await clickBlocksCategory ( 'Variables' ) ;
0 commit comments