Skip to content

Commit 2bccf0c

Browse files
committed
ACQE-8227: Product Attribute of multiselect type changes can be saved with mass update
- Changes made as per latest comments
1 parent 72673e9 commit 2bccf0c

File tree

1 file changed

+19
-30
lines changed

1 file changed

+19
-30
lines changed

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

Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
/**
4-
* ADOBE CONFIDENTIAL
5-
*
6-
* Copyright 2025 Adobe
7-
* All Rights Reserved.
8-
*
9-
* NOTICE: All information contained herein is, and remains
10-
* the property of Adobe and its suppliers, if any. The intellectual
11-
* and technical concepts contained herein are proprietary to Adobe
12-
* and its suppliers and are protected by all applicable intellectual
13-
* property laws, including trade secret and copyright laws.
14-
* Dissemination of this information or reproduction of this material
15-
* is strictly forbidden unless prior written permission is obtained
16-
* from Adobe.
17-
*/
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
6+
*/
187
-->
198
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
209
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
@@ -29,13 +18,13 @@
2918
<group value="Catalog"/>
3019
</annotations>
3120
<before>
21+
<!-- Pre-condition Step-1 Multiselect attribute is created with three options: 1, 2, 3 -->
22+
<createData entity="multiSelectAttributeWithThreeOptions" stepKey="createMultiSelectProductAttributeWithThreeOptions"/>
3223
<!-- Login as admin -->
3324
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
34-
<!-- Pre-condition Step-1 Multiselect attribute is created with three options: 1, 2, 3 -->
35-
<createData entity="multiSelectAttributeWithThreeOptions" stepKey="createMultiSelectProductAttributeWith2Options"/>
3625
<actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="goToProductAttributes"/>
3726
<actionGroup ref="NavigateToCreatedProductAttributeActionGroup" stepKey="openAttributeFromGrid">
38-
<argument name="ProductAttribute" value="$$createMultiSelectProductAttributeWith2Options$$"/>
27+
<argument name="ProductAttribute" value="$$createMultiSelectProductAttributeWithThreeOptions$$"/>
3928
</actionGroup>
4029
<actionGroup ref="CreateAttributeDropdownNthOptionActionGroup" stepKey="createOption1">
4130
<argument name="adminName" value="{{multiSelectAttributeWithThreeOptions.option1}}"/>
@@ -58,7 +47,7 @@
5847
<actionGroup ref="AdminOpenAttributeSetByNameActionGroup" stepKey="openDefaultAttributeSet"/>
5948
<actionGroup ref="AssignAttributeToGroupActionGroup" stepKey="assignAttributeToGroup">
6049
<argument name="group" value="Product Details"/>
61-
<argument name="attribute" value="$$createMultiSelectProductAttributeWith2Options.attribute_code$$"/>
50+
<argument name="attribute" value="$$createMultiSelectProductAttributeWithThreeOptions.attribute_code$$"/>
6251
</actionGroup>
6352
<actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveAttributeSet"/>
6453
<!-- Pre-condition Step-3 Product is created based on default attribute set. Value of multiselect attribute set to 1 and 2 for this product -->
@@ -71,10 +60,10 @@
7160
<argument name="product" value="$$createSimpleProduct$$"/>
7261
</actionGroup>
7362
<waitForElementVisible
74-
selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}"
63+
selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWithThreeOptions.attribute_code$$')}}"
7564
stepKey="waitForMultiSelectAttributeToSelect"/>
7665
<selectOption
77-
selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}"
66+
selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWithThreeOptions.attribute_code$$')}}"
7867
parameterArray="['1','2']" stepKey="selectFirstAndSecondOptions"/>
7968
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductForm"/>
8069
</before>
@@ -83,7 +72,7 @@
8372
<deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/>
8473
<!-- Delete attribute -->
8574
<actionGroup ref="NavigateToCreatedProductAttributeActionGroup" stepKey="openAttributeFromGrid">
86-
<argument name="ProductAttribute" value="$$createMultiSelectProductAttributeWith2Options$$"/>
75+
<argument name="ProductAttribute" value="$$createMultiSelectProductAttributeWithThreeOptions$$"/>
8776
</actionGroup>
8877
<actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteProductAttribute"/>
8978
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
@@ -99,13 +88,13 @@
9988
<!--Step 4 - Under ACTIONS select update attributes -->
10089
<actionGroup ref="AdminClickMassUpdateProductAttributesActionGroup" stepKey="clickMassUpdateProductAttributes"/>
10190
<!--Step 5 - Check the "change"-checkbox and alter the values from 1 and 2 to 3 only -->
102-
<scrollTo selector="{{AdminEditProductAttributesSection.toggleAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}" stepKey="scrollToAttributeTogglebtn" />
103-
<checkOption selector="{{AdminEditProductAttributesSection.toggleAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}" stepKey="toggleAttribute"/>
91+
<scrollTo selector="{{AdminEditProductAttributesSection.toggleAttribute('$$createMultiSelectProductAttributeWithThreeOptions.attribute_code$$')}}" stepKey="scrollToAttributeTogglebtn" />
92+
<checkOption selector="{{AdminEditProductAttributesSection.toggleAttribute('$$createMultiSelectProductAttributeWithThreeOptions.attribute_code$$')}}" stepKey="toggleAttribute"/>
10493
<unselectOption
105-
selector="{{AdminProductFormSection.customAttributeUnderMassUpdate('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}"
94+
selector="{{AdminProductFormSection.customAttributeUnderMassUpdate('$$createMultiSelectProductAttributeWithThreeOptions.attribute_code$$')}}"
10695
parameterArray="['1','2']" stepKey="uncheckFirstAndSecondOptions"/>
10796
<selectOption
108-
selector="{{AdminProductFormSection.customAttributeUnderMassUpdate('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}"
97+
selector="{{AdminProductFormSection.customAttributeUnderMassUpdate('$$createMultiSelectProductAttributeWithThreeOptions.attribute_code$$')}}"
10998
parameterArray="['3']" stepKey="selectThridOption"/>
11099
<!--Step 6 - Click 'Save Attribute' button -->
111100
<actionGroup ref="AdminMassUpdateProductAttributeSaveActionGroup" stepKey="saveUpdatedProductAttribute"/>
@@ -120,13 +109,13 @@
120109
</actionGroup>
121110
<waitForPageLoad stepKey="waitForProductPageLoad"/>
122111
<dontSeeOptionIsSelected
123-
selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}"
112+
selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWithThreeOptions.attribute_code$$')}}"
124113
userInput="1" stepKey="assertOption1NotChecked"/>
125114
<dontSeeOptionIsSelected
126-
selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}"
115+
selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWithThreeOptions.attribute_code$$')}}"
127116
userInput="2" stepKey="assertOption2NotChecked"/>
128117
<seeOptionIsSelected
129-
selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}"
130-
userInput="3" stepKey="assertOption3NotChecked"/>
118+
selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWithThreeOptions.attribute_code$$')}}"
119+
userInput="3" stepKey="assertOption3IsChecked"/>
131120
</test>
132121
</tests>

0 commit comments

Comments
 (0)