Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 536a796

Browse files
committed
MC-191: Admin should be able to remove Product Images assigned as Base, Small and Thumbnail from Simple Product
- Make image size selectors more robust and not dependent on nth index
1 parent 26cbef3 commit 536a796

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductImagesSection.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222

2323
<element name="altText" type="textarea" selector="textarea[data-role='image-description']"/>
2424

25-
<element name="roleBase" type="button" selector="div.field-image-role ul li:nth-of-type(1) label"/>
26-
<element name="roleSmall" type="button" selector="div.field-image-role ul li:nth-of-type(2) label"/>
27-
<element name="roleThumbnail" type="button" selector="div.field-image-role ul li:nth-of-type(3) label"/>
28-
<element name="roleSwatch" type="button" selector="div.field-image-role ul li:nth-of-type(4) label"/>
25+
<element name="roleBase" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li/label[normalize-space(.) = 'Base']"/>
26+
<element name="roleSmall" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li/label[normalize-space(.) = 'Small']"/>
27+
<element name="roleThumbnail" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li/label[normalize-space(.) = 'Thumbnail']"/>
28+
<element name="roleSwatch" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li/label[normalize-space(.) = 'Swatch']"/>
2929

30-
<element name="isBaseSelected" type="button" selector="div.field-image-role ul li.selected:nth-of-type(1)"/>
31-
<element name="isSmallSelected" type="button" selector="div.field-image-role ul li.selected:nth-of-type(2)"/>
32-
<element name="isThumbnailSelected" type="button" selector="div.field-image-role ul li.selected:nth-of-type(3)"/>
33-
<element name="isSwatchSelected" type="button" selector="div.field-image-role ul li.selected:nth-of-type(4)"/>
30+
<element name="isBaseSelected" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li[contains(@class, 'selected')]/label[normalize-space(.) = 'Base']"/>
31+
<element name="isSmallSelected" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li[contains(@class, 'selected')]/label[normalize-space(.) = 'Small']"/>
32+
<element name="isThumbnailSelected" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li[contains(@class, 'selected')]/label[normalize-space(.) = 'Thumbnail']"/>
33+
<element name="isSwatchSelected" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li[contains(@class, 'selected')]/label[normalize-space(.) = 'Swatch']"/>
3434
</section>
3535
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminSimpleProductImagesTest.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,6 @@
172172
<description value="Admin should be able to remove Product Images assigned as Base, Small and Thumbnail from Simple Product"/>
173173
<severity value="CRITICAL"/>
174174
<testCaseId value="MC-191"/>
175-
<!-- skipped due to MAGETWO-92996 -->
176-
<group value="skip"/>
177175
<group value="Catalog"/>
178176
</annotations>
179177

0 commit comments

Comments
 (0)