@@ -87,7 +87,6 @@ Scenario('Make sure the magic wand works in a variety of scenarios', async funct
87
87
88
88
AtImageView . waitForImage ( ) ;
89
89
await AtImageView . lookForStage ( ) ;
90
- I . executeScript ( waitForImage ) ;
91
90
92
91
I . say ( 'Making sure magic wand button is present' ) ;
93
92
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
113
112
// magic wand pixel colors more robust.
114
113
I . say ( 'Ensuring cloud magic wand pixels are correctly filled color' ) ;
115
114
await I . executeScript ( setKonvaLayersOpacity , [ 1.0 ] ) ;
116
- assertMagicWandPixel ( I , 0 , 0 , false , CLOUD . rgbArray ,
115
+ await assertMagicWandPixel ( I , 0 , 0 , false , CLOUD . rgbArray ,
117
116
'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 ,
119
118
'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 ,
121
120
'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 ,
123
122
'Far lower right corner should not have magic wand cloud class' ) ;
124
123
125
124
// 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
139
138
// 1, then redo it and ensure its back and our region list is still 1 again.
140
139
I . say ( 'Undoing last cloud magic wand and ensuring it worked correctly' ) ;
141
140
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 ,
143
143
'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 ,
145
145
'Upper left should still have magic wand cloud class' ) ;
146
146
AtSidebar . seeRegions ( 1 ) ;
147
147
148
148
I . say ( 'Redoing last cloud magic wand and ensuring it worked correctly' ) ;
149
149
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 ,
151
152
'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 ,
153
154
'Upper left should still have magic wand cloud class' ) ;
154
155
AtSidebar . seeRegions ( 1 ) ;
155
156
@@ -180,9 +181,9 @@ Scenario('Make sure the magic wand works in a variety of scenarios', async funct
180
181
181
182
I . say ( 'Ensuring cloud shadow magic wand pixels are correctly filled color' ) ;
182
183
await I . executeScript ( setKonvaLayersOpacity , [ 1.0 ] ) ;
183
- assertMagicWandPixel ( I , 0 , 0 , false , CLOUDSHADOW . rgbArray ,
184
+ await assertMagicWandPixel ( I , 0 , 0 , false , CLOUDSHADOW . rgbArray ,
184
185
'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 ,
186
187
'Center area should have magic wand cloud shadow class' ) ;
187
188
188
189
// 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
192
193
AtSidebar . dontSee ( 'Cloud Shadow' ) ;
193
194
AtSidebar . see ( 'Haze' ) ;
194
195
await I . executeScript ( setKonvaLayersOpacity , [ 1.0 ] ) ;
195
- assertMagicWandPixel ( I , 350 , 360 , true , HAZE . rgbArray ,
196
+ await assertMagicWandPixel ( I , 350 , 360 , true , HAZE . rgbArray ,
196
197
'Center area should have magic wand haze class' ) ;
197
198
} ) ;
0 commit comments