@@ -49,7 +49,7 @@ suite('Keyboard navigation on Blocks', function () {
4949 await tabNavigateToWorkspace ( this . browser ) ;
5050 await this . browser . pause ( PAUSE_TIME ) ;
5151
52- await keyDown ( this . browser , 14 ) ;
52+ await keyDown ( this . browser , 22 ) ;
5353
5454 chai
5555 . expect ( await getCurrentFocusedBlockId ( this . browser ) )
@@ -59,7 +59,9 @@ suite('Keyboard navigation on Blocks', function () {
5959 test ( 'Down from statement block selects next block across stacks' , async function ( ) {
6060 await focusOnBlock ( this . browser , 'p5_canvas_1' ) ;
6161 await this . browser . pause ( PAUSE_TIME ) ;
62- await keyDown ( this . browser ) ;
62+ // Key down twice; the first down moves to the next connection on the
63+ // selected block.
64+ await keyDown ( this . browser , 2 ) ;
6365
6466 chai
6567 . expect ( await getCurrentFocusedBlockId ( this . browser ) )
@@ -164,7 +166,9 @@ suite('Keyboard navigation on Blocks', function () {
164166 test ( 'Right from last inline input selects next block' , async function ( ) {
165167 await focusOnBlock ( this . browser , 'colour_picker_1' ) ;
166168 await this . browser . pause ( PAUSE_TIME ) ;
167- await keyRight ( this . browser ) ;
169+ // Go right twice; first one selects the next connection on the colour
170+ // picker's parent block.
171+ await keyRight ( this . browser , 2 ) ;
168172
169173 chai
170174 . expect ( await getCurrentFocusedBlockId ( this . browser ) )
@@ -174,7 +178,9 @@ suite('Keyboard navigation on Blocks', function () {
174178 test ( 'Down from inline input selects next block' , async function ( ) {
175179 await focusOnBlock ( this . browser , 'colour_picker_1' ) ;
176180 await this . browser . pause ( PAUSE_TIME ) ;
177- await keyDown ( this . browser ) ;
181+ // Go down twice; first one selects the next connection on the colour
182+ // picker's parent block.
183+ await keyDown ( this . browser , 2 ) ;
178184
179185 chai
180186 . expect ( await getCurrentFocusedBlockId ( this . browser ) )
@@ -204,7 +210,8 @@ suite('Keyboard navigation on Blocks', function () {
204210 . expect ( await getCurrentFocusNodeId ( this . browser ) )
205211 . to . include ( 'text_1_field_' ) ;
206212
207- await keyRight ( this . browser ) ;
213+ // Go right twice; first one selects the next connection on the print block.
214+ await keyRight ( this . browser , 2 ) ;
208215
209216 chai
210217 . expect ( await getCurrentFocusedBlockId ( this . browser ) )
@@ -284,7 +291,9 @@ suite('Keyboard navigation on Fields', function () {
284291 test ( 'Right from second field selects next block' , async function ( ) {
285292 await focusOnBlockField ( this . browser , 'p5_canvas_1' , 'HEIGHT' ) ;
286293 await this . browser . pause ( PAUSE_TIME ) ;
287- await keyRight ( this . browser ) ;
294+ // Go right twice; first one selects the next connection on the create
295+ // canvas block.
296+ await keyRight ( this . browser , 2 ) ;
288297
289298 chai
290299 . expect ( await getCurrentFocusedBlockId ( this . browser ) )
@@ -294,7 +303,9 @@ suite('Keyboard navigation on Fields', function () {
294303 test ( 'Down from field selects next block' , async function ( ) {
295304 await focusOnBlockField ( this . browser , 'p5_canvas_1' , 'WIDTH' ) ;
296305 await this . browser . pause ( PAUSE_TIME ) ;
297- await keyDown ( this . browser ) ;
306+ // Go down twice; first one selects the next connection on the create
307+ // canvas block.
308+ await keyDown ( this . browser , 2 ) ;
298309
299310 chai
300311 . expect ( await getCurrentFocusedBlockId ( this . browser ) )
0 commit comments