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 =" ../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd" >
10
+ <test name =" AdminCreateOrderWithBundleProductTest" >
11
+ <annotations >
12
+ <title value =" Create Order in Admin and update bundle product configuration" />
13
+ <stories value =" MAGETWO-96488: Wrong price calculation for bundle product on creating order from the admin panel" />
14
+ <description value =" Add bundle product with bundle option items with default quantity 2 to order in Admin and check price in product grid" />
15
+ <features value =" Sales" />
16
+ <severity value =" AVERAGE" />
17
+ <group value =" Sales" />
18
+ </annotations >
19
+
20
+ <before >
21
+ <!-- Set default flat rate shipping method settings-->
22
+ <createData entity =" FlatRateShippingMethodDefault" stepKey =" setDefaultFlatRateShippingMethod" />
23
+
24
+ <!-- Create simple customer-->
25
+ <createData entity =" Simple_US_Customer_CA" stepKey =" simpleCustomer" />
26
+
27
+ <!-- Create simple product 1-->
28
+ <createData entity =" ApiProductWithDescription" stepKey =" simple1" before =" simple2" />
29
+
30
+ <!-- Create simple product 2-->
31
+ <createData entity =" ApiProductWithDescription" stepKey =" simple2" before =" product" />
32
+
33
+ <!-- Create bundle product with checkbox bundle option-->
34
+ <createData entity =" ApiBundleProduct" stepKey =" product" />
35
+ <createData entity =" CheckboxOption" stepKey =" bundleOption" >
36
+ <requiredEntity createDataKey =" product" />
37
+ </createData >
38
+
39
+ <!-- Link simple product 1 to bundle option with default quantity 2-->
40
+ <createData entity =" ApiBundleLink" stepKey =" createBundleLink1" >
41
+ <requiredEntity createDataKey =" product" />
42
+ <requiredEntity createDataKey =" bundleOption" />
43
+ <requiredEntity createDataKey =" simple1" />
44
+ <field key =" qty" >2</field >
45
+ <field key =" is_default" >1</field >
46
+ </createData >
47
+
48
+ <!-- Link simple product 2 to bundle option with default quantity 2-->
49
+ <createData entity =" ApiBundleLink" stepKey =" createBundleLink2" >
50
+ <requiredEntity createDataKey =" product" />
51
+ <requiredEntity createDataKey =" bundleOption" />
52
+ <requiredEntity createDataKey =" simple2" />
53
+ <field key =" qty" >2</field >
54
+ <field key =" is_default" >1</field >
55
+ </createData >
56
+ <actionGroup ref =" LoginAsAdmin" stepKey =" loginAsAdmin" />
57
+ </before >
58
+
59
+ <!-- Create new customer order-->
60
+ <actionGroup ref =" navigateToNewOrderPageExistingCustomer" stepKey =" navigateToNewOrderWithExistingCustomer" >
61
+ <argument name =" customer" value =" $$simpleCustomer$$" />
62
+ </actionGroup >
63
+
64
+ <!-- Add bundle product to order and check product price in grid-->
65
+ <actionGroup ref =" addBundleProductToOrderAndCheckPriceInGrid" stepKey =" addBundleProductToOrder" >
66
+ <argument name =" product" value =" $$product$$" />
67
+ <argument name =" quantity" value =" 1" />
68
+ <argument name =" price" value =" $492.00" />
69
+ </actionGroup >
70
+
71
+ <!-- Select FlatRate shipping method-->
72
+ <actionGroup ref =" orderSelectFlatRateShipping" stepKey =" orderSelectFlatRateShippingMethod" />
73
+
74
+ <!-- Submit order-->
75
+ <click selector =" {{AdminOrderFormActionSection.SubmitOrder}}" stepKey =" submitOrder" />
76
+
77
+ <!-- Verify order information-->
78
+ <actionGroup ref =" verifyCreatedOrderInformation" stepKey =" verifyCreatedOrderInformation" />
79
+
80
+ <after >
81
+ <actionGroup ref =" logout" stepKey =" logout" />
82
+
83
+ <deleteData createDataKey =" product" stepKey =" delete" />
84
+ <deleteData createDataKey =" simpleCustomer" stepKey =" deleteSimpleCustomer" />
85
+ <deleteData createDataKey =" simple1" stepKey =" deleteSimple1" before =" deleteSimple2" />
86
+ <deleteData createDataKey =" simple2" stepKey =" deleteSimple2" before =" delete" />
87
+ </after >
88
+ </test >
89
+ </tests >
0 commit comments