Skip to content

Commit 8c70e68

Browse files
committed
AC-4529:AdminCreateSwatchAttributeWithSpecialCharactersTest
1 parent ab91392 commit 8c70e68

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

app/code/Magento/Catalog/Test/Mftf/Section/AdminCreateProductAttributeSection/AttributeManageSwatchSection.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@
1010
<section name="AttributeManageSwatchSection">
1111
<element name="swatchField" type="input" selector="//th[contains(@class, 'col-swatch')]/span[contains(text(), '{{arg}}')]/ancestor::thead/following-sibling::tbody//input[@placeholder='Swatch']" parameterized="true"/>
1212
<element name="descriptionField" type="input" selector="//th[contains(@class, 'col-swatch')]/span[contains(text(), '{{arg}}')]/ancestor::thead/following-sibling::tbody//input[@placeholder='Description']" parameterized="true"/>
13+
<element name="swatchField1" type="input" selector="(//th[contains(@class, 'col-swatch')]/span[contains(text(), '{{arg}}')]/ancestor::thead/following-sibling::tbody//input[@placeholder='Swatch'])[2]" parameterized="true"/>
14+
<element name="descriptionField1" type="input" selector="(//th[contains(@class, 'col-swatch')]/span[contains(text(), '{{arg}}')]/ancestor::thead/following-sibling::tbody//input[@placeholder='Description'])[2]" parameterized="true"/>
15+
<element name="swatchField2" type="input" selector="(//th[contains(@class, 'col-swatch')]/span[contains(text(), '{{arg}}')]/ancestor::thead/following-sibling::tbody//input[@placeholder='Swatch'])[3]" parameterized="true"/>
16+
<element name="descriptionField2" type="input" selector="(//th[contains(@class, 'col-swatch')]/span[contains(text(), '{{arg}}')]/ancestor::thead/following-sibling::tbody//input[@placeholder='Description'])[3]" parameterized="true"/>
1317
</section>
1418
</sections>

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
<actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="goToEditPage">
4242
<argument name="ProductAttribute" value="test_label"/>
4343
</actionGroup>
44-
<!-- Grab a value from the page using any grab action -->
45-
<grabTextFrom selector="//*[@id='attribute_label']" stepKey="stepKeyOfGrab"/>
46-
<!-- Ensure that the value we grabbed matches our expectation -->
47-
<assertEquals message="This is an optional human readable hint that will be shown in the logs if this assert fails." stepKey="assertEquals1">
48-
<expectedResult type="string">test_label</expectedResult>
49-
<actualResult type="string">test_label</actualResult>
50-
</assertEquals>
44+
<!-- Check that Swatch and Description fields for Admin are not empty-->
45+
<assertNotEmpty stepKey="checkSwatchFieldForAdmin">
46+
<actualResult type="const">$grabSwatchForAdmin</actualResult>
47+
</assertNotEmpty>
48+
<assertNotEmpty stepKey="checkDescriptionFieldForAdmin">
49+
<actualResult type="const">$grabDescriptionForAdmin</actualResult>
50+
</assertNotEmpty>
5151
</test>
5252
</tests>
5353

0 commit comments

Comments
 (0)