Skip to content

Commit 48f600e

Browse files
committed
B2B-2124: [AWS S3] Test Failed to verify thumbnails (2 Tests)
- Adding waits for each thumbnail image
1 parent be4c4e0 commit 48f600e

File tree

2 files changed

+82
-15
lines changed

2 files changed

+82
-15
lines changed

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontGalleryConfigurableProductWithSeveralAttributesPrependMediaTest.xml

Lines changed: 56 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,10 @@
168168
</actionGroup>
169169

170170
<!--CASE 0: Selected options = none; Expected media : C1, C2, C3-->
171-
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="waitForThumbnailsAppearCase0"/>
171+
<comment userInput="BIC workaround" stepKey="waitForThumbnailsAppearCase0"/>
172+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[1]}}" stepKey="waitForFirstThumbnailCase0"/>
173+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[2]}}" stepKey="waitForSecondThumbnailCase0"/>
174+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[3]}}" stepKey="waitForThirdThumbnailCase0"/>
172175
<grabMultiple userInput="src" selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="getListOfThumbnailsCase0"/>
173176
<assertRegExp stepKey="checkPositionInThumbnailForImage1Case0">
174177
<actualResult type="variable">getListOfThumbnailsCase0[0]</actualResult>
@@ -192,7 +195,13 @@
192195

193196
<!--CASE 1: Selected options = F2; Expected media : E1, E2, E3, C1, C2, C3-->
194197
<click selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel($swatchAttributeSecondOption.option[store_labels][0][label]$)}}" stepKey="chooseOptionF2Case1"/>
195-
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="waitForThumbnailsAppearCase1"/>
198+
<waitForPageLoad stepKey="waitForThumbnailsAppearCase1"/>
199+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[1]}}" stepKey="waitForFirstThumbnailCase1"/>
200+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[2]}}" stepKey="waitForSecondThumbnailCase1"/>
201+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[3]}}" stepKey="waitForThirdThumbnailCase1"/>
202+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[4]}}" stepKey="waitForFourthThumbnailCase1"/>
203+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[5]}}" stepKey="waitForFifthThumbnailCase1"/>
204+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[6]}}" stepKey="waitForSixthThumbnailCase1"/>
196205
<grabMultiple userInput="src" selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="getListOfThumbnailsCase1"/>
197206
<assertRegExp stepKey="checkPositionInThumbnailForImage1Case1">
198207
<actualResult type="variable">getListOfThumbnailsCase1[0]</actualResult>
@@ -228,7 +237,13 @@
228237

229238
<!--CASE 2: Selected options = F1; Expected media : D1, D2, D3, C1, C2, C3-->
230239
<click selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel($swatchAttributeFirstOption.option[store_labels][0][label]$)}}" stepKey="chooseOptionF1Case2"/>
231-
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="waitForThumbnailsAppearCase2"/>
240+
<waitForPageLoad stepKey="waitForThumbnailsAppearCase2"/>
241+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[1]}}" stepKey="waitForFirstThumbnailCase2"/>
242+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[2]}}" stepKey="waitForSecondThumbnailCase2"/>
243+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[3]}}" stepKey="waitForThirdThumbnailCase2"/>
244+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[4]}}" stepKey="waitForFourthThumbnailCase2"/>
245+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[5]}}" stepKey="waitForFifthThumbnailCase2"/>
246+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[6]}}" stepKey="waitForSixthThumbnailCase2"/>
232247
<grabMultiple userInput="src" selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="getListOfThumbnailsCase2"/>
233248
<assertRegExp stepKey="checkPositionInThumbnailForImage1Case2">
234249
<actualResult type="variable">getListOfThumbnailsCase2[0]</actualResult>
@@ -264,7 +279,10 @@
264279

