Skip to content

Commit 2693e31

Browse files
committed
MC-18963: Bundle Product Cart Pricing issue when added a special price for associated products
1 parent 254eb5a commit 2693e31

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontSpecialPriceBundleProductInCartTest.xml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<test name="StorefrontSpecialPriceBundleProductInCartTest">
1111
<annotations>
1212
<features value="Bundle"/>
13-
<stories value="Check that the cart total is correct when the bundle product with special price added to the cart"/>
13+
<stories value="Add bundle product to cart on storefront"/>
1414
<title value="Customer should not be able to add a Bundle Product to the cart when added a special price for associated products"/>
1515
<description value="Customer should not be able to add a Bundle Product to the cart when added a special price for associated products"/>
1616
<severity value="MAJOR"/>
@@ -19,10 +19,10 @@
1919
<group value="bundle"/>
2020
</annotations>
2121
<before>
22-
<createData entity="_defaultCategory" stepKey="category"/>
23-
<!-- Create simple product -->
24-
<createData entity="SimpleProductWithSpecialPrice" stepKey="simpleProduct">
25-
<requiredEntity createDataKey="category"/>
22+
<!-- Create the Simple product with Special price -->
23+
<createData entity="SimpleProduct2" stepKey="simpleProduct"/>
24+
<createData entity="specialProductPrice2" stepKey="specialPriceToSimpleProduct">
25+
<requiredEntity createDataKey="simpleProduct"/>
2626
</createData>
2727
<!-- Create the bundle product -->
2828
<createData entity="ApiBundleProduct" stepKey="bundleProduct"/>
@@ -35,19 +35,12 @@
3535
<requiredEntity createDataKey="bundleOption"/>
3636
<requiredEntity createDataKey="simpleProduct"/>
3737
</createData>
38-
<!-- Add special price to simple product -->
39-
<actionGroup ref="LoginAsAdmin" stepKey="login"/>
40-
<amOnPage url="{{AdminProductEditPage.url($simpleProduct.id$)}}" stepKey="goToAdminProductPage"/>
41-
<actionGroup ref="AddSpecialPriceToProductActionGroup" stepKey="addSpecialPrice">
42-
<argument name="price" value="{{SimpleProductWithSpecialPrice.special_price}}"/>
43-
</actionGroup>
44-
<actionGroup ref="saveProductForm" stepKey="saveSimpleProduct"/>
38+
<!-- Run reindex stock status -->
39+
<magentoCLI command="indexer:reindex" arguments="cataloginventory_stock" stepKey="reindex"/>
4540
</before>
4641
<after>
4742
<deleteData createDataKey="bundleProduct" stepKey="deleteBundleProduct"/>
4843
<deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/>
49-
<deleteData createDataKey="category" stepKey="deleteCategory"/>
50-
<actionGroup ref="logout" stepKey="logout"/>
5144
</after>
5245
<!-- Go to storefront BundleProduct -->
5346
<amOnPage url="{{StorefrontProductPage.url($$bundleProduct.custom_attributes[url_key]$$)}}" stepKey="goToStorefront"/>
@@ -59,7 +52,7 @@
5952
</actionGroup>
6053
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="openMiniCart"/>
6154
<actionGroup ref="AssertStorefrontMiniCartSubtotalActionGroup" stepKey="assertSubtotal">
62-
<argument name="subtotal" value="$180"/>
55+
<argument name="subtotal" value="$111.10"/>
6356
</actionGroup>
6457
</test>
6558
</tests>

0 commit comments

Comments
 (0)