Skip to content

Commit 6902aed

Browse files
committed
ACQE-6901: Create Text Swatch from Stores ->Attributes section: Product
Created AGs and updated those in test file
1 parent bb21bec commit 6902aed

File tree

3 files changed

+90
-31
lines changed

3 files changed

+90
-31
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminAddTextSwatchForAdminActionGroup">
12+
<annotations>
13+
<description>Admin add texual swatch for admin.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="position" type="string"/>
17+
<argument name="swatchName" type="string"/>
18+
<argument name="swatchDescription" type="string"/>
19+
20+
</arguments>
21+
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue(position)}}" stepKey="waitForSwatchTextBoxForAdminToVisible"/>
22+
<fillField selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue(position)}}" userInput="{{swatchName}}" stepKey="fillSwatchForAdmin"/>
23+
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue(position)}}" stepKey="waitForDescriptionTextBoxForAdminToVisible"/>
24+
<fillField selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue(position)}}" userInput="{{swatchDescription}}" stepKey="fillDescriptionForAdmin"/>
25+
</actionGroup>
26+
</actionGroups>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminAddTextSwatchForStoreViewActionGroup">
12+
<annotations>
13+
<description>Admin add texual swatch for storeview.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="position" type="string"/>
17+
<argument name="swatchName" type="string"/>
18+
<argument name="swatchDescription" type="string"/>
19+
20+
</arguments>
21+
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue(position)}}" stepKey="waitForSwatchTextBoxForAdminToVisible"/>
22+
<fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue(position)}}" userInput="{{swatchName}}" stepKey="fillSwatchForStoreView"/>
23+
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue(position)}}" stepKey="waitForDescriptionTextBoxForAdminToVisible"/>
24+
<fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue(position)}}" userInput="{{swatchDescription}}" stepKey="fillDescriptionForStoreView"/>
25+
</actionGroup>
26+
</actionGroups>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StoreFrontAdminCreateTextSwatchAttributeAndAssertInStoreFrontTest.xml

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1010
<test name="StoreFrontAdminCreateTextSwatchAttributeAndAssertInStoreFrontTest">
1111
<annotations>
12-
<features value="ConfigurableProduct"/>
13-
<stories value="Create Text Swatch from Stores ->Attributes section: Product"/>
12+
<features value="Configurable Product"/>
13+
<stories value="Create Text Swatch from Stores ->Attributes section: Product and create configurable product"/>
1414
<title value="Create Text Swatch from Stores ->Attributes section: Product"/>
15-
<description value="Admin create product attribute with text swatch and assert them in storefront"/>
15+
<description value="Admin create product attribute with text swatch and create configurable product and assert the created attributes in storefront"/>
1616
<severity value="MAJOR"/>
1717
<testCaseId value="AC-3921"/>
1818
</annotations>
@@ -42,43 +42,50 @@
4242

4343
<waitForElementClickable selector="{{AttributeManageSwatchSection.isDefaultTextSwatch('1')}}" stepKey="waitForDefaultOptionToBecomeClickable"/>
4444
<click selector="{{AttributeManageSwatchSection.isDefaultTextSwatch('1')}}" stepKey="setFirstSizeAsDefault"/>
45-
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue('0')}}" stepKey="waitForTextBoxForSSizeBecomeVisible"/>
46-
<fillField selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue('0')}}" userInput="S" stepKey="fillSwatchForAdmin"/>
47-
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue('0')}}" stepKey="waitForTextBoxForDescriptionForSSizeBecomeVisibleForAdmin"/>
48-
<fillField selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue('0')}}" userInput="Small" stepKey="fillDescriptionForAdmin"/>
49-
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue('0')}}" stepKey="waitForTextBoxForSSizeBecomeVisibleForStoreView"/>
50-
<fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue('0')}}" userInput="S1" stepKey="fillSwatchForStoreView"/>
51-
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue('0')}}" stepKey="waitForTextBoxForDescriptionForSSizeBecomeVisibleForStoreView"/>
52-
<fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue('0')}}" userInput="Small_1" stepKey="fillDescriptionForStoreView"/>
45+
<actionGroup ref="AdminAddTextSwatchForAdminActionGroup" stepKey="addTextSwatchForAdmin">
46+
<argument name="position" value="0"/>
47+
<argument name="swatchName" value="S"/>
48+
<argument name="swatchDescription" value="Small"/>
49+
</actionGroup>
50+
<actionGroup ref="AdminAddTextSwatchForStoreViewActionGroup" stepKey="addTextSwatchForStoreView">
51+
<argument name="position" value="0"/>
52+
<argument name="swatchName" value="S1"/>
53+
<argument name="swatchDescription" value="Small_1"/>
54+
</actionGroup>
5355
<!--Add swatch for Medium-->
5456
<waitForElementClickable selector="{{AttributePropertiesSection.addSwatch}}" stepKey="waitForAddSwatchButtonToBeClickable"/>
5557
<click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddSwatchForMedium"/>
56-
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue('1')}}" stepKey="waitForTextBoxForMSizeBecomeVisible"/>
57-
<fillField selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue('1')}}" userInput="M" stepKey="fillMediumSwatchForAdmin"/>
58-
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue('1')}}" stepKey="waitForTextBoxForDescriptionForMSizeBecomeVisibleForAdmin"/>
59-
<fillField selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue('1')}}" userInput="Medium" stepKey="fillDescriptionForMediumForAdmin"/>
60-
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue('1')}}" stepKey="waitForTextBoxForMSizeBecomeVisibleForStoreView"/>
61-
<fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue('1')}}" userInput="M2" stepKey="fillMediumSwatchForStoreView"/>
62-
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue('1')}}" stepKey="waitForTextBoxForDescriptionForMSizeBecomeVisibleForStoreView"/>
63-
<fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue('1')}}" userInput="Medium_2" stepKey="fillDescriptionForMediumForStoreView"/>
58+
<actionGroup ref="AdminAddTextSwatchForAdminActionGroup" stepKey="addTextSwatchForMSizeInAdmin">
59+
<argument name="position" value="1"/>
60+
<argument name="swatchName" value="M"/>
61+
<argument name="swatchDescription" value="Medium"/>
62+
</actionGroup>
63+
<actionGroup ref="AdminAddTextSwatchForStoreViewActionGroup" stepKey="addTextSwatchForMSizeInStoreView">
64+
<argument name="position" value="1"/>
65+
<argument name="swatchName" value="M2"/>
66+
<argument name="swatchDescription" value="Medium_2"/>
67+
</actionGroup>
6468
<!--Add swatch for Large-->
6569
<waitForElementClickable selector="{{AttributePropertiesSection.addSwatch}}" stepKey="waitForAddSwatchButtonForLargeToBeClickable"/>
6670
<click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddSwatchForLarge"/>
67-
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue('2')}}" stepKey="waitForTextBoxForLargeSizeBecomeVisible"/>
68-
<fillField selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue('2')}}" userInput="L" stepKey="fillLargeSwatchForAdmin"/>
69-
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue('2')}}" stepKey="waitForTextBoxForDescriptionForLargeSizeBecomeVisibleForAdmin"/>
70-
<fillField selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue('2')}}" userInput="Large" stepKey="fillDescriptionForLargeForAdmin"/>
71-
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue('2')}}" stepKey="waitForTextBoxForLargeSizeBecomeVisibleForStoreView"/>
72-
<fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue('2')}}" userInput="L3" stepKey="fillLargeSwatchForStoreView"/>
73-
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue('2')}}" stepKey="waitForTextBoxForDescriptionForLargeSizeBecomeVisibleForStoreView"/>
74-
<fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue('2')}}" userInput="Large_3" stepKey="fillDescriptionForLargeForStoreView"/>
71+
<actionGroup ref="AdminAddTextSwatchForAdminActionGroup" stepKey="addTextSwatchForLSizeInAdmin">
72+
<argument name="position" value="2"/>
73+
<argument name="swatchName" value="L"/>
74+
<argument name="swatchDescription" value="Large"/>
75+
</actionGroup>
76+
<actionGroup ref="AdminAddTextSwatchForStoreViewActionGroup" stepKey="addTextSwatchForLSizeInStoreView">
77+
<argument name="position" value="3"/>
78+
<argument name="swatchName" value="L3"/>
79+
<argument name="swatchDescription" value="Large_3"/>
80+
</actionGroup>
7581
<!--Add swatch for Extra Large-->
7682
<waitForElementClickable selector="{{AttributePropertiesSection.addSwatch}}" stepKey="waitForAddSwatchButtonForExtarLargeToBeClickable"/>
7783
<click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddSwatchForExtraLarge"/>
78-
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue('3')}}" stepKey="waitForTextBoxForExtraLargeSizeBecomeVisible"/>
79-
<fillField selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue('3')}}" userInput="XL" stepKey="fillExtraLargeSwatchForAdmin"/>
80-
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue('3')}}" stepKey="waitForTextBoxForDescriptionForExtraLargeSizeBecomeVisibleForAdmin"/>
81-
<fillField selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue('3')}}" userInput="Extra Large" stepKey="fillDescriptionForExtraLargeForAdmin"/>
84+
<actionGroup ref="AdminAddTextSwatchForAdminActionGroup" stepKey="addTextSwatchForXLSizeInAdmin">
85+
<argument name="position" value="2"/>
86+
<argument name="swatchName" value="XL"/>
87+
<argument name="swatchDescription" value="Extra Large"/>
88+
</actionGroup>
8289
<!--Select Scope-->
8390
<waitForElementClickable selector="{{AdvancedAttributePropertiesSection.AdvancedAttributePropertiesSectionToggle}}" stepKey="waitForAdvancedPropertiesFieldIsVisible"/>
8491
<click selector="{{AdvancedAttributePropertiesSection.AdvancedAttributePropertiesSectionToggle}}" stepKey="openAttributeAdvancedSection"/>

0 commit comments

Comments
 (0)