@@ -26,12 +26,12 @@ suite('Procedures', function () {
2626 setup ( function ( ) {
2727 sharedTestSetup . call ( this , { fireEventsNow : false } ) ;
2828 this . workspace = Blockly . inject ( 'blocklyDiv' , { } ) ;
29- this . workspace . createVariable ( 'preCreatedVar' , '' , 'preCreatedVarId' ) ;
30- this . workspace . createVariable (
31- 'preCreatedTypedVar' ,
32- 'type' ,
33- 'preCreatedTypedVarId' ,
34- ) ;
29+ this . workspace
30+ . getVariableMap ( )
31+ . createVariable ( 'preCreatedVar' , '' , 'preCreatedVarId' ) ;
32+ this . workspace
33+ . getVariableMap ( )
34+ . createVariable ( 'preCreatedTypedVar' , 'type' , 'preCreatedTypedVarId' ) ;
3535 defineRowBlock ( ) ;
3636 this . variableMap = this . workspace . getVariableMap ( ) ;
3737 } ) ;
@@ -433,7 +433,7 @@ suite('Procedures', function () {
433433 this . clock . runAll ( ) ;
434434
435435 assert . isNotNull (
436- this . workspace . getVariable ( 'param1' , '' ) ,
436+ this . workspace . getVariableMap ( ) . getVariable ( 'param1' , '' ) ,
437437 'Expected the old variable to continue to exist' ,
438438 ) ;
439439 } ) ;
@@ -453,7 +453,9 @@ suite('Procedures', function () {
453453 this . clock . runAll ( ) ;
454454 mutatorIcon . setBubbleVisible ( false ) ;
455455
456- const variable = this . workspace . getVariable ( 'param1' , '' ) ;
456+ const variable = this . workspace
457+ . getVariableMap ( )
458+ . getVariable ( 'param1' , '' ) ;
457459 this . variableMap . renameVariable ( variable , 'new name' ) ;
458460
459461 assert . isNotNull (
@@ -480,7 +482,9 @@ suite('Procedures', function () {
480482 . connection . connect ( paramBlock . previousConnection ) ;
481483 this . clock . runAll ( ) ;
482484
483- const variable = this . workspace . getVariable ( 'param1' , '' ) ;
485+ const variable = this . workspace
486+ . getVariableMap ( )
487+ . getVariable ( 'param1' , '' ) ;
484488 this . variableMap . renameVariable ( variable , 'new name' ) ;
485489
486490 assert . equal (
@@ -506,7 +510,9 @@ suite('Procedures', function () {
506510 this . clock . runAll ( ) ;
507511 mutatorIcon . setBubbleVisible ( false ) ;
508512
509- const variable = this . workspace . getVariable ( 'param1' , '' ) ;
513+ const variable = this . workspace
514+ . getVariableMap ( )
515+ . getVariable ( 'param1' , '' ) ;
510516 this . variableMap . renameVariable ( variable , 'new name' ) ;
511517
512518 assert . isNotNull (
@@ -535,7 +541,9 @@ suite('Procedures', function () {
535541 this . clock . runAll ( ) ;
536542 mutatorIcon . setBubbleVisible ( false ) ;
537543
538- const variable = this . workspace . getVariable ( 'param1' , '' ) ;
544+ const variable = this . workspace
545+ . getVariableMap ( )
546+ . getVariable ( 'param1' , '' ) ;
539547 this . variableMap . renameVariable ( variable , 'preCreatedVar' ) ;
540548
541549 assert . isNotNull (
@@ -562,7 +570,9 @@ suite('Procedures', function () {
562570 . connection . connect ( paramBlock . previousConnection ) ;
563571 this . clock . runAll ( ) ;
564572
565- const variable = this . workspace . getVariable ( 'param1' , '' ) ;
573+ const variable = this . workspace
574+ . getVariableMap ( )
575+ . getVariable ( 'param1' , '' ) ;
566576 this . variableMap . renameVariable ( variable , 'preCreatedVar' ) ;
567577
568578 assert . equal (
@@ -588,7 +598,9 @@ suite('Procedures', function () {
588598 this . clock . runAll ( ) ;
589599 mutatorIcon . setBubbleVisible ( false ) ;
590600
591- const variable = this . workspace . getVariable ( 'param1' , '' ) ;
601+ const variable = this . workspace
602+ . getVariableMap ( )
603+ . getVariable ( 'param1' , '' ) ;
592604 this . variableMap . renameVariable ( variable , 'preCreatedVar' ) ;
593605
594606 assert . isNotNull (
0 commit comments