Skip to content

Commit 06615ad

Browse files
Manoranjan.PrakashManoranjan.Prakash
authored andcommitted
Stablethon:ACQE-5331 test bug fix
1 parent ca30c47 commit 06615ad

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryMainSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,7 @@
4545
<element name="productAttributeOptionValue" type="button" selector="//div[@id='narrow-by-list']//a[contains(text(), '{{var1}}')]" parameterized="true"/>
4646
<element name="outOfStockProductCategoryPage" type="text" selector="//div[@class='stock unavailable']//span[text()='Out of stock']"/>
4747
<element name="ListedProductAttributes" type="block" selector="//div[@aria-label='{{vs_attribute}}']//div[@aria-label='{{attribute_name}}']" parameterized="true"/>
48+
<element name="uploadedImageLarge" type="text" selector=".products-grid img[src*='/large']"/>
49+
<element name="uploadedImageSmallLarge" type="text" selector=".products-grid img[src*='placeholder/small_image.jpg']"/>
4850
</section>
4951
</sections>

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@
119119

120120
<!-- Go to the category page and see a placeholder image for the second product -->
121121
<amOnPage url="$$category.custom_attributes[url_key]$$.html" stepKey="goToCategoryPage"/>
122-
<seeElement selector=".products-grid img[src*='placeholder/small_image.jpg']" stepKey="seePlaceholder"/>
122+
<waitForElementVisible selector="{{StorefrontCategoryMainSection.uploadedImageSmallLarge}}" stepKey="waitForPlaceholder"/>
123+
<seeElement selector="{{StorefrontCategoryMainSection.uploadedImageSmallLarge}}" stepKey="seePlaceHolder"/>
123124

124125
<!-- Go to the second product edit page -->
125126
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="goToProductIndex2"/>
@@ -153,12 +154,14 @@
153154
<seeElement selector="img.admin__control-thumbnail[src*='/large']" stepKey="seeImgInGrid"/>
154155

155156
<!-- Go to the category page and see the uploaded image -->
156-
<amOnPage url="$$category.custom_attributes[url_key]$$.html" stepKey="goToCategoryPage2"/>
157-
<seeElement selector=".products-grid img[src*='/large']" stepKey="seeUploadedImg"/>
157+
<amOnPage url="$$category.custom_attributes[url_key]$$.html" stepKey="goToStorefrontCategoryPage"/>
158+
<waitForElementVisible selector="{{StorefrontCategoryMainSection.uploadedImageLarge}}" stepKey="waitForUploadedImgOnStorefrontCategoryPage"/>
159+
<seeElement selector="{{StorefrontCategoryMainSection.uploadedImageLarge}}" stepKey="seeUploadedImgOnStorefrontCategoryPage"/>
158160

159161
<!-- Go to the product page and see the uploaded image -->
160-
<amOnPage url="$$secondProduct.custom_attributes[url_key]$$.html" stepKey="goToStorefront2"/>
161-
<waitForPageLoad stepKey="waitForStorefront2"/>
162-
<seeElementInDOM selector="{{StorefrontProductMediaSection.imageFile('large')}}" stepKey="seeLarge2"/>
162+
<amOnPage url="$$secondProduct.custom_attributes[url_key]$$.html" stepKey="goToStorefrontProductPage"/>
163+
<waitForPageLoad stepKey="waitForStorefrontProductPageToLoad"/>
164+
<waitForElementVisible selector="{{StorefrontProductMediaSection.imageFile('large')}}" stepKey="waitForLarge2ImageOnStorefrontProductPage"/>
165+
<seeElementInDOM selector="{{StorefrontProductMediaSection.imageFile('large')}}" stepKey="seeLarge2ImageOnStorefrontProductPage"/>
163166
</test>
164167
</tests>

0 commit comments

Comments
 (0)