Skip to content

Commit ab91392

Browse files
committed
AC-4529:Admin should be able to Create Swatch Attribute with special characters
1 parent 24a2c46 commit ab91392

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminCreateSwatchAttributeWithSpecialCharactersTest">
11+
<annotations>
12+
<features value="Catalog"/>
13+
<stories value="Create Product Attributes"/>
14+
<title value="Admin should be able to Create Swatch Attribute with special characters"/>
15+
<description value="Create Swatch Attribute with special characters"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="AC-4529"/>
18+
<group value="Catalog"/>
19+
</annotations>
20+
<before>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
22+
</before>
23+
<after>
24+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
25+
</after>
26+
<!--Navigate to Product attribute page-->
27+
<actionGroup ref="AdminNavigateToNewProductAttributePageActionGroup" stepKey="navigateToNewProductAttributePage"/>
28+
<fillField userInput="test_label" selector="{{AttributePropertiesSection.DefaultLabel}}" stepKey="fillDefaultLabel"/>
29+
<selectOption selector="{{AttributePropertiesSection.InputType}}" userInput="Text Swatch" stepKey="selectInputType"/>
30+
<click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddSwatch"/>
31+
<waitForAjaxLoad stepKey="waitForAjaxLoad"/>
32+
<!-- Fill Swatch and Description fields for Admin -->
33+
<fillField selector="{{AttributeManageSwatchSection.swatchField('Admin')}}" userInput="test" stepKey="fillSwatchForAdmin"/>
34+
<fillField selector="{{AttributeManageSwatchSection.descriptionField('Admin')}}" userInput="test" stepKey="fillDescriptionForAdmin"/>
35+
<!-- Grab value Swatch and Description fields for Admin -->
36+
<grabValueFrom selector="{{AttributeManageSwatchSection.swatchField('Admin')}}" stepKey="grabSwatchForAdmin"/>
37+
<grabValueFrom selector="{{AttributeManageSwatchSection.descriptionField('Admin')}}" stepKey="grabDescriptionForAdmin"/>
38+
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
39+
<click selector="{{AdminCreateNewProductAttributeSection.saveAttribute}}" stepKey="clickOnSaveAttribute"/>
40+
<waitForPageLoad stepKey="waitForAttributeToSave"/>
41+
<actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="goToEditPage">
42+
<argument name="ProductAttribute" value="test_label"/>
43+
</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>
51+
</test>
52+
</tests>
53+
54+
55+

0 commit comments

Comments
 (0)