@@ -87,7 +87,6 @@ Scenario('Make sure the magic wand works in a variety of scenarios', async funct
8787
8888 AtImageView . waitForImage ( ) ;
8989 await AtImageView . lookForStage ( ) ;
90- I . executeScript ( waitForImage ) ;
9190
9291 I . say ( 'Making sure magic wand button is present' ) ;
9392 I . seeElement ( '.lsf-toolbar__group button[aria-label="magicwand"]' ) ;
@@ -113,13 +112,13 @@ Scenario('Make sure the magic wand works in a variety of scenarios', async funct
113112 // magic wand pixel colors more robust.
114113 I . say ( 'Ensuring cloud magic wand pixels are correctly filled color' ) ;
115114 await I . executeScript ( setKonvaLayersOpacity , [ 1.0 ] ) ;
116- assertMagicWandPixel ( I , 0 , 0 , false , CLOUD . rgbArray ,
115+ await assertMagicWandPixel ( I , 0 , 0 , false , CLOUD . rgbArray ,
117116 'Far upper left corner should not have magic wand cloud class' ) ;
118- assertMagicWandPixel ( I , 260 , 50 , true , CLOUD . rgbArray ,
117+ await assertMagicWandPixel ( I , 260 , 50 , true , CLOUD . rgbArray ,
119118 'Upper left should have magic wand cloud class' ) ;
120- assertMagicWandPixel ( I , 300 , 620 , true , CLOUD . rgbArray ,
119+ await assertMagicWandPixel ( I , 300 , 620 , true , CLOUD . rgbArray ,
121120 'Lower left should have magic wand cloud class' ) ;
122- assertMagicWandPixel ( I , 675 , 650 , false , CLOUD . rgbArray ,
121+ await assertMagicWandPixel ( I , 675 , 650 , false , CLOUD . rgbArray ,
123122 'Far lower right corner should not have magic wand cloud class' ) ;
124123
125124 // Make sure the region made from this is correct.
@@ -139,17 +138,19 @@ Scenario('Make sure the magic wand works in a variety of scenarios', async funct
139138 // 1, then redo it and ensure its back and our region list is still 1 again.
140139 I . say ( 'Undoing last cloud magic wand and ensuring it worked correctly' ) ;
141140 I . click ( 'button[aria-label="Undo"]' ) ;
142- assertMagicWandPixel ( I , 300 , 620 , false , CLOUD . rgbArray ,
141+ I . wait ( 1 ) ;
142+ await assertMagicWandPixel ( I , 300 , 620 , false , CLOUD . rgbArray ,
143143 'Undone lower left should not have magic wand cloud class anymore' ) ;
144- assertMagicWandPixel ( I , 260 , 50 , true , CLOUD . rgbArray ,
144+ await assertMagicWandPixel ( I , 260 , 50 , true , CLOUD . rgbArray ,
145145 'Upper left should still have magic wand cloud class' ) ;
146146 AtSidebar . seeRegions ( 1 ) ;
147147
148148 I . say ( 'Redoing last cloud magic wand and ensuring it worked correctly' ) ;
149149 I . click ( 'button[aria-label="Redo"]' ) ;
150- assertMagicWandPixel ( I , 300 , 620 , true , CLOUD . rgbArray ,
150+ I . wait ( 1 ) ;
151+ await assertMagicWandPixel ( I , 300 , 620 , true , CLOUD . rgbArray ,
151152 'Redone lower left should have magic wand cloud class again' ) ;
152- assertMagicWandPixel ( I , 260 , 50 , true , CLOUD . rgbArray ,
153+ await assertMagicWandPixel ( I , 260 , 50 , true , CLOUD . rgbArray ,
153154 'Upper left should still have magic wand cloud class' ) ;
154155 AtSidebar . seeRegions ( 1 ) ;
155156
@@ -180,9 +181,9 @@ Scenario('Make sure the magic wand works in a variety of scenarios', async funct
180181
181182 I . say ( 'Ensuring cloud shadow magic wand pixels are correctly filled color' ) ;
182183 await I . executeScript ( setKonvaLayersOpacity , [ 1.0 ] ) ;
183- assertMagicWandPixel ( I , 0 , 0 , false , CLOUDSHADOW . rgbArray ,
184+ await assertMagicWandPixel ( I , 0 , 0 , false , CLOUDSHADOW . rgbArray ,
184185 'Zoomed upper left corner should not have cloud shadow' ) ;
185- assertMagicWandPixel ( I , 350 , 360 , true , CLOUDSHADOW . rgbArray ,
186+ await assertMagicWandPixel ( I , 350 , 360 , true , CLOUDSHADOW . rgbArray ,
186187 'Center area should have magic wand cloud shadow class' ) ;
187188
188189 // Make sure if you have a region selected then change the class the region class changes.
@@ -192,6 +193,6 @@ Scenario('Make sure the magic wand works in a variety of scenarios', async funct
192193 AtSidebar . dontSee ( 'Cloud Shadow' ) ;
193194 AtSidebar . see ( 'Haze' ) ;
194195 await I . executeScript ( setKonvaLayersOpacity , [ 1.0 ] ) ;
195- assertMagicWandPixel ( I , 350 , 360 , true , HAZE . rgbArray ,
196+ await assertMagicWandPixel ( I , 350 , 360 , true , HAZE . rgbArray ,
196197 'Center area should have magic wand haze class' ) ;
197198} ) ;
0 commit comments