Skip to content

Commit 8c8d5de

Browse files
committed
MC-42885: Bundle Product - Fixed Product Tax - Shipping error
- fix
1 parent 5b50b5b commit 8c8d5de

File tree

1 file changed

+122
-0
lines changed

1 file changed

+122
-0
lines changed
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="StorefrontBundleWithTwoOptionsWithWeeeAddToCartTest">
12+
<annotations>
13+
<features value="Tax"/>
14+
<stories value="Shopping cart taxes"/>
15+
<title value="Test Storefront Bundle Product With Two Options With Weee Added To Cart"/>
16+
<description value="The purpose of the test is to ensure that Bundle product with two options with Weee successfully added to cart"/>
17+
<severity value="AVERAGE"/>
18+
<testCaseId value="MC-43057"/>
19+
<group value="tax"/>
20+
<group value="weee"/>
21+
</annotations>
22+
23+
<before>
24+
<createData entity="WeeeConfigEnable" stepKey="enableFPT"/>
25+
<magentoCLI command="config:set tax/weee/enable 1" stepKey="EnableWeee"/>
26+
<magentoCLI command="config:set tax/weee/display_list 0" stepKey="EnableDisplayInListFPTOnly"/>
27+
<magentoCLI command="config:set tax/weee/display 0" stepKey="SetDisplayFPTOnly"/>
28+
<magentoCLI command="config:set tax/weee/display_sales 0" stepKey="SetDisplaySalesFPTOnly"/>
29+
<magentoCLI command="config:set tax/weee/display_email 0" stepKey="SetDisplayEmailFPTOnly"/>
30+
<magentoCLI command="config:set tax/weee/apply_vat 1" stepKey="EnableApplyVAT"/>
31+
<magentoCLI command="config:set tax/weee/include_in_subtotal 1" stepKey="EnableIncludeInSubtotal"/>
32+
33+
<createData entity="FPTProductAttribute" stepKey="createProductFPTAttribute"/>
34+
<createData entity="AddToDefaultSet" stepKey="addFPTToAttributeSet">
35+
<requiredEntity createDataKey="createProductFPTAttribute"/>
36+
</createData>
37+
<createData entity="USFullTaxRate" stepKey="createFullTaxRate"/>
38+
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
39+
<createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
40+
</before>
41+
42+
<after>
43+
<deleteData createDataKey="createFullTaxRate" stepKey="deleteFullTaxRate"/>
44+
<deleteData createDataKey="createProductFPTAttribute" stepKey="deleteProductFPTAttribute"/>
45+
<createData entity="WeeeConfigDisable" stepKey="disableFPT"/>
46+
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
47+
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
48+
<actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteBundle">
49+
<argument name="product" value="BundleProduct"/>
50+
</actionGroup>
51+
</after>
52+
53+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
54+
55+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openSimpleProduct1EditPage">
56+
<argument name="productId" value="$simpleProduct1.id$"/>
57+
</actionGroup>
58+
59+
<actionGroup ref="AdminProductAddFPTValueActionGroup" stepKey="addFPTValueToSimpleProduct1">
60+
<argument name="FPTAttributeCode" value="$createProductFPTAttribute.attribute_code$"/>
61+
<argument name="stateForFPT" value="*"/>
62+
<argument name="valueForFPT" value="10"/>
63+
</actionGroup>
64+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveSimpleProduct1"/>
65+
66+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openSimpleProduct2EditPage">
67+
<argument name="productId" value="$simpleProduct2.id$"/>
68+
</actionGroup>
69+
70+
<actionGroup ref="AdminProductAddFPTValueActionGroup" stepKey="addFPTValueToSimpleProduct2">
71+
<argument name="FPTAttributeCode" value="$createProductFPTAttribute.attribute_code$"/>
72+
<argument name="stateForFPT" value="*"/>
73+
<argument name="valueForFPT" value="10"/>
74+
</actionGroup>
75+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveSimpleProduct2"/>
76+
77+
<amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage"/>
78+
<waitForPageLoad stepKey="waitForBundleProductCreatePageToLoad"/>
79+
80+
<actionGroup ref="FillMainBundleProductFormActionGroup" stepKey="fillMainProductFields">
81+
<argument name="product" value="BundleProduct"/>
82+
</actionGroup>
83+
84+
<actionGroup ref="AdminProductAddFPTValueActionGroup" stepKey="addFPTValueToBundleProduct">
85+
<argument name="FPTAttributeCode" value="$createProductFPTAttribute.attribute_code$"/>
86+
<argument name="stateForFPT" value="*"/>
87+
<argument name="valueForFPT" value="10"/>
88+
</actionGroup>
89+
90+
<actionGroup ref="AddBundleOptionWithOneProductActionGroup" stepKey="addBundleOption1">
91+
<argument name="x" value="0"/>
92+
<argument name="n" value="1"/>
93+
<argument name="prodOneSku" value="$$simpleProduct1.sku$$"/>
94+
<argument name="prodTwoSku" value=""/>
95+
<argument name="optionTitle" value="Option1"/>
96+
<argument name="inputType" value="checkbox"/>
97+
</actionGroup>
98+
<actionGroup ref="AddBundleOptionWithOneProductActionGroup" stepKey="addBundleOption2">
99+
<argument name="x" value="1"/>
100+
<argument name="n" value="2"/>
101+
<argument name="prodOneSku" value="$$simpleProduct2.sku$$"/>
102+
<argument name="prodTwoSku" value=""/>
103+
<argument name="optionTitle" value="Option2"/>
104+
<argument name="inputType" value="checkbox"/>
105+
</actionGroup>
106+
107+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveBundleProduct"/>
108+
109+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openBundleProductPage">
110+
<argument name="productUrl" value="{{BundleProduct.urlkey}}" />
111+
</actionGroup>
112+
113+
<actionGroup ref="StorefrontAddBundleProductFromProductToCartActionGroup" stepKey="addBundleProductToCart">
114+
<argument name="productName" value="{{BundleProduct.name}}"/>
115+
</actionGroup>
116+
117+
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="openMiniCart"/>
118+
<actionGroup ref="AssertStorefrontMiniCartSubtotalActionGroup" stepKey="assertSubtotal">
119+
<argument name="subtotal" value="$266.00"/>
120+
</actionGroup>
121+
</test>
122+
</tests>

0 commit comments

Comments
 (0)