77import * as chai from 'chai' ;
88import * as Blockly from 'blockly' ;
99import {
10- setCurrentCursorNodeById ,
10+ focusOnBlock ,
1111 testSetup ,
1212 testFileLocations ,
1313 PAUSE_TIME ,
5151
5252 test ( 'M for move mode enables keyboard mode' , async function ( ) {
5353 await focusWorkspace ( this . browser ) ;
54- await setCurrentCursorNodeById ( this . browser , 'controls_if_2' ) ;
54+ await focusOnBlock ( this . browser , 'controls_if_2' ) ;
5555 await this . browser . pause ( PAUSE_TIME ) ;
5656 await this . browser . keys ( 'm' ) ;
5757
6969
7070 test ( 'X to disconnect enables keyboard mode' , async function ( ) {
7171 await focusWorkspace ( this . browser ) ;
72- await setCurrentCursorNodeById ( this . browser , 'controls_if_2' ) ;
72+ await focusOnBlock ( this . browser , 'controls_if_2' ) ;
7373 await this . browser . pause ( PAUSE_TIME ) ;
7474 await this . browser . keys ( 'x' ) ;
7575 await this . browser . pause ( PAUSE_TIME ) ;
8181 await focusWorkspace ( this . browser ) ;
8282
8383 // Make sure we're on a copyable block so that copy occurs
84- await setCurrentCursorNodeById ( this . browser , 'controls_if_2' ) ;
84+ await focusOnBlock ( this . browser , 'controls_if_2' ) ;
8585 await this . browser . pause ( PAUSE_TIME ) ;
8686 await this . browser . keys ( Key . Ctrl ) ;
8787 await this . browser . keys ( 'c' ) ;
@@ -107,7 +107,7 @@ suite(
107107 await focusWorkspace ( this . browser ) ;
108108
109109 // Make sure we're on a deletable block so that delete occurs
110- await setCurrentCursorNodeById ( this . browser , 'controls_if_2' ) ;
110+ await focusOnBlock ( this . browser , 'controls_if_2' ) ;
111111 await this . browser . pause ( PAUSE_TIME ) ;
112112 await this . browser . keys ( Key . Backspace ) ;
113113 await this . browser . pause ( PAUSE_TIME ) ;
@@ -119,7 +119,7 @@ suite(
119119 } ) ;
120120
121121 // Focus a different deletable block
122- await setCurrentCursorNodeById ( this . browser , 'controls_if_1' ) ;
122+ await focusOnBlock ( this . browser , 'controls_if_1' ) ;
123123 await this . browser . pause ( PAUSE_TIME ) ;
124124 await this . browser . keys ( Key . Backspace ) ;
125125 await this . browser . pause ( PAUSE_TIME ) ;
0 commit comments