@@ -51,6 +51,11 @@ suite('Scrolling into view', function () {
5151 await sendKeyAndWait ( this . browser , [ Key . Alt , Key . ArrowDown ] , 25 ) ;
5252 await sendKeyAndWait ( this . browser , Key . Enter ) ;
5353 // Scroll back up, leaving cursor on the draw block out of the viewport.
54+ const scrollPosition1 = await this . browser . execute ( ( ) => {
55+ const workspace = Blockly . getMainWorkspace ( ) as Blockly . WorkspaceSvg ;
56+ return [ workspace . scrollX , workspace . scrollY ] ;
57+ } ) ;
58+ console . log ( "workspace scroll position before scroll:" , scrollPosition1 ) ;
5459 await this . browser . execute ( ( ) => {
5560 const workspace = Blockly . getMainWorkspace ( ) as Blockly . WorkspaceSvg ;
5661 workspace . scrollBoundsIntoView (
@@ -59,6 +64,11 @@ suite('Scrolling into view', function () {
5964 ) . getBoundingRectangleWithoutChildren ( ) ,
6065 ) ;
6166 } ) ;
67+ const scrollPosition2 = await this . browser . execute ( ( ) => {
68+ const workspace = Blockly . getMainWorkspace ( ) as Blockly . WorkspaceSvg ;
69+ return [ workspace . scrollX , workspace . scrollY ] ;
70+ } ) ;
71+ console . log ( "workspace scroll position after scroll:" , scrollPosition2 ) ;
6272
6373 // Insert and confirm the test block which should be scrolled into view.
6474 await sendKeyAndWait ( this . browser , 't' ) ;
0 commit comments