Skip to content

Commit 42a3cbf

Browse files
committed
Merge remote-tracking branch 'magento-l3/ACP2E-101' into L3_PR_21-12-10
2 parents 587a23f + 7252d85 commit 42a3cbf

13 files changed

+397
-16
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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="AdminConfigurableProductChangeOptionQtyActionGroup">
12+
<arguments>
13+
<argument name="optionLabel" type="string" defaultValue="{{colorConfigurableProductAttribute1.name}}"/>
14+
<argument name="qty" type="string" defaultValue="1"/>
15+
</arguments>
16+
<fillField userInput="{{qty}}" selector="{{AdminProductFormConfigurationsSection.confProductQuantityCell(optionLabel)}}" stepKey="fillFieldQuantityForSecondAttributeOption"/>
17+
</actionGroup>
18+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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="AdminConfigurableProductChangeOptionWeightActionGroup">
12+
<arguments>
13+
<argument name="optionLabel" type="string" defaultValue="{{colorConfigurableProductAttribute1.name}}"/>
14+
<argument name="weight" type="string" defaultValue="1"/>
15+
</arguments>
16+
<fillField userInput="{{weight}}" selector="{{AdminProductFormConfigurationsSection.confProductWeightCell(optionLabel)}}" stepKey="fillFieldQuantityForSecondAttributeOption"/>
17+
</actionGroup>
18+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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="AdminConfigurableProductCreateConfigurationsAndSkipBulkByAttributeCodeActionGroup" extends="GenerateConfigurationsByAttributeCodeActionGroup">
12+
<annotations>
13+
<description>EXTENDS: generateConfigurationsByAttributeCode. Skip quantity, price and images.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="attributeCode" type="string" defaultValue="SomeString"/>
17+
</arguments>
18+
19+
<remove keyForRemoval="clickOnApplySingleQuantityToEachSku"/>
20+
<remove keyForRemoval="enterAttributeQuantity"/>
21+
</actionGroup>
22+
</actionGroups>

app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/AdminConfigurableProductDisableConfigurationsActionGroup.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
<arguments>
1313
<argument name="productName" type="string" defaultValue="{{SimpleProduct.name}}"/>
1414
</arguments>
15+
<scrollTo selector="{{AdminProductFormConfigurationsSection.currentVariations}}" stepKey="scrollToVariations" />
1516
<click selector="{{AdminProductFormConfigurationsSection.actionsBtnByProductName(productName)}}" stepKey="clickToExpandActionsSelect"/>
16-
<click selector="{{AdminProductFormConfigurationsSection.disableProductBtn}}" stepKey="clickDisableChildProduct"/>
17+
<click selector="{{AdminProductFormConfigurationsSection.disableProductBtnActive}}" stepKey="clickDisableChildProduct"/>
1718
<see selector="{{AdminProductFormConfigurationsSection.confProductOptionStatusCell(productName)}}" userInput="Disabled" stepKey="seeConfigDisabled"/>
19+
<scrollTo selector="{{AdminProductFormConfigurationsSection.sectionHeader}}" stepKey="scrollToSectionHeader" />
1820
</actionGroup>
1921
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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="AdminConfigurableProductVerifyOptionPriceActionGroup">
12+
<arguments>
13+
<argument name="optionLabel" type="string" defaultValue="{{colorConfigurableProductAttribute1.name}}"/>
14+
<argument name="price" type="string" defaultValue="10"/>
15+
</arguments>
16+
<grabValueFrom selector="{{AdminProductFormConfigurationsSection.confProductPriceCell(optionLabel)}}" stepKey="getOptionPrice"/>
17+
<assertEquals stepKey="assertEquals">
18+
<expectedResult type="string">{{price}}</expectedResult>
19+
<actualResult type="variable">getOptionPrice</actualResult>
20+
</assertEquals>
21+
</actionGroup>
22+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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="AdminConfigurableProductVerifyOptionQtyActionGroup">
12+
<arguments>
13+
<argument name="optionLabel" type="string" defaultValue="{{colorConfigurableProductAttribute1.name}}"/>
14+
<argument name="qty" type="string" defaultValue="1"/>
15+
</arguments>
16+
<grabValueFrom selector="{{AdminProductFormConfigurationsSection.confProductQuantityCell(optionLabel)}}" stepKey="getOptionQty"/>
17+
<assertEquals stepKey="assertEquals">
18+
<expectedResult type="string">{{qty}}</expectedResult>
19+
<actualResult type="variable">getOptionQty</actualResult>
20+
</assertEquals>
21+
</actionGroup>
22+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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="AdminConfigurableProductVerifyOptionStatusActionGroup">
12+
<arguments>
13+
<argument name="optionLabel" type="string" defaultValue="{{colorConfigurableProductAttribute1.name}}"/>
14+
<argument name="status" type="string" defaultValue="Enabled"/>
15+
</arguments>
16+
<see selector="{{AdminProductFormConfigurationsSection.confProductOptionStatusCell(optionLabel)}}" userInput="{{status}}" stepKey="verifyStatus"/>
17+
</actionGroup>
18+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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="AdminConfigurableProductVerifyOptionWeightActionGroup">
12+
<arguments>
13+
<argument name="optionLabel" type="string" defaultValue="{{colorConfigurableProductAttribute1.name}}"/>
14+
<argument name="weight" type="string" defaultValue="1"/>
15+
</arguments>
16+
<grabValueFrom selector="{{AdminProductFormConfigurationsSection.confProductWeightCell(optionLabel)}}" stepKey="getOptionWeight"/>
17+
<assertEquals stepKey="assertEquals">
18+
<expectedResult type="string">{{weight}}</expectedResult>
19+
<actualResult type="variable">getOptionWeight</actualResult>
20+
</assertEquals>
21+
</actionGroup>
22+
</actionGroups>

