Skip to content

Commit 5bd9efb

Browse files
MC-37663: Cannot invoice orders which contain bundle products comprised of physical and virtual products
1 parent a1e5689 commit 5bd9efb

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
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" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
9+
<test name="StorefrontBundlePlaceOrderWithVirtualAndSimpleChildrenTest">
10+
<annotations>
11+
<features value="Bundle"/>
12+
<stories value="Bundle product placing order"/>
13+
<title value="Admin should be able to invoice order for the bundle product with virtual and simple products in options"/>
14+
<description value="Place order for bundle product and create invoice"/>
15+
<severity value="MAJOR"/>
16+
<testCaseId value="MC-38683"/>
17+
<useCaseId value="MC-37663"/>
18+
<group value="Bundle"/>
19+
</annotations>
20+
<before>
21+
<createData entity="CustomerEntityOne" stepKey="createCustomer"/>
22+
<!--Create bundle product with fixed price with simple and virtual products in options-->
23+
<createData entity="SimpleProduct2" stepKey="createProductForBundleItem1">
24+
<field key="price">100.00</field>
25+
</createData>
26+
<createData entity="VirtualProduct" stepKey="createProductForBundleItem2">
27+
<field key="price">50.00</field>
28+
</createData>
29+
<createData entity="ApiFixedBundleProduct" stepKey="createFixedBundleProduct"/>
30+
<createData entity="DropDownBundleOption" stepKey="createFirstBundleOption">
31+
<requiredEntity createDataKey="createFixedBundleProduct"/>
32+
</createData>
33+
<createData entity="DropDownBundleOption" stepKey="createSecondBundleOption">
34+
<requiredEntity createDataKey="createFixedBundleProduct"/>
35+
</createData>
36+
<createData entity="ApiBundleLink" stepKey="firstLinkOptionToFixedProduct">
37+
<requiredEntity createDataKey="createFixedBundleProduct"/>
38+
<requiredEntity createDataKey="createFirstBundleOption"/>
39+
<requiredEntity createDataKey="createProductForBundleItem1"/>
40+
</createData>
41+
<createData entity="ApiBundleLink" stepKey="secondLinkOptionToFixedProduct">
42+
<requiredEntity createDataKey="createFixedBundleProduct"/>
43+
<requiredEntity createDataKey="createSecondBundleOption"/>
44+
<requiredEntity createDataKey="createProductForBundleItem2"/>
45+
</createData>
46+
<actionGroup stepKey="loginToAdminPanel" ref="AdminLoginActionGroup"/>
47+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage">
48+
<argument name="productId" value="$$createFixedBundleProduct.id$$"/>
49+
</actionGroup>
50+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
51+
<!--Perform reindex and flush cache-->
52+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
53+
<argument name="indices" value=""/>
54+
</actionGroup>
55+
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
56+
<argument name="tags" value=""/>
57+
</actionGroup>
58+
</before>
59+
<after>
60+
<deleteData createDataKey="createProductForBundleItem1" stepKey="deleteProductForBundleItem1"/>
61+
<deleteData createDataKey="createProductForBundleItem2" stepKey="deleteProductForBundleItem2"/>
62+
<deleteData createDataKey="createFixedBundleProduct" stepKey="deleteBundleProduct"/>
63+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
64+
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearProductsGridFilters"/>
65+
<waitForPageLoad stepKey="waitForClearProductsGridFilters"/>
66+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
67+
</after>
68+
<!--Login customer on storefront-->
69+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginCustomer">
70+
<argument name="Customer" value="$$createCustomer$$" />
71+
</actionGroup>
72+
<!--Open Product Page-->
73+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openBundleProductPage">
74+
<argument name="product" value="$createFixedBundleProduct$"/>
75+
</actionGroup>
76+
<!-- Add bundle to cart -->
77+
<actionGroup ref="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup" stepKey="clickAddToCart">
78+
<argument name="productUrl" value="$$createFixedBundleProduct.name$$"/>
79+
</actionGroup>
80+
<actionGroup ref="StorefrontEnterProductQuantityAndAddToTheCartActionGroup" stepKey="enterProductQuantityAndAddToTheCart">
81+
<argument name="quantity" value="1"/>
82+
</actionGroup>
83+
<!--Navigate to checkout-->
84+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="openCheckoutPage"/>
85+
<!--Click next button to open payment section-->
86+
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/>
87+
<!--Click place order-->
88+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="placeOrder"/>
89+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>
90+
<!--Order review page has address that was created during checkout-->
91+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="filterOrdersGridById">
92+
<argument name="orderId" value="{$grabOrderNumber}"/>
93+
</actionGroup>
94+
<!--Create Invoice for this Order-->
95+
<actionGroup ref="StartCreateInvoiceFromOrderPageActionGroup" stepKey="createInvoice"/>
96+
<actionGroup ref="SubmitInvoiceActionGroup" stepKey="submitInvoice"/>
97+
</test>
98+
</tests>

0 commit comments

Comments
 (0)