Skip to content

Commit c1d221e

Browse files
MC-19438: Bundle Product Cart Pricing issue when adding tier price to bundle product and item is added twice to the cart
1 parent 71daa8e commit c1d221e

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="BundleProductWithTierPriceInCartTest">
11+
<annotations>
12+
<features value="Bundle"/>
13+
<stories value="Check that price of cart is correct when the bundle product added to the cart twice"/>
14+
<title value="Customer should get the right subtotal in cart when the bundle product added to the cart twice"/>
15+
<description value="Customer should be able to add one more bundle product to the cart and get the right price"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="MC-19727"/>
18+
<group value="Bundle"/>
19+
</annotations>
20+
<before>
21+
<actionGroup ref="LoginAsAdmin" stepKey="login"/>
22+
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
23+
<createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
24+
</before>
25+
<after>
26+
<actionGroup stepKey="deleteBundle" ref="deleteProductUsingProductGrid">
27+
<argument name="product" value="BundleProduct"/>
28+
</actionGroup>
29+
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="ClearFiltersAfter"/>
30+
<waitForPageLoad stepKey="waitForClearFilter"/>
31+
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
32+
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
33+
</after>
34+
<amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage"/>
35+
<waitForPageLoad stepKey="waitForBundleProductCreatePageToLoad"/>
36+
<actionGroup ref="fillMainBundleProductForm" stepKey="fillMainFieldsForBundle"/>
37+
<actionGroup ref="addBundleOptionWithOneProduct" stepKey="addBundleOption1">
38+
<argument name="x" value="0"/>
39+
<argument name="n" value="1"/>
40+
<argument name="prodOneSku" value="$$simpleProduct1.sku$$"/>
41+
<argument name="prodTwoSku" value=""/>
42+
<argument name="optionTitle" value="Option1"/>
43+
<argument name="inputType" value="checkbox"/>
44+
</actionGroup>
45+
<actionGroup ref="addBundleOptionWithOneProduct" stepKey="addBundleOption2">
46+
<argument name="x" value="1"/>
47+
<argument name="n" value="2"/>
48+
<argument name="prodOneSku" value="$$simpleProduct2.sku$$"/>
49+
<argument name="prodTwoSku" value=""/>
50+
<argument name="optionTitle" value="Option2"/>
51+
<argument name="inputType" value="checkbox"/>
52+
</actionGroup>
53+
<actionGroup ref="saveProductForm" stepKey="saveProduct"/>
54+
<actionGroup ref="ProductSetAdvancedPricing" stepKey="addTierPriceProduct1">
55+
<argument name="group" value="General"/>
56+
<argument name="quantity" value="1"/>
57+
<argument name="price" value="Discount"/>
58+
<argument name="amount" value="50"/>
59+
</actionGroup>
60+
<actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUser">
61+
<argument name="Customer" value="CustomerEntityOne"/>
62+
</actionGroup>
63+
<amOnPage url="{{BundleProduct.sku}}.html" stepKey="goToStorefront"/>
64+
<waitForPageLoad stepKey="waitForStorefront"/>
65+
<actionGroup ref="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup" stepKey="clickOnCustomizeAndAddtoCartButton"/>
66+
<actionGroup ref="StorefrontEnterProductQuantityAndAddToTheCartActionGroup" stepKey="enterProductQuantityAndAddToTheCart">
67+
<argument name="quantity" value="1"/>
68+
</actionGroup>
69+
<actionGroup ref="StorefrontEnterProductQuantityAndAddToTheCartActionGroup" stepKey="enterProductQuantityAndAddToTheCartAgain">
70+
<argument name="quantity" value="1"/>
71+
</actionGroup>
72+
<click stepKey="openMiniCart" selector="{{StorefrontMinicartSection.showCart}}"/>
73+
<waitForPageLoad stepKey="waitForMiniCart"/>
74+
<see stepKey="seeCartSubtotal" userInput="$246.00"/>
75+
</test>
76+
</tests>

0 commit comments

Comments
 (0)