1
+ <?xml version =" 1.0" ?>
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 =" AdminCreateOrderWithMinimumAmountEnabledTest" >
11
+ <annotations >
12
+ <features value =" Sales" />
13
+ <stories value =" Admin create order" />
14
+ <title value =" Admin order is not restricted by 'Minimum Order Amount' configuration." />
15
+ <description value =" Admin should be able to create an order regardless of the minimum order amount." />
16
+ <severity value =" MAJOR" />
17
+ <testCaseId value =" MAGETWO-92925" />
18
+ <group value =" sales" />
19
+ </annotations >
20
+ <before >
21
+ <createData entity =" EnabledMinimumOrderAmount" stepKey =" enableMinimumOrderAmount" />
22
+ <createData entity =" SimpleSubCategory" stepKey =" createCategory" />
23
+ <createData entity =" SimpleProduct" stepKey =" createProduct" >
24
+ <requiredEntity createDataKey =" createCategory" />
25
+ </createData >
26
+ <actionGroup ref =" LoginAsAdmin" stepKey =" loginAsAdmin" />
27
+ <actionGroup ref =" ClearCacheActionGroup" stepKey =" clearCacheBefore" />
28
+ </before >
29
+ <after >
30
+ <deleteData createDataKey =" createCategory" stepKey =" deleteCategory" />
31
+ <deleteData createDataKey =" createProduct" stepKey =" deleteProduct" />
32
+ <createData entity =" DisabledMinimumOrderAmount" stepKey =" disableMinimumOrderAmount" />
33
+ <actionGroup ref =" ClearCacheActionGroup" stepKey =" clearCacheAfter" />
34
+ <amOnPage url =" {{AdminLogoutPage.url}}" stepKey =" amOnLogoutPage" />
35
+ </after >
36
+
37
+ <!-- Admin creates order-->
38
+ <comment userInput =" Admin creates order" stepKey =" adminCreateOrder" />
39
+ <actionGroup ref =" navigateToNewOrderPageNewCustomerSingleStore" stepKey =" navigateToNewOrderPage" />
40
+
41
+ <actionGroup ref =" addSimpleProductToOrder" stepKey =" addSimpleProductToOrder" >
42
+ <argument name =" product" value =" SimpleProduct" />
43
+ </actionGroup >
44
+
45
+ <!-- Fill customer group information-->
46
+ <selectOption selector =" {{AdminOrderFormAccountSection.group}}" userInput =" {{GeneralCustomerGroup.code}}" stepKey =" selectGroup" />
47
+ <fillField selector =" {{AdminOrderFormAccountSection.email}}" userInput =" {{Simple_US_Customer.email}}" stepKey =" fillEmail" />
48
+
49
+ <!-- Fill customer address information-->
50
+ <actionGroup ref =" fillOrderCustomerInformation" stepKey =" fillCustomerAddress" >
51
+ <argument name =" customer" value =" Simple_US_Customer" />
52
+ <argument name =" address" value =" US_Address_TX" />
53
+ </actionGroup >
54
+
55
+ <actionGroup ref =" orderSelectFlatRateShipping" stepKey =" selectFlatRateShipping" />
56
+
57
+ <!-- Verify totals on Order page-->
58
+ <see selector =" {{AdminOrderFormTotalSection.total('Subtotal')}}" userInput =" ${{AdminOrderSimpleProduct.subtotal}}" stepKey =" seeOrderSubTotal" />
59
+ <see selector =" {{AdminOrderFormTotalSection.total('Shipping')}}" userInput =" ${{AdminOrderSimpleProduct.shipping}}" stepKey =" seeOrderShipping" />
60
+ <see selector =" {{AdminOrderFormTotalSection.grandTotal}}" userInput =" ${{AdminOrderSimpleProduct.grandTotal}}" stepKey =" seeCorrectGrandTotal" />
61
+
62
+ <!-- Submit Order and verify information-->
63
+ <click selector =" {{AdminOrderFormActionSection.SubmitOrder}}" stepKey =" clickSubmitOrder" />
64
+ <seeInCurrentUrl url =" {{AdminOrderDetailsPage.url}}" stepKey =" seeViewOrderPage" />
65
+
66
+ <see selector =" {{AdminOrderDetailsMessagesSection.successMessage}}" userInput =" You created the order." stepKey =" seeSuccessMessage" />
67
+ <see selector =" {{AdminOrderDetailsInformationSection.orderStatus}}" userInput =" Pending" stepKey =" seeOrderPendingStatus" />
68
+ <grabTextFrom selector =" |Order # (\d+)|" stepKey =" orderId" />
69
+ <assertNotEmpty actual =" $orderId" stepKey =" assertOrderIdIsNotEmpty" />
70
+ <actionGroup ref =" verifyBasicOrderInformation" stepKey =" verifyOrderInformation" >
71
+ <argument name =" customer" value =" Simple_US_Customer" />
72
+ <argument name =" shippingAddress" value =" US_Address_TX" />
73
+ <argument name =" billingAddress" value =" US_Address_TX" />
74
+ </actionGroup >
75
+ <actionGroup ref =" seeProductInItemsOrdered" stepKey =" seeSimpleProductInItemsOrdered" >
76
+ <argument name =" product" value =" SimpleProduct" />
77
+ </actionGroup >
78
+ </test >
79
+ </tests >
0 commit comments