|
20 | 20 | <group value="sales"/>
|
21 | 21 | </annotations>
|
22 | 22 | <before>
|
23 |
| - <!--Create product--> |
24 | 23 | <createData entity="SimpleProduct2" stepKey="createSimpleProduct"/>
|
25 |
| - <!--Create customer--> |
| 24 | + |
26 | 25 | <createData entity="Simple_US_CA_Customer" stepKey="createCustomer"/>
|
27 |
| - <!--Login to admin page--> |
| 26 | + |
| 27 | + <createData entity="CustomerCart" stepKey="createCustomerCart"> |
| 28 | + <requiredEntity createDataKey="createCustomer"/> |
| 29 | + </createData> |
| 30 | + |
| 31 | + <createData entity="CustomerCartItem" stepKey="addCartItem"> |
| 32 | + <requiredEntity createDataKey="createCustomerCart"/> |
| 33 | + <requiredEntity createDataKey="createSimpleProduct"/> |
| 34 | + </createData> |
| 35 | + |
| 36 | + <createData entity="CustomerAddressInformation" stepKey="addCustomerOrderAddress"> |
| 37 | + <requiredEntity createDataKey="createCustomerCart"/> |
| 38 | + </createData> |
| 39 | + |
| 40 | + <updateData createDataKey="createCustomerCart" entity="CustomerOrderPaymentMethod" stepKey="sendCustomerPaymentInformation"> |
| 41 | + <requiredEntity createDataKey="createCustomerCart"/> |
| 42 | + </updateData> |
| 43 | + |
| 44 | + <createData entity="Invoice" stepKey="invoiceOrderOne"> |
| 45 | + <requiredEntity createDataKey="createCustomerCart"/> |
| 46 | + </createData> |
| 47 | + |
28 | 48 | <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
|
29 | 49 | </before>
|
30 | 50 | <after>
|
31 |
| - <!--Delete simple product--> |
32 | 51 | <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
|
33 |
| - <!--Delete customer--> |
34 | 52 | <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
|
35 | 53 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
|
36 | 54 | </after>
|
37 | 55 |
|
38 |
| - <actionGroup ref="CreateOrderActionGroup" stepKey="createOrder"> |
39 |
| - <argument name="product" value="$$createSimpleProduct$$"/> |
40 |
| - <argument name="customer" value="$$createCustomer$$"/> |
| 56 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="createOrder"/> |
| 57 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="grabOrderId"/> |
| 58 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="startCreateInvoice"/> |
| 59 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="submitInvoice"/> |
| 60 | + |
| 61 | + <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="onOrderPage"/> |
| 62 | + <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearFilters"/> |
| 63 | + <grabTextFrom selector="{{AdminOrdersGridSection.orderIdByIncrementId($createCustomerCart.return$)}}" stepKey="getOrderId"/> |
| 64 | + <actionGroup ref="OpenOrderByIdActionGroup" stepKey="filterOrdersGridById"> |
| 65 | + <argument name="orderId" value="{$getOrderId}"/> |
41 | 66 | </actionGroup>
|
42 |
| - <grabFromCurrentUrl regex="~/order_id/(\d+)/~" stepKey="grabOrderId"/> |
43 |
| - <!--Create invoice--> |
44 |
| - <actionGroup ref="StartCreateInvoiceFromOrderPageActionGroup" stepKey="startCreateInvoice"/> |
45 |
| - <!--Submit invoice--> |
46 |
| - <actionGroup ref="SubmitInvoiceActionGroup" stepKey="submitInvoice"/> |
47 | 67 |
|
48 |
| - <!--Create Credit Memo--> |
49 | 68 | <actionGroup ref="StartToCreateCreditMemoActionGroup" stepKey="startToCreateCreditMemo">
|
50 |
| - <argument name="orderId" value="{$grabOrderId}"/> |
| 69 | + <argument name="orderId" value="{$getOrderId}"/> |
51 | 70 | </actionGroup>
|
52 | 71 | <fillField selector="{{AdminCreditMemoTotalSection.refundShipping}}" userInput="0" stepKey="setRefundShipping"/>
|
53 | 72 | <actionGroup ref="UpdateCreditMemoTotalsActionGroup" stepKey="updateCreditMemoTotals"/>
|
54 | 73 | <actionGroup ref="SubmitCreditMemoActionGroup" stepKey="submitCreditMemo"/>
|
55 | 74 |
|
56 |
| - <!--Go to Credit Memo tab--> |
57 | 75 | <click selector="{{AdminOrderDetailsOrderViewSection.creditMemos}}" stepKey="clickCreditMemosTab"/>
|
58 | 76 | <waitForPageLoad stepKey="waitForCreditMemosGridToLoad"/>
|
59 | 77 |
|
60 |
| - <!--Check refunded total --> |
61 | 78 | <see selector="{{AdminOrderCreditMemosTabSection.gridRow('1')}}" userInput="$123" stepKey="seeCreditMemoInGrid"/>
|
62 | 79 | </test>
|
63 | 80 | </tests>
|
0 commit comments