@@ -619,7 +619,8 @@ suite(`Statement expression unconstrained move tests`, function () {
619619 * Expected connection candidates when moving STATEMENT_SIMPLE, after
620620 * pressing ArrowRight n times.
621621 */
622- const EXPECTED_STATEMENT_SIMPLE_RIGHT = EXPECTED_STATEMENT_SIMPLE_LEFT . concat ( ) . reverse ( ) ;
622+ const EXPECTED_STATEMENT_SIMPLE_RIGHT =
623+ EXPECTED_STATEMENT_SIMPLE_LEFT . concat ( ) . reverse ( ) ;
623624
624625 /**
625626 * Expected connection candidates when moving STATEMENT_COMPLEX, after
@@ -712,7 +713,10 @@ suite(`Statement expression unconstrained move tests`, function () {
712713 setup ( async function ( ) {
713714 this . browser = await testSetup (
714715 createTestUrl (
715- new URLSearchParams ( { renderer, scenario : 'moveStatementTestBlocks' } ) ,
716+ new URLSearchParams ( {
717+ renderer,
718+ scenario : 'moveStatementTestBlocks' ,
719+ } ) ,
716720 ) ,
717721 this . timeout ( ) ,
718722 ) ;
@@ -1236,9 +1240,10 @@ function getInputCoordinates(
12361240 ( id : string , inputName : string ) => {
12371241 const block = Blockly . getMainWorkspace ( ) . getBlockById ( id ) ;
12381242 if ( ! block ) throw new Error ( 'block not found' ) ;
1239- const blockCoords = block . getRelativeToSurfaceXY ( ) ;
1240- const connection = block . getInput ( inputName ) ! . connection ! ;
1241- // return new Blockly.utils.Coordinate(blockCoords.x + connection.x, blockCoords.y + connection.y);
1243+ const input = block . getInput ( inputName ) ;
1244+ if ( ! input ) throw new Error ( 'input not found' ) ;
1245+ const connection = input . connection ;
1246+ if ( ! connection ) throw new Error ( 'connection not found' ) ;
12421247 return new Blockly . utils . Coordinate ( connection . x , connection . y ) ;
12431248 } ,
12441249 id ,
0 commit comments