|
20 | 20 | <group value="mtf_migrated"/>
|
21 | 21 | </annotations>
|
22 | 22 | <before>
|
23 |
| - <!-- Login as admin --> |
24 | 23 | <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
|
25 | 24 |
|
26 |
| - <!-- Create customer --> |
27 | 25 | <createData entity="Simple_US_CA_Customer" stepKey="createCustomer"/>
|
28 |
| - |
29 |
| - <!-- Create product --> |
30 | 26 | <createData entity="SimpleProduct2" stepKey="createProduct"/>
|
| 27 | + |
| 28 | + <createData entity="CustomerCart" stepKey="createCustomerCart"> |
| 29 | + <requiredEntity createDataKey="createCustomer"/> |
| 30 | + </createData> |
| 31 | + <createData entity="CustomerCartItem" stepKey="addCartItem"> |
| 32 | + <requiredEntity createDataKey="createCustomerCart"/> |
| 33 | + <requiredEntity createDataKey="createProduct"/> |
| 34 | + </createData> |
| 35 | + <createData entity="CustomerAddressInformation" stepKey="addCustomerOrderAddress"> |
| 36 | + <requiredEntity createDataKey="createCustomerCart"/> |
| 37 | + </createData> |
| 38 | + <updateData createDataKey="createCustomerCart" entity="CustomerOrderPaymentMethod" stepKey="submitOrder"> |
| 39 | + <requiredEntity createDataKey="createCustomerCart"/> |
| 40 | + </updateData> |
31 | 41 | </before>
|
32 | 42 | <after>
|
33 |
| - <!-- Delete created data --> |
34 | 43 | <deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
|
35 | 44 | <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
|
36 | 45 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logOut"/>
|
37 | 46 | </after>
|
38 | 47 |
|
39 |
| - <!-- Create order --> |
40 |
| - <actionGroup ref="CreateOrderActionGroup" stepKey="createOrder"> |
41 |
| - <argument name="product" value="$$createProduct$$"/> |
42 |
| - <argument name="customer" value="$$createCustomer$$"/> |
43 |
| - </actionGroup> |
44 |
| - |
45 |
| - <!-- Search and open customer --> |
| 48 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="createOrder"/> |
| 49 | + |
46 | 50 | <actionGroup ref="AdminOpenCustomerEditPageActionGroup" stepKey="openCustomerEditPage">
|
47 | 51 | <argument name="customerId" value="$createCustomer.id$"/>
|
48 | 52 | </actionGroup>
|
49 | 53 | <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="filterCreatedCustomer"/>
|
50 | 54 | <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickEditButton"/>
|
51 | 55 |
|
52 |
| - <!-- Click create order --> |
53 |
| - <click selector="{{AdminCustomerMainActionsSection.createOrderBtn}}" stepKey="clickCreateOrder"/> |
54 |
| - |
55 |
| - <!-- Select product in Last Ordered Items section --> |
56 |
| - <click selector="{{AdminCustomerActivitiesLastOrderedSection.addProductToOrder($$createProduct.name$$)}}" stepKey="addProductToOrder"/> |
57 |
| - |
58 |
| - <!-- Click Update Changes --> |
| 56 | + <actionGroup ref="AdminClickCreateOrderButtonOnEditCustomerPageActionGroup" stepKey="clickCreateOrder"/> |
| 57 | + |
| 58 | + <actionGroup ref="AdminCheckLastOrderedProductOnCustomerEditPageActionGroup" stepKey="addProductToOrder"> |
| 59 | + <argument name="productName" value="$$createProduct.name$$"/> |
| 60 | + </actionGroup> |
| 61 | + |
59 | 62 | <actionGroup ref="AdminClickUpdateChangesOnCreateOrderPageActionGroup" stepKey="clickUpdateChangesBtn"/>
|
60 | 63 |
|
61 |
| - <!-- Assert product in items ordered grid --> |
62 |
| - <see selector="{{AdminCustomerCreateNewOrderSection.gridCell('1', 'Product')}}" userInput="$$createProduct.name$$" stepKey="seeProductName"/> |
63 |
| - <see selector="{{AdminCustomerCreateNewOrderSection.gridCell('1', 'Price')}}" userInput="$$createProduct.price$$" stepKey="seeProductPrice"/> |
| 64 | + <actionGroup ref="AdminSeeProductInItemsOrderedGridOnCreateOrderPageActionGroup" stepKey="seeProductName"> |
| 65 | + <argument name="expectedValue" value="$$createProduct.name$$"/> |
| 66 | + </actionGroup> |
| 67 | + <actionGroup ref="AdminSeeProductInItemsOrderedGridOnCreateOrderPageActionGroup" stepKey="seeProductPrice"> |
| 68 | + <argument name="columnName" value="Price"/> |
| 69 | + <argument name="expectedValue" value="$$createProduct.price$$"/> |
| 70 | + </actionGroup> |
| 71 | + |
64 | 72 | </test>
|
65 | 73 | </tests>
|
0 commit comments