Skip to content

Commit ae5eb40

Browse files
committed
Merge remote-tracking branch 'origin/MC-37663' into 2.4-develop-pr45
2 parents 23ce613 + b8920b6 commit ae5eb40

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
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="createSimpleProduct">
24+
<field key="price">100.00</field>
25+
</createData>
26+
<createData entity="VirtualProduct" stepKey="createVirtualProduct">
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="createSimpleProduct"/>
40+
</createData>
41+
<createData entity="ApiBundleLink" stepKey="secondLinkOptionToFixedProduct">
42+
<requiredEntity createDataKey="createFixedBundleProduct"/>
43+
<requiredEntity createDataKey="createSecondBundleOption"/>
44+
<requiredEntity createDataKey="createVirtualProduct"/>
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="AdminReindexAndFlushCache" stepKey="reindexAndFlushCache"/>
53+
</before>
54+
<after>
55+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProductForBundleItem"/>
56+
<deleteData createDataKey="createVirtualProduct" stepKey="deleteVirtualProductForBundleItem"/>
57+
<deleteData createDataKey="createFixedBundleProduct" stepKey="deleteBundleProduct"/>
58+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
59+
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearProductsGridFilters"/>
60+
<waitForPageLoad stepKey="waitForClearProductsGridFilters"/>
61+
</after>
62+
<!--Login customer on storefront-->
63+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginCustomer">
64+
<argument name="Customer" value="$$createCustomer$$" />
65+
</actionGroup>
66+
<!--Open Product Page-->
67+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openBundleProductPage">
68+
<argument name="product" value="$createFixedBundleProduct$"/>
69+
</actionGroup>
70+
<!--Add bundle to cart-->
71+
<actionGroup ref="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup" stepKey="clickAddToCart">
72+
<argument name="productUrl" value="$createFixedBundleProduct.name$"/>
73+
</actionGroup>
74+
<actionGroup ref="StorefrontEnterProductQuantityAndAddToTheCartActionGroup" stepKey="enterProductQuantityAndAddToTheCart">
75+
<argument name="quantity" value="1"/>
76+
</actionGroup>
77+
<!--Navigate to checkout-->
78+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="openCheckoutPage"/>
79+
<!--Click next button to open payment section-->
80+
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/>
81+
<!--Click place order-->
82+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="placeOrder"/>
83+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>
84+
<!--Order review page has address that was created during checkout-->
85+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="filterOrdersGridById">
86+
<argument name="orderId" value="{$grabOrderNumber}"/>
87+
</actionGroup>
88+
<!--Create Invoice for this Order-->
89+
<actionGroup ref="StartCreateInvoiceFromOrderPageActionGroup" stepKey="createInvoice"/>
90+
<actionGroup ref="SubmitInvoiceActionGroup" stepKey="submitInvoice"/>
91+
</test>
92+
</tests>

0 commit comments

Comments
 (0)