265280
<!--CASE 3: Selected options = B2,F1; Expected media : C1, C2, C3-->
266281
<selectOption userInput="$dropdownAttributeSecondOption.option[store_labels][0][label]$" selector="{{StorefrontProductInfoMainSection.attributeSelectByAttributeID($createDropdownAttribute.default_frontend_label$)}}" stepKey="chooseOptionB2Case3"/>
267-
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="waitForThumbnailsAppearCase3"/>
282+
<waitForPageLoad stepKey="waitForThumbnailsAppearCase3"/>
283+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[1]}}" stepKey="waitForFirstThumbnailCase3"/>
284+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[2]}}" stepKey="waitForSecondThumbnailCase3"/>
285+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[3]}}" stepKey="waitForThirdThumbnailCase3"/>
268286
<grabMultiple userInput="src" selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="getListOfThumbnailsCase3"/>
269287
<assertRegExp stepKey="checkPositionInThumbnailForImage1Case3">
270288
<actualResult type="variable">getListOfThumbnailsCase3[0]</actualResult>
@@ -288,7 +306,11 @@
288306

289307
<!--CASE 4: Selected options = B2,F2, Expected media : G1, C1, C2, C3-->
290308
<click selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel($swatchAttributeSecondOption.option[store_labels][0][label]$)}}" stepKey="chooseOptionF2Case4"/>
291-
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="waitForThumbnailsAppearCase4"/>
309+
<waitForPageLoad stepKey="waitForThumbnailsAppearCase4"/>
310+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[1]}}" stepKey="waitForFirstThumbnailCase4"/>
311+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[2]}}" stepKey="waitForSecondThumbnailCase4"/>
312+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[3]}}" stepKey="waitForThirdThumbnailCase4"/>
313+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[4]}}" stepKey="waitForFourthThumbnailCase4"/>
292314
<grabMultiple userInput="src" selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="getListOfThumbnailsCase4"/>
293315
<assertRegExp stepKey="checkPositionInThumbnailForImage1Case4">
294316
<actualResult type="variable">getListOfThumbnailsCase4[0]</actualResult>
@@ -316,7 +338,10 @@
316338

317339
<!--CASE 5: Selected options = B2, Expected media : C1, C2, C3-->
318340
<conditionalClick selector="{{StorefrontProductInfoMainSection.swatchAttributeSelectedOption}}" dependentSelector="{{StorefrontProductInfoMainSection.swatchAttributeSelectedOption}}" visible="true" stepKey="unchooseF2Case5"/>
319-
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="waitForThumbnailsAppearCase5"/>
341+
<waitForPageLoad stepKey="waitForThumbnailsAppearCase5"/>
342+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[1]}}" stepKey="waitForFirstThumbnailCase5"/>
343+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[2]}}" stepKey="waitForSecondThumbnailCase5"/>
344+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[3]}}" stepKey="waitForThirdThumbnailCase5"/>
320345
<grabMultiple userInput="src" selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="getListOfThumbnailsCase5"/>
321346
<assertRegExp stepKey="checkPositionInThumbnailForImage1Case5">
322347
<actualResult type="variable">getListOfThumbnailsCase5[0]</actualResult>
@@ -340,7 +365,13 @@
340365

341366
<!--CASE 6: Selected options = B1, Expected media : D1, D2, D3, C1, C2, C3-->
342367
<selectOption userInput="$dropdownAttributeFirstOption.option[store_labels][0][label]$" selector="{{StorefrontProductInfoMainSection.attributeSelectByAttributeID($createDropdownAttribute.default_frontend_label$)}}" stepKey="chooseOptionB1Case6"/>
343-
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="waitForThumbnailsAppearCase6"/>
368+
<waitForPageLoad stepKey="waitForThumbnailsAppearCase6"/>
369+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[1]}}" stepKey="waitForFirstThumbnailCase6"/>
370+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[2]}}" stepKey="waitForSecondThumbnailCase6"/>
371+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[3]}}" stepKey="waitForThirdThumbnailCase6"/>
372+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[4]}}" stepKey="waitForFourthThumbnailCase6"/>
373+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[5]}}" stepKey="waitForFifthThumbnailCase6"/>
374+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[6]}}" stepKey="waitForSixthThumbnailCase6"/>
344375
<grabMultiple userInput="src" selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="getListOfThumbnailsCase6"/>
345376
<assertRegExp stepKey="checkPositionInThumbnailForImage1Case6">
346377
<actualResult type="variable">getListOfThumbnailsCase6[0]</actualResult>
@@ -376,7 +407,13 @@
376407

377408
<!--CASE 7: Selected options = B1,F2, Expected media : E1, E2, E3, C1, C2, C3-->
378409
<click selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel($swatchAttributeSecondOption.option[store_labels][0][label]$)}}" stepKey="chooseOptionF2Case7"/>
379-
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="waitForThumbnailsAppearCase7"/>
410+
<waitForPageLoad stepKey="waitForThumbnailsAppearCase7"/>
411+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[1]}}" stepKey="waitForFirstThumbnailCase7"/>
412+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[2]}}" stepKey="waitForSecondThumbnailCase7"/>
413+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[3]}}" stepKey="waitForThirdThumbnailCase7"/>
414+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[4]}}" stepKey="waitForFourthThumbnailCase7"/>
415+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[5]}}" stepKey="waitForFifthThumbnailCase7"/>
416+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[6]}}" stepKey="waitForSixthThumbnailCase7"/>
380417
<grabMultiple userInput="src" selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="getListOfThumbnailsCase7"/>
381418
<assertRegExp stepKey="checkPositionInThumbnailForImage1Case7">
382419
<actualResult type="variable">getListOfThumbnailsCase7[0]</actualResult>
@@ -412,7 +449,13 @@
412449

413450
<!--CASE 8: Selected options = B1,F1, Expected media : D1, D2, D3, C1, C2, C3-->
414451
<click selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel($swatchAttributeFirstOption.option[store_labels][0][label]$)}}" stepKey="chooseOptionF1Case8"/>
415-
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="waitForThumbnailsAppearCase8"/>
452+
<waitForPageLoad stepKey="waitForThumbnailsAppearCase8"/>
453+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[1]}}" stepKey="waitForFirstThumbnailCase8"/>
454+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[2]}}" stepKey="waitForSecondThumbnailCase8"/>
455+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[3]}}" stepKey="waitForThirdThumbnailCase8"/>
456+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[4]}}" stepKey="waitForFourthThumbnailCase8"/>
457+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[5]}}" stepKey="waitForFifthThumbnailCase8"/>
458+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[6]}}" stepKey="waitForSixthThumbnailCase8"/>
416459
<grabMultiple userInput="src" selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="getListOfThumbnailsCase8"/>
417460
<assertRegExp stepKey="checkPositionInThumbnailForImage1Case8">
418461
<actualResult type="variable">getListOfThumbnailsCase8[0]</actualResult>
@@ -449,7 +492,10 @@
449492
<!--CASE 9: Selected options = none, Expected media : C1, C2, C3-->
450493
<selectOption userInput="Choose an Option..." selector="{{StorefrontProductInfoMainSection.attributeSelectByAttributeID($createDropdownAttribute.default_frontend_label$)}}" stepKey="unselectB1Case9"/>
451494
<conditionalClick selector="{{StorefrontProductInfoMainSection.swatchAttributeSelectedOption}}" dependentSelector="{{StorefrontProductInfoMainSection.swatchAttributeSelectedOption}}" visible="true" stepKey="unchooseF1Case9"/>
452-
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="waitForThumbnailsAppearCase9"/>
495+
<waitForPageLoad stepKey="waitForThumbnailsAppearCase9"/>
496+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[1]}}" stepKey="waitForFirstThumbnailCase9"/>
497+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[2]}}" stepKey="waitForSecondThumbnailCase9"/>
498+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnailImgByNumber[3]}}" stepKey="waitForThirdThumbnailCase9"/>
453499
<grabMultiple userInput="src" selector="{{StorefrontProductMediaSection.fotoramaAnyMedia}}" stepKey="getListOfThumbnailsCase9"/>
454500
<assertRegExp stepKey="checkPositionInThumbnailForImage1Case9">
455501
<actualResult type="variable">getListOfThumbnailsCase9[0]</actualResult>

0 commit comments

Comments
 (0)