@@ -11,15 +11,15 @@ import {
1111 testFileLocations ,
1212 PAUSE_TIME ,
1313 tabNavigateForward ,
14- getFocusedBlockType ,
1514 keyDown ,
1615 tabNavigateBackward ,
1716 tabNavigateToWorkspace ,
1817 keyRight ,
1918 getCurrentFocusNodeId ,
19+ getCurrentFocusedBlockId ,
2020} from './test_setup.js' ;
2121
22- suite ( 'Toolbox and flyout test' , function ( ) {
22+ suite . only ( 'Toolbox and flyout test' , function ( ) {
2323 // Clear the workspace and load start blocks
2424 setup ( async function ( ) {
2525 this . browser = await testSetup ( testFileLocations . BASE ) ;
@@ -46,8 +46,8 @@ suite('Toolbox and flyout test', function () {
4646
4747 // The top block of the category should be automatically selected. See:
4848 // https://github.com/google/blockly/issues/8978.
49- const blockType = await getFocusedBlockType ( this . browser ) ;
50- chai . assert . strictEqual ( blockType , 'controls_if ' ) ;
49+ const blockId = await getCurrentFocusedBlockId ( this . browser ) ;
50+ chai . assert . strictEqual ( blockId , 'if_block ' ) ;
5151 } ) ;
5252
5353 test ( 'Tab navigating to toolbox then right arrow key should auto-select first block in flyout' , async function ( ) {
@@ -60,8 +60,8 @@ suite('Toolbox and flyout test', function () {
6060
6161 // The top block of the category should be automatically selected. See:
6262 // https://github.com/google/blockly/issues/8978.
63- const blockType = await getFocusedBlockType ( this . browser ) ;
64- chai . assert . strictEqual ( blockType , 'controls_if ' ) ;
63+ const blockId = await getCurrentFocusedBlockId ( this . browser ) ;
64+ chai . assert . strictEqual ( blockId , 'if_block ' ) ;
6565 } ) ;
6666
6767 test ( 'Keyboard nav to different toolbox category should auto-select first block' , async function ( ) {
@@ -74,8 +74,8 @@ suite('Toolbox and flyout test', function () {
7474 await tabNavigateForward ( this . browser ) ;
7575
7676 // The top block of the category should be automatically selected.
77- const blockType = await getFocusedBlockType ( this . browser ) ;
78- chai . assert . strictEqual ( blockType , 'text ' ) ;
77+ const blockId = await getCurrentFocusedBlockId ( this . browser ) ;
78+ chai . assert . strictEqual ( blockId , 'text_block ' ) ;
7979 } ) ;
8080
8181 test ( 'Keyboard nav to different toolbox category and block should select different block' , async function ( ) {
@@ -90,8 +90,8 @@ suite('Toolbox and flyout test', function () {
9090 await keyDown ( this . browser , 2 ) ;
9191
9292 // A non-top blockshould be manually selected.
93- const blockType = await getFocusedBlockType ( this . browser ) ;
94- chai . assert . strictEqual ( blockType , 'text_append ' ) ;
93+ const blockId = await getCurrentFocusedBlockId ( this . browser ) ;
94+ chai . assert . strictEqual ( blockId , 'append_text_block ' ) ;
9595 } ) ;
9696
9797 test ( 'Tab navigate away from toolbox restores focus to initial element' , async function ( ) {
@@ -196,8 +196,8 @@ suite('Toolbox and flyout test', function () {
196196
197197 // The previously selected block should be retained upon returning. See:
198198 // https://github.com/google/blockly/issues/8965#issuecomment-2900479280.
199- const blockType = await getFocusedBlockType ( this . browser ) ;
200- chai . assert . strictEqual ( blockType , 'p5_draw ' ) ;
199+ const blockId = await getCurrentFocusedBlockId ( this . browser ) ;
200+ chai . assert . strictEqual ( blockId , 'p5_draw_1 ' ) ;
201201 } ) ;
202202
203203 test ( 'Clicking outside Blockly with focused toolbox closes the flyout' , async function ( ) {
0 commit comments