Skip to content

Commit ce52f8c

Browse files
committed
B2B-2101: [AWS S3] [B2B only] Test Failed to open image details while image is still loading
- Improving flaky test
1 parent 9b1016b commit ce52f8c

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest/AdminSimpleProductRemoveImagesTest.xml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,11 @@
4949
<actionGroup ref="AdminOpenProductImagesSectionActionGroup" stepKey="expandImages"/>
5050

5151
<!-- Upload and set Base image -->
52-
<attachFile selector="{{AdminProductImagesSection.imageFileUpload}}" userInput="adobe-base.jpg" stepKey="attach1"/>
53-
<waitForPageLoad stepKey="waitForUpload1"/>
52+
<actionGroup ref="AddProductImageActionGroup" stepKey="attach1">
53+
<argument name="image" value="TestImageAdobe"/>
54+
</actionGroup>
55+
<comment userInput="BIC workaround" stepKey="waitForUpload1"/>
56+
<waitForElementVisible selector="{{AdminProductImagesSection.nthProductImage('1')}}" stepKey="waitForOpenImageDetails1"/>
5457
<click selector="{{AdminProductImagesSection.nthProductImage('1')}}" stepKey="openImageDetails1"/>
5558
<waitForPageLoad stepKey="waitForSlideout1"/>
5659
<conditionalClick selector="{{AdminProductImagesSection.roleBase}}" dependentSelector="{{AdminProductImagesSection.isBaseSelected}}" visible="false" stepKey="base1"/>
@@ -61,8 +64,11 @@
6164
<waitForPageLoad stepKey="waitForHide1"/>
6265

6366
<!-- Upload and set Small image -->
64-
<attachFile selector="{{AdminProductImagesSection.imageFileUpload}}" userInput="adobe-small.jpg" stepKey="attach2"/>
65-
<waitForPageLoad stepKey="waitForUpload2"/>
67+
<actionGroup ref="AddProductImageActionGroup" stepKey="attach2">
68+
<argument name="image" value="AdobeSmallImage"/>
69+
</actionGroup>
70+
<comment userInput="BIC workaround" stepKey="waitForUpload2"/>
71+
<waitForElementVisible selector="{{AdminProductImagesSection.nthProductImage('2')}}" stepKey="waitForOpenImageDetails2"/>
6672
<click selector="{{AdminProductImagesSection.nthProductImage('2')}}" stepKey="openImageDetails2"/>
6773
<waitForPageLoad stepKey="waitForSlideout2"/>
6874
<conditionalClick selector="{{AdminProductImagesSection.roleBase}}" dependentSelector="{{AdminProductImagesSection.isBaseSelected}}" visible="true" stepKey="base2"/>
@@ -73,8 +79,11 @@
7379
<waitForPageLoad stepKey="waitForHide2"/>
7480

7581
<!-- Upload and set Thumbnail image -->
76-
<attachFile selector="{{AdminProductImagesSection.imageFileUpload}}" userInput="adobe-thumb.jpg" stepKey="attach3"/>
77-
<waitForPageLoad stepKey="waitForUpload3"/>
82+
<actionGroup ref="AddProductImageActionGroup" stepKey="attach3">
83+
<argument name="image" value="AdobeThumbImage"/>
84+
</actionGroup>
85+
<comment userInput="BIC workaround" stepKey="waitForUpload3"/>
86+
<waitForElementVisible selector="{{AdminProductImagesSection.nthProductImage('3')}}" stepKey="waitForOpenImageDetails3"/>
7887
<click selector="{{AdminProductImagesSection.nthProductImage('3')}}" stepKey="openImageDetails3"/>
7988
<waitForPageLoad stepKey="waitForSlideout3"/>
8089
<conditionalClick selector="{{AdminProductImagesSection.roleBase}}" dependentSelector="{{AdminProductImagesSection.isBaseSelected}}" visible="true" stepKey="base3"/>

0 commit comments

Comments
 (0)