Skip to content

Commit 422dd4f

Browse files
committed
ACQE-8097: Product attribute admin values should be used instead of default store view values in backend
- created new data entity
1 parent 7924671 commit 422dd4f

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCreateCustomConditionWithMultipleSelectInCartPriceRuleActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<description>Remove fill filed action and replace with select option</description>
1313
</annotations>
1414
<arguments>
15-
<argument name="productAttributeOption" type="string" defaultValue="{{colorDefaultProductAttribute2.name}}"/>
15+
<argument name="productAttributeOption" type="string" defaultValue="{{productAttributeColour.black}}"/>
1616
</arguments>
1717
<remove keyForRemoval="fillCategoryId"/>
1818
<selectOption selector="{{AdminCartPriceRulesFormSection.ruleFieldByIndex('1--1--1')}}" userInput="{{productAttributeOption}}" stepKey="selectProductAttributeValue"/>
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
6-
*/
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
6+
*/
77
-->
88

99
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -13,4 +13,8 @@
1313
<data key="quantityInCart">Magento\SalesRule\Model\Rule\Condition\Product|quote_item_qty</data>
1414
<data key="rowTotalInCart">Magento\SalesRule\Model\Rule\Condition\Product|quote_item_row_total</data>
1515
</entity>
16+
<entity name="productAttributeColour" type="productAttribute">
17+
<data key="gold">gold</data>
18+
<data key="black">black</data>
19+
</entity>
1620
</entities>
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1010
<test name="AdminProductAttributeAdminValuesUsedInsteadOfDefaultValueTest">
1111
<annotations>
12-
<features value="Catalog"/>
12+
<features value="SalesRule"/>
1313
<stories value="Product attribute admin values should be used in backend"/>
1414
<title value="Product attribute admin values should be used instead of default store view values in backend"/>
1515
<description value="Verify that product attribute admin values should be used in cart price rule instead of default store view values in backend"/>
1616
<testCaseId value="AC-13048"/>
1717
<severity value="MINOR"/>
18-
<group value="Catalog"/>
18+
<group value="SalesRule"/>
1919
</annotations>
2020
<before>
2121
<createData entity="productAttributeMultiselectTwoOptions" stepKey="createColourProductAttribute"/>
@@ -41,8 +41,8 @@
4141
</actionGroup>
4242
<fillField selector="{{AttributePropertiesSection.DefaultLabel}}" userInput="$$createColourProductAttribute.attribute_code$$" stepKey="fillDefaultLabel"/>
4343
<actionGroup ref="CreateAttributeDropdownNthOptionActionGroup" stepKey="createColourOptionWhichAsDifferentValuesInAdminAndDefaultStoreView">
44-
<argument name="adminName" value="{{colorDefaultProductAttribute2.name}}"/>
45-
<argument name="frontName" value="{{colorDefaultProductAttribute1.name}}"/>
44+
<argument name="adminName" value="{{productAttributeColour.black}}"/>
45+
<argument name="frontName" value="{{productAttributeColour.gold}}"/>
4646
<argument name="row" value="1"/>
4747
</actionGroup>
4848
<actionGroup ref="AdminSaveProductAttributeActionGroup" stepKey="saveMultiSelectAttribute"/>
@@ -64,8 +64,8 @@
6464
<actionGroup ref="AdminCreateCustomConditionWithMultipleSelectInCartPriceRuleActionGroup" stepKey="createProductAttributeCombinationCondition">
6565
<argument name="productAttribute" value="$$createColourProductAttribute.attribute_code$$"/>
6666
</actionGroup>
67-
<waitForText selector="{{AdminCartPriceRulesFormSection.ruleFieldByIndex('1--1--1')}}" userInput="{{colorDefaultProductAttribute2.name}}" stepKey="verifyAdminValueIsVisibleInTheConditionInsteadOfDefaultStoreViewValue"/>
68-
<dontSee selector="{{AdminCartPriceRulesFormSection.ruleFieldByIndex('1--1--1')}}" userInput="{{colorDefaultProductAttribute1.name}}" stepKey="verifyDefaultStoreViewValueIsNotVisible"/>
67+
<waitForText selector="{{AdminCartPriceRulesFormSection.ruleFieldByIndex('1--1--1')}}" userInput="{{productAttributeColour.black}}" stepKey="verifyAdminValueIsVisibleInTheConditionInsteadOfDefaultStoreViewValue"/>
68+
<dontSee selector="{{AdminCartPriceRulesFormSection.ruleFieldByIndex('1--1--1')}}" userInput="{{productAttributeColour.gold}}" stepKey="verifyDefaultStoreViewValueIsNotVisible"/>
6969
<actionGroup ref="AssertCartPriceRuleSuccessSaveMessageActionGroup" stepKey="saveAndAssertCartPriceRuleSuccessSaveMessage"/>
7070
</test>
7171
</tests>

0 commit comments

Comments
 (0)