Skip to content

Commit dbf1f36

Browse files
committed
ACQE-8941::[MTFT Test] StorefrontConfigurableOptionsThumbImagesTest
- Adding load time for product data on option selection
1 parent 044d35d commit dbf1f36

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertFotoramaImageAvailabilityActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<arguments>
1313
<argument name="fileName" type="string" defaultValue="magento-logo"/>
1414
</arguments>
15-
<seeElement selector="{{StorefrontProductMediaSection.productImageInFotorama(fileName)}}" stepKey="seeActiveImageDefault"/>
15+
<waitForElementVisible selector="{{StorefrontProductMediaSection.productImageInFotorama(fileName)}}" stepKey="waitForImageInFotorama"/>
16+
<seeElement selector="{{StorefrontProductMediaSection.productImageInFotorama(fileName)}}" stepKey="seeImageInFotorama"/>
1617
</actionGroup>
1718
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontConfigurableOptionsThumbImagesTest.xml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
</actionGroup>
108108
<!-- Add images for ChildProduct1 -->
109109
<actionGroup ref="AddProductImageActionGroup" stepKey="addChildProduct1ProductImage">
110-
<argument name="image" value="TestImageNew"/>
110+
<argument name="image" value="ProductImage"/>
111111
</actionGroup>
112112
<actionGroup ref="AddProductImageActionGroup" stepKey="addChildProduct1Magento2">
113113
<argument name="image" value="Magento2"/>
@@ -127,8 +127,8 @@
127127
<argument name="storeViewName" value="'Default Store View'"/>
128128
</actionGroup>
129129
<!-- Add image for ChildProduct2 -->
130-
<actionGroup ref="AddProductImageActionGroup" stepKey="addChildProduct2TestImageNew">
131-
<argument name="image" value="TestImageNew"/>
130+
<actionGroup ref="AddProductImageActionGroup" stepKey="addChildProduct2ProductImage">
131+
<argument name="image" value="ProductImage"/>
132132
</actionGroup>
133133
<!-- Save changes fot ChildProduct2 -->
134134
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveChildProduct2Product"/>
@@ -161,16 +161,18 @@
161161
<argument name="attributeLabel" value="$$createConfigProductAttribute.default_frontend_label$$"/>
162162
<argument name="optionLabel" value="$$getConfigAttributeOption1.label$$"/>
163163
</actionGroup>
164+
<waitForAjaxLoad stepKey="waitForAjaxLoadForOption1"/>
165+
<waitForElementNotVisible selector="{{StorefrontProductMediaSection.gallerySpinner}}" stepKey="waitForGallerySpinnerDisappearForOption1"/>
164166
<!-- Check fotorama thumbnail images (first option selected) -->
167+
<actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeProductImageForFirstOption">
168+
<argument name="fileName" value="{{ProductImage.filename}}"/>
169+
</actionGroup>
165170
<actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeMagento3ForFirstOption">
166171
<argument name="fileName" value="{{Magento3.filename}}"/>
167172
</actionGroup>
168173
<actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeTestImageAdobeForFirstOption">
169174
<argument name="fileName" value="{{TestImageAdobe.filename}}"/>
170175
</actionGroup>
171-
<actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeProductImageForFirstOption">
172-
<argument name="fileName" value="{{TestImageNew.filename}}"/>
173-
</actionGroup>
174176
<!-- Check active fotorama thumbnail image (first option selected) -->
175177
<actionGroup ref="StorefrontAssertActiveProductImageActionGroup" stepKey="seeActiveMagento2ForFirstOption">
176178
<argument name="fileName" value="{{Magento2.filename}}"/>
@@ -180,6 +182,8 @@
180182
<argument name="attributeLabel" value="$$createConfigProductAttribute.default_frontend_label$$"/>
181183
<argument name="optionLabel" value="$$getConfigAttributeOption2.label$$"/>
182184
</actionGroup>
185+
<waitForAjaxLoad stepKey="waitForAjaxLoadForOption2"/>
186+
<waitForElementNotVisible selector="{{StorefrontProductMediaSection.gallerySpinner}}" stepKey="waitForGallerySpinnerDisappearForOption2"/>
183187
<!-- Check fotorama thumbnail images (second option selected) -->
184188
<actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeMagento3ForSecondOption">
185189
<argument name="fileName" value="{{Magento3.filename}}"/>
@@ -188,8 +192,8 @@
188192
<argument name="fileName" value="{{TestImageAdobe.filename}}"/>
189193
</actionGroup>
190194
<!-- Check active fotorama thumbnail image (second option selected) -->
191-
<actionGroup ref="StorefrontAssertActiveProductImageActionGroup" stepKey="seeActiveTestImageNewForSecondOption">
192-
<argument name="fileName" value="{{TestImageNew.filename}}"/>
195+
<actionGroup ref="StorefrontAssertActiveProductImageActionGroup" stepKey="seeActiveProductImageForSecondOption">
196+
<argument name="fileName" value="{{ProductImage.filename}}"/>
193197
</actionGroup>
194198
</test>
195199
</tests>

0 commit comments

Comments
 (0)