Skip to content

Commit d14bb40

Browse files
Chhandak.BaruaChhandak.Barua
authored andcommitted
ACP2E-1076: Discount (Cart price rules) ignore Weee tax amount included in subtotal cart
1 parent 16680a3 commit d14bb40

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxDiscountInShoppingCartTest.xml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,25 @@
2222
<before>
2323
<!-- Step 1: Simple product is created -->
2424
<createData entity="_defaultProduct" stepKey="createSimpleProduct"/>
25+
<!-- Step 2: Create a cart price rule for $10 Fixed amount discount -->
26+
<createData entity="ActiveSalesRuleCoupon50" stepKey="createCartPriceRule"/>
27+
<createData entity="SimpleSalesRuleCoupon" stepKey="createCouponForCartPriceRule">
28+
<requiredEntity createDataKey="createCartPriceRule"/>
29+
</createData>
2530
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
26-
<!-- Step 2: Store>Configuration; Sales>Tax FPT Enable -->
31+
<!-- Step 3: Store>Configuration; Sales>Tax FPT Enable -->
2732
<createData entity="WeeeConfigEnable" stepKey="enableFPT"/>
2833
<magentoCLI command="config:set tax/cart_display/price 3" stepKey="setPrice"/>
2934
<magentoCLI command="config:set tax/cart_display/subtotal 3" stepKey="setSubtotal"/>
30-
<!-- Step 3: Fixed Product Tax attribute is created and added to default attribute set -->
35+
<!-- Step 4: Fixed Product Tax attribute is created and added to default attribute set -->
3136
<createData entity="FPTProductAttribute" stepKey="createProductFPTAttribute"/>
3237
<createData entity="AddToDefaultSet" stepKey="addFPTToAttributeSet">
3338
<requiredEntity createDataKey="createProductFPTAttribute"/>
3439
</createData>
3540
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openProductEditPage">
3641
<argument name="productId" value="$$createSimpleProduct.id$$"/>
3742
</actionGroup>
38-
<!-- Step 4: FPT United States/California/100 -->
43+
<!-- Step 5: FPT United States/California/100 -->
3944
<actionGroup ref="AdminProductAddFPTValueActionGroup" stepKey="addFPTValue1">
4045
<argument name="FPTAttributeCode" value="$createProductFPTAttribute.attribute_code$"/>
4146
<argument name="stateForFPT" value="California"/>
@@ -48,19 +53,19 @@
4853
<after>
4954
<magentoCLI command="config:set tax/cart_display/price 1" stepKey="setPrice"/>
5055
<magentoCLI command="config:set tax/cart_display/subtotal 1" stepKey="setSubtotal"/>
56+
<deleteData createDataKey="createCartPriceRule" stepKey="deleteSalesRule"/>
5157
<deleteData createDataKey="createProductFPTAttribute" stepKey="deleteProductFPTAttribute"/>
5258
<createData entity="WeeeConfigDisable" stepKey="disableFPT"/>
5359
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
5460
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
5561
<magentoCron groups="index" stepKey="reindexBrokenIndices"/>
5662
</after>
5763

58-
<!-- Step 5: Create a cart price rule for $10 Fixed amount discount -->
59-
<actionGroup ref="AdminOpenCartPriceRulesPageActionGroup" stepKey="amOnCartPriceList"/>
60-
<click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/>
61-
<fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{_defaultCoupon.code}}" stepKey="fillRuleName"/>
62-
<selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="Main Website" stepKey="selectWebsites"/>
63-
<selectOption selector="{{AdminCartPriceRulesFormSection.customerGroups}}" parameterArray="[{{'NOT LOGGED IN','General','Wholesale','Retailer'}}]" stepKey="selectSpecifiedCustomerGroups"/>
64+
<!-- Search and update cart price rule page -->
65+
<actionGroup ref="AdminOpenCartPriceRulesPageActionGroup" stepKey="goToCartPriceRulePage"/>
66+
<actionGroup ref="AdminFilterCartPriceRuleActionGroup" stepKey="filterCartPriceRule">
67+
<argument name="ruleName" value="$$createCartPriceRule.name$$"/>
68+
</actionGroup>
6469
<click selector="{{PriceRuleConditionsSection.conditionsTab}}" stepKey="expandConditions"/>
6570
<!-- Scroll down -->
6671
<scrollTo selector="{{PriceRuleConditionsSection.conditionsTab}}" stepKey="scrollToConditionsTab"/>
@@ -71,9 +76,6 @@
7176
<selectOption selector="{{PriceRuleConditionsSection.operatorByIndex('1', '1')}}" userInput="equals or less than" stepKey="fillOperator"/>
7277
<click selector="{{PriceRuleConditionsSection.ruleParamLink('1', '1', '2')}}" stepKey="startEditValue"/>
7378
<fillField selector="{{PriceRuleConditionsSection.valueByIndex('1', '1')}}" userInput="2000" stepKey="fillValue"/>
74-
<click selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="clickToExpandActions"/>
75-
<selectOption selector="{{AdminCartPriceRulesFormSection.apply}}" userInput="Fixed amount discount" stepKey="selectActionType"/>
76-
<fillField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="10" stepKey="fillDiscountAmount"/>
7779
<click selector="{{AdminCartPriceRulesFormSection.save}}" stepKey="clickSaveButton"/>
7880
<see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/>
7981
<!-- Step 6: Add the product to the cart -->

0 commit comments

Comments
 (0)