@@ -13,6 +13,7 @@ const {
13
13
getLogs,
14
14
Key,
15
15
loadUri,
16
+ notExistsByXpath,
16
17
rightClickText,
17
18
scope
18
19
} = new SeleniumHelper ( ) ;
@@ -35,6 +36,7 @@ describe('Working with the blocks', () => {
35
36
36
37
test ( 'Blocks report when clicked in the toolbox' , async ( ) => {
37
38
await loadUri ( uri ) ;
39
+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
38
40
await clickText ( 'Code' ) ;
39
41
await clickBlocksCategory ( 'Operators' ) ;
40
42
await clickText ( 'join' , scope . blocksTab ) ; // Click "join <hello> <world>" block
@@ -45,6 +47,7 @@ describe('Working with the blocks', () => {
45
47
46
48
test ( 'Switching sprites updates the block menus' , async ( ) => {
47
49
await loadUri ( uri ) ;
50
+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
48
51
await clickBlocksCategory ( 'Sound' ) ;
49
52
// "Meow" sound block should be visible
50
53
await findByText ( 'Meow' , scope . blocksTab ) ;
@@ -60,6 +63,7 @@ describe('Working with the blocks', () => {
60
63
61
64
test ( 'Creating variables' , async ( ) => {
62
65
await loadUri ( uri ) ;
66
+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
63
67
await clickText ( 'Code' ) ;
64
68
await clickBlocksCategory ( 'Variables' ) ;
65
69
@@ -107,6 +111,7 @@ describe('Working with the blocks', () => {
107
111
108
112
test ( 'Creating a list' , async ( ) => {
109
113
await loadUri ( uri ) ;
114
+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
110
115
await clickText ( 'Code' ) ;
111
116
await clickBlocksCategory ( 'Variables' ) ;
112
117
@@ -147,6 +152,7 @@ describe('Working with the blocks', () => {
147
152
148
153
test ( 'Custom procedures' , async ( ) => {
149
154
await loadUri ( uri ) ;
155
+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
150
156
await clickBlocksCategory ( 'My Blocks' ) ;
151
157
await clickText ( 'Make a Block' ) ;
152
158
// Click on the "add an input" buttons
@@ -164,6 +170,7 @@ describe('Working with the blocks', () => {
164
170
165
171
test ( 'Adding an extension' , async ( ) => {
166
172
await loadUri ( uri ) ;
173
+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
167
174
await clickXpath ( '//button[@title="Add Extension"]' ) ;
168
175
169
176
await clickText ( 'Pen' ) ;
@@ -177,6 +184,7 @@ describe('Working with the blocks', () => {
177
184
178
185
test ( 'Record option from sound block menu opens sound recorder' , async ( ) => {
179
186
await loadUri ( uri ) ;
187
+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
180
188
await clickText ( 'Code' ) ;
181
189
await clickBlocksCategory ( 'Sound' ) ;
182
190
await clickText ( 'Meow' , scope . blocksTab ) ; // Click "play sound <Meow> until done" block
@@ -192,6 +200,7 @@ describe('Working with the blocks', () => {
192
200
193
201
test ( 'Renaming costume changes the default costume name in the toolbox' , async ( ) => {
194
202
await loadUri ( uri ) ;
203
+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
195
204
196
205
// Rename the costume
197
206
await clickText ( 'Costumes' ) ;
@@ -209,8 +218,9 @@ describe('Working with the blocks', () => {
209
218
await clickText ( 'newname' , scope . blocksTab ) ;
210
219
} ) ;
211
220
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 ( ) => {
213
222
await loadUri ( uri ) ;
223
+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
214
224
215
225
// Rename the costume
216
226
await clickText ( 'Costumes' ) ;
@@ -232,6 +242,7 @@ describe('Working with the blocks', () => {
232
242
233
243
test ( 'Adding costumes DOES update the default costume name in the toolbox' , async ( ) => {
234
244
await loadUri ( uri ) ;
245
+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
235
246
236
247
// By default, costume2 is in the costume tab
237
248
await clickBlocksCategory ( 'Looks' ) ;
@@ -256,6 +267,7 @@ describe('Working with the blocks', () => {
256
267
// Skipped because it was flakey on travis, but seems to run locally ok
257
268
test ( 'Adding a sound DOES update the default sound name in the toolbox' , async ( ) => {
258
269
await loadUri ( uri ) ;
270
+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
259
271
await clickText ( 'Sounds' ) ;
260
272
await clickXpath ( '//button[@aria-label="Choose a Sound"]' ) ;
261
273
await clickText ( 'A Bass' , scope . modal ) ; // Should close the modal
@@ -271,6 +283,7 @@ describe('Working with the blocks', () => {
271
283
test ( '"See inside" after being on project page re-initializing variables' , async ( ) => {
272
284
const playerUri = path . resolve ( __dirname , '../../build/player.html' ) ;
273
285
await loadUri ( playerUri ) ;
286
+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
274
287
await clickText ( 'See inside' ) ;
275
288
await clickBlocksCategory ( 'Variables' ) ;
276
289
await clickText ( 'my\u00A0variable' ) ;
@@ -285,6 +298,7 @@ describe('Working with the blocks', () => {
285
298
// Regression test for switching editor tabs causing toolbox to stop updating
286
299
test ( 'Creating variables after adding extensions updates the toolbox' , async ( ) => {
287
300
await loadUri ( uri ) ;
301
+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
288
302
await clickText ( 'Costumes' ) ;
289
303
await clickText ( 'Code' ) ;
290
304
await clickBlocksCategory ( 'Variables' ) ;
@@ -300,6 +314,7 @@ describe('Working with the blocks', () => {
300
314
const changeVariableByScope = "*[@data-id='data_changevariableby']" ;
301
315
302
316
await loadUri ( uri ) ;
317
+ await notExistsByXpath ( '//*[div[contains(@class, "loader_background")]]' ) ;
303
318
304
319
await clickText ( 'Code' ) ;
305
320
await clickBlocksCategory ( 'Variables' ) ;
0 commit comments