Skip to content

Commit 06ab50c

Browse files
committed
chore(tests): Remove unneeded tabNavigateToWorkspace calls
Any time a tabNavigateToWorkspace call is followed by a call to focusOnBlock the former can be removed with no discernable effect except to make tests run slightly faster and with less flashing of the flyout.
1 parent 563aa5e commit 06ab50c

File tree

4 files changed

+0
-61
lines changed

4 files changed

+0
-61
lines changed

test/webdriverio/test/actions_test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ suite('Menus test', function () {
3131

3232
test('Menu on block', async function () {
3333
// Navigate to draw_circle_1.
34-
await tabNavigateToWorkspace(this.browser);
3534
await focusOnBlock(this.browser, 'draw_circle_1');
3635
await this.browser.pause(PAUSE_TIME);
3736
await sendKeyAndWait(this.browser, [Key.Ctrl, Key.Return]);
@@ -70,7 +69,6 @@ suite('Menus test', function () {
7069

7170
test('Menu on block in the toolbox', async function () {
7271
// Navigate to draw_circle_1.
73-
await tabNavigateToWorkspace(this.browser);
7472
await focusOnBlock(this.browser, 'draw_circle_1');
7573
// Navigate to a toolbox category
7674
await moveToToolboxCategory(this.browser, 'Functions');
@@ -130,7 +128,6 @@ suite('Menus test', function () {
130128

131129
test('Menu on block during drag is not shown', async function () {
132130
// Navigate to draw_circle_1.
133-
await tabNavigateToWorkspace(this.browser);
134131
await focusOnBlock(this.browser, 'draw_circle_1');
135132
// Start moving the block
136133
await sendKeyAndWait(this.browser, 'm');

test/webdriverio/test/basic_test.ts

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ suite('Keyboard navigation on Blocks', function () {
5454
});
5555

5656
test('Down from statement block selects next block across stacks', async function () {
57-
await tabNavigateToWorkspace(this.browser);
58-
await this.browser.pause(PAUSE_TIME);
5957
await focusOnBlock(this.browser, 'p5_canvas_1');
6058
await this.browser.pause(PAUSE_TIME);
6159
await keyDown(this.browser);
@@ -66,8 +64,6 @@ suite('Keyboard navigation on Blocks', function () {
6664
});
6765

6866
test('Up from statement block selects previous block', async function () {
69-
await tabNavigateToWorkspace(this.browser);
70-
await this.browser.pause(PAUSE_TIME);
7167
await focusOnBlock(this.browser, 'simple_circle_1');
7268
await this.browser.pause(PAUSE_TIME);
7369
await keyUp(this.browser);
@@ -78,8 +74,6 @@ suite('Keyboard navigation on Blocks', function () {
7874
});
7975

8076
test('Down from parent block selects first child block', async function () {
81-
await tabNavigateToWorkspace(this.browser);
82-
await this.browser.pause(PAUSE_TIME);
8377
await focusOnBlock(this.browser, 'p5_setup_1');
8478
await this.browser.pause(PAUSE_TIME);
8579
await keyDown(this.browser);
@@ -89,8 +83,6 @@ suite('Keyboard navigation on Blocks', function () {
8983
});
9084

9185
test('Up from child block selects parent block', async function () {
92-
await tabNavigateToWorkspace(this.browser);
93-
await this.browser.pause(PAUSE_TIME);
9486
await focusOnBlock(this.browser, 'p5_canvas_1');
9587
await this.browser.pause(PAUSE_TIME);
9688
await keyUp(this.browser);
@@ -100,8 +92,6 @@ suite('Keyboard navigation on Blocks', function () {
10092
});
10193

10294
test('Right from block selects first field', async function () {
103-
await tabNavigateToWorkspace(this.browser);
104-
await this.browser.pause(PAUSE_TIME);
10595
await focusOnBlock(this.browser, 'p5_canvas_1');
10696
await this.browser.pause(PAUSE_TIME);
10797
await keyRight(this.browser);
@@ -114,8 +104,6 @@ suite('Keyboard navigation on Blocks', function () {
114104
});
115105

116106
test('Right from block selects first inline input', async function () {
117-
await tabNavigateToWorkspace(this.browser);
118-
await this.browser.pause(PAUSE_TIME);
119107
await focusOnBlock(this.browser, 'simple_circle_1');
120108
await this.browser.pause(PAUSE_TIME);
121109
await keyRight(this.browser);
@@ -127,8 +115,6 @@ suite('Keyboard navigation on Blocks', function () {
127115
});
128116

129117
test('Up from inline input selects statement block', async function () {
130-
await tabNavigateToWorkspace(this.browser);
131-
await this.browser.pause(PAUSE_TIME);
132118
await focusOnBlock(this.browser, 'math_number_2');
133119
await this.browser.pause(PAUSE_TIME);
134120
await keyUp(this.browser);
@@ -140,8 +126,6 @@ suite('Keyboard navigation on Blocks', function () {
140126
});
141127

142128
test('Left from first inline input selects block', async function () {
143-
await tabNavigateToWorkspace(this.browser);
144-
await this.browser.pause(PAUSE_TIME);
145129
await focusOnBlock(this.browser, 'math_number_2');
146130
await this.browser.pause(PAUSE_TIME);
147131
await keyLeft(this.browser);
@@ -153,8 +137,6 @@ suite('Keyboard navigation on Blocks', function () {
153137
});
154138

155139
test('Right from first inline input selects second inline input', async function () {
156-
await tabNavigateToWorkspace(this.browser);
157-
await this.browser.pause(PAUSE_TIME);
158140
await focusOnBlock(this.browser, 'math_number_2');
159141
await this.browser.pause(PAUSE_TIME);
160142
await keyRight(this.browser);
@@ -166,8 +148,6 @@ suite('Keyboard navigation on Blocks', function () {
166148
});
167149

168150
test('Left from second inline input selects first inline input', async function () {
169-
await tabNavigateToWorkspace(this.browser);
170-
await this.browser.pause(PAUSE_TIME);
171151
await focusOnBlock(this.browser, 'math_number_3');
172152
await this.browser.pause(PAUSE_TIME);
173153
await keyLeft(this.browser);
@@ -179,8 +159,6 @@ suite('Keyboard navigation on Blocks', function () {
179159
});
180160

181161
test('Right from last inline input selects next block', async function () {
182-
await tabNavigateToWorkspace(this.browser);
183-
await this.browser.pause(PAUSE_TIME);
184162
await focusOnBlock(this.browser, 'colour_picker_1');
185163
await this.browser.pause(PAUSE_TIME);
186164
await keyRight(this.browser);
@@ -191,8 +169,6 @@ suite('Keyboard navigation on Blocks', function () {
191169
});
192170

193171
test('Down from inline input selects next block', async function () {
194-
await tabNavigateToWorkspace(this.browser);
195-
await this.browser.pause(PAUSE_TIME);
196172
await focusOnBlock(this.browser, 'colour_picker_1');
197173
await this.browser.pause(PAUSE_TIME);
198174
await keyDown(this.browser);
@@ -203,8 +179,6 @@ suite('Keyboard navigation on Blocks', function () {
203179
});
204180

205181
test("Down from inline input selects block's child block", async function () {
206-
await tabNavigateToWorkspace(this.browser);
207-
await this.browser.pause(PAUSE_TIME);
208182
await focusOnBlock(this.browser, 'logic_boolean_1');
209183
await this.browser.pause(PAUSE_TIME);
210184
await keyDown(this.browser);
@@ -215,8 +189,6 @@ suite('Keyboard navigation on Blocks', function () {
215189
});
216190

217191
test('Right from text block selects shadow block then field', async function () {
218-
await tabNavigateToWorkspace(this.browser);
219-
await this.browser.pause(PAUSE_TIME);
220192
await focusOnBlock(this.browser, 'text_print_1');
221193
await this.browser.pause(PAUSE_TIME);
222194
await keyRight(this.browser);
@@ -237,8 +209,6 @@ suite('Keyboard navigation on Blocks', function () {
237209
});
238210

239211
test('Losing focus cancels move', async function () {
240-
await tabNavigateToWorkspace(this.browser);
241-
await this.browser.pause(PAUSE_TIME);
242212
await focusOnBlock(this.browser, 'text_print_1');
243213
await sendKeyAndWait(this.browser, 'm');
244214

@@ -260,8 +230,6 @@ suite('Keyboard navigation on Fields', function () {
260230
});
261231

262232
test('Up from first field selects block', async function () {
263-
await tabNavigateToWorkspace(this.browser);
264-
await this.browser.pause(PAUSE_TIME);
265233
await focusOnBlockField(this.browser, 'p5_canvas_1', 'WIDTH');
266234
await this.browser.pause(PAUSE_TIME);
267235
await keyUp(this.browser);
@@ -273,8 +241,6 @@ suite('Keyboard navigation on Fields', function () {
273241
});
274242

275243
test('Left from first field selects block', async function () {
276-
await tabNavigateToWorkspace(this.browser);
277-
await this.browser.pause(PAUSE_TIME);
278244
await focusOnBlockField(this.browser, 'p5_canvas_1', 'WIDTH');
279245
await this.browser.pause(PAUSE_TIME);
280246
await keyLeft(this.browser);
@@ -286,8 +252,6 @@ suite('Keyboard navigation on Fields', function () {
286252
});
287253

288254
test('Right from first field selects second field', async function () {
289-
await tabNavigateToWorkspace(this.browser);
290-
await this.browser.pause(PAUSE_TIME);
291255
await focusOnBlockField(this.browser, 'p5_canvas_1', 'WIDTH');
292256
await this.browser.pause(PAUSE_TIME);
293257
await keyRight(this.browser);
@@ -300,8 +264,6 @@ suite('Keyboard navigation on Fields', function () {
300264
});
301265

302266
test('Left from second field selects first field', async function () {
303-
await tabNavigateToWorkspace(this.browser);
304-
await this.browser.pause(PAUSE_TIME);
305267
await focusOnBlockField(this.browser, 'p5_canvas_1', 'HEIGHT');
306268
await this.browser.pause(PAUSE_TIME);
307269
await keyLeft(this.browser);
@@ -314,8 +276,6 @@ suite('Keyboard navigation on Fields', function () {
314276
});
315277

316278
test('Right from second field selects next block', async function () {
317-
await tabNavigateToWorkspace(this.browser);
318-
await this.browser.pause(PAUSE_TIME);
319279
await focusOnBlockField(this.browser, 'p5_canvas_1', 'HEIGHT');
320280
await this.browser.pause(PAUSE_TIME);
321281
await keyRight(this.browser);
@@ -326,8 +286,6 @@ suite('Keyboard navigation on Fields', function () {
326286
});
327287

328288
test('Down from field selects next block', async function () {
329-
await tabNavigateToWorkspace(this.browser);
330-
await this.browser.pause(PAUSE_TIME);
331289
await focusOnBlockField(this.browser, 'p5_canvas_1', 'WIDTH');
332290
await this.browser.pause(PAUSE_TIME);
333291
await keyDown(this.browser);
@@ -338,8 +296,6 @@ suite('Keyboard navigation on Fields', function () {
338296
});
339297

340298
test("Down from field selects block's child block", async function () {
341-
await tabNavigateToWorkspace(this.browser);
342-
await this.browser.pause(PAUSE_TIME);
343299
await focusOnBlockField(this.browser, 'controls_repeat_1', 'TIMES');
344300
await this.browser.pause(PAUSE_TIME);
345301
await keyDown(this.browser);

test/webdriverio/test/clipboard_test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ suite('Clipboard test', function () {
3434

3535
test('Copy and paste while block selected', async function () {
3636
// Navigate to draw_circle_1.
37-
await tabNavigateToWorkspace(this.browser);
3837
await focusOnBlock(this.browser, 'draw_circle_1');
3938

4039
// Copy and paste
@@ -54,7 +53,6 @@ suite('Clipboard test', function () {
5453

5554
test('Cut and paste while block selected', async function () {
5655
// Navigate to draw_circle_1.
57-
await tabNavigateToWorkspace(this.browser);
5856
await focusOnBlock(this.browser, 'draw_circle_1');
5957
const block = await getBlockElementById(this.browser, 'draw_circle_1');
6058

test/webdriverio/test/delete_test.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ suite('Deleting Blocks', function () {
3232
});
3333

3434
test('Deleting block selects parent block', async function () {
35-
await tabNavigateToWorkspace(this.browser);
36-
await this.browser.pause(PAUSE_TIME);
3735
await focusOnBlock(this.browser, 'controls_if_2');
3836
await this.browser.pause(PAUSE_TIME);
3937

@@ -53,8 +51,6 @@ suite('Deleting Blocks', function () {
5351
});
5452

5553
test('Cutting block selects parent block', async function () {
56-
await tabNavigateToWorkspace(this.browser);
57-
await this.browser.pause(PAUSE_TIME);
5854
await focusOnBlock(this.browser, 'controls_if_2');
5955
await this.browser.pause(PAUSE_TIME);
6056

@@ -74,8 +70,6 @@ suite('Deleting Blocks', function () {
7470
});
7571

7672
test('Deleting block also deletes children and inputs', async function () {
77-
await tabNavigateToWorkspace(this.browser);
78-
await this.browser.pause(PAUSE_TIME);
7973
await focusOnBlock(this.browser, 'controls_if_2');
8074
await this.browser.pause(PAUSE_TIME);
8175

@@ -95,8 +89,6 @@ suite('Deleting Blocks', function () {
9589
});
9690

9791
test('Cutting block also removes children and inputs', async function () {
98-
await tabNavigateToWorkspace(this.browser);
99-
await this.browser.pause(PAUSE_TIME);
10092
await focusOnBlock(this.browser, 'controls_if_2');
10193
await this.browser.pause(PAUSE_TIME);
10294

@@ -116,8 +108,6 @@ suite('Deleting Blocks', function () {
116108
});
117109

118110
test('Deleting inline input selects parent block', async function () {
119-
await tabNavigateToWorkspace(this.browser);
120-
await this.browser.pause(PAUSE_TIME);
121111
await focusOnBlock(this.browser, 'logic_boolean_1');
122112
await this.browser.pause(PAUSE_TIME);
123113

@@ -137,8 +127,6 @@ suite('Deleting Blocks', function () {
137127
});
138128

139129
test('Cutting inline input selects parent block', async function () {
140-
await tabNavigateToWorkspace(this.browser);
141-
await this.browser.pause(PAUSE_TIME);
142130
await focusOnBlock(this.browser, 'logic_boolean_1');
143131
await this.browser.pause(PAUSE_TIME);
144132

0 commit comments

Comments
 (0)