Skip to content

Commit f36111b

Browse files
committed
Merge branch 'ACQE-6901' into ACQE-6897-functional-mainline-deployment
2 parents cb3a73c + 5ad49e3 commit f36111b

File tree

5 files changed

+239
-1
lines changed

5 files changed

+239
-1
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: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
</arguments>
20+
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue(position)}}" stepKey="waitForSwatchTextBoxForAdminToVisible"/>
21+
<fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue(position)}}" userInput="{{swatchName}}" stepKey="fillSwatchForStoreView"/>
22+
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue(position)}}" stepKey="waitForDescriptionTextBoxForAdminToVisible"/>
23+
<fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue(position)}}" userInput="{{swatchDescription}}" stepKey="fillDescriptionForStoreView"/>
24+
</actionGroup>
25+
</actionGroups>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,11 @@
1414
<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"/>
1515
<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"/>
1616
<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"/>
17+
<element name="textSwatchAdminSwatchValue" type="input" selector="[data-role='swatch-text-options-container'] input[name='swatchtext[value][option_{{row}}][0]']" parameterized="true"/>
18+
<element name="textSwatchAdminDescriptionValue" type="input" selector="[data-role='swatch-text-options-container'] input[name='optiontext[value][option_{{row}}][0]']" parameterized="true"/>
19+
<element name="textSwatchDefaultStoreSwatchValue" type="input" selector="[data-role='swatch-text-options-container'] input[name='swatchtext[value][option_{{row}}][1]']" parameterized="true"/>
20+
<element name="textSwatchDefaultStoreDescriptionValue" type="input" selector="[data-role='swatch-text-options-container'] input[name='optiontext[value][option_{{row}}][1]']" parameterized="true"/>
21+
<element name="textSwatchStoreViewValue" type="input" selector="//*[@data-role='swatch-text-options-container']//td[starts-with(@class,'col-swatch col-swatch')]//input[@value='{{storeViewValue}}']" parameterized="true"/>
22+
<element name="isDefaultTextSwatch" type="radio" selector="[data-role='swatch-text-options-container'] tr:nth-of-type({{row}}) input[name='defaulttext[]']" parameterized="true"/>
1723
</section>
1824
</sections>

app/code/Magento/ConfigurableProduct/Test/Mftf/Section/StorefrontProductInfoMainSection.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@
2525
<element name="attributeOptionByAttributeID" type="select" selector="//div[@class='fieldset']//div[//span[text()='{{attribute_code}}']]//option[text()='{{optionName}}']" parameterized="true"/>
2626
<element name="tierPriceExcludingPrice" type="text" selector=".item [data-label='Excl. Tax']"/>
2727
<element name="tierPriceContainsExcludingTax" type="text" selector=".item .price"/>
28+
<element name="productSwatchText" type="text" selector="//div[@class='swatch-option text' and contains(text(),'{{swatchName}}')]" parameterized="true"/>
2829
</section>
29-
</sections>
30+
</sections>

0 commit comments

Comments
 (0)