app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/GenerateConfigurationsByAttributeCodeActionGroup.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
<click selector="{{AdminCreateProductConfigurationsPanel.filters}}" stepKey="clickFilters"/>
2121
<fillField selector="{{AdminCreateProductConfigurationsPanel.attributeCode}}" userInput="{{attributeCode}}" stepKey="fillFilterAttributeCodeField"/>
2222
<click selector="{{AdminCreateProductConfigurationsPanel.applyFilters}}" stepKey="clickApplyFiltersButton"/>
23-
<click selector="{{AdminCreateProductConfigurationsPanel.firstCheckbox}}" stepKey="clickOnFirstCheckbox"/>
23+
<checkOption selector="{{AdminCreateProductConfigurationsPanel.firstCheckbox}}" stepKey="clickOnFirstCheckbox"/>
2424
<click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton1"/>
2525
<click selector="{{AdminCreateProductConfigurationsPanel.selectAll}}" stepKey="clickOnSelectAll"/>
2626
<click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton2"/>
27-
<click selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="clickOnApplySingleQuantityToEachSku"/>
27+
<checkOption selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="clickOnApplySingleQuantityToEachSku"/>
2828
<fillField selector="{{AdminCreateProductConfigurationsPanel.quantity}}" userInput="99" stepKey="enterAttributeQuantity"/>
2929
<click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton3"/>
3030
<click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton4"/>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<element name="currentVariationsAttributesCells" type="textarea" selector=".admin__control-fields[data-index='attributes']"/>
2020
<element name="currentVariationsCells" type="textarea" selector=".admin__control-fields[data-index='{{var}}']" parameterized="true"/>
2121
<element name="currentVariationsStatusCells" type="textarea" selector="._no-header[data-index='status']"/>
22+
<element name="currentVariations" type="text" selector="[data-index=configurable-matrix]"/>
2223
<element name="currentVariationsAllRows" type="text" selector="[data-index=configurable-matrix] .data-row"/>
2324
<element name="currentVariationsProductImage" type="text" parameterized="true" selector="[data-index=configurable-matrix] .data-row:nth-of-type({{index}}) td[data-index=thumbnail_image_container] img"/>
2425
<element name="currentVariationsProductName" type="text" parameterized="true" selector="[data-index=configurable-matrix] .data-row:nth-of-type({{index}}) td[data-index=name_container]"/>
@@ -34,6 +35,7 @@
3435
<element name="addProduct" type="button" selector="//*[.='Attributes']/ancestor::tr/td[@data-index='attributes']//span[contains(text(), '{{var}}')]/ancestor::tr//a[text()='Choose a different Product']" parameterized="true"/>
3536
<element name="removeProductBtn" type="button" selector="//a[text()='Remove Product']"/>
3637
<element name="disableProductBtn" type="button" selector="//a[text()='Disable Product']"/>
38+
<element name="disableProductBtnActive" type="button" selector="//*[@class='action-menu _active']//a[text()='Disable Product']"/>
3739
<element name="enableProductBtn" type="button" selector="//a[text()='Enable Product']"/>
3840
<element name="confProductSku" type="input" selector="//*[@name='configurable-matrix[{{arg}}][sku]']" parameterized="true"/>
3941
<element name="confProductNameCell" type="input" selector="//*[.='Attributes']/ancestor::tr//span[contains(text(), '{{var}}')]/ancestor::tr/td[@data-index='name_container']//input" parameterized="true"/>

0 commit comments

Comments
 (0)