|
20 | 20 | <!--Enable flat rate shipping--> |
21 | 21 | <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" |
22 | 22 | stepKey="enableFlatRate"/> |
| 23 | + |
23 | 24 | <createData entity="SimpleSubCategory" stepKey="createCategory"/> |
24 | 25 | <createData entity="SimpleProduct" stepKey="createSimpleProduct"> |
25 | 26 | <field key="price">100.00</field> |
|
28 | 29 |
|
29 | 30 | <!-- Create Customer Account --> |
30 | 31 | <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 32 | + |
| 33 | + <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> |
31 | 34 | </before> |
32 | 35 | <after> |
33 | 36 | <!-- Disable shipping method for customer with default address --> |
|
38 | 41 | <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
39 | 42 | <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
40 | 43 | </after> |
41 | | - <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> |
42 | | - <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="onOrderPage"/> |
43 | | - |
44 | | - <!--Create new order--> |
| 44 | + <!-- Create new order --> |
45 | 45 | <actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="CreateNewOrder"> |
46 | 46 | <argument name="customer" value="Simple_US_Customer"/> |
47 | 47 | </actionGroup> |
48 | | - <waitForPageLoad stepKey="WaitForCreateOrderPage"/> |
| 48 | + <waitForElementVisible stepKey="waitForProductAddVisible" selector="{{AdminOrderFormItemsOrderedSection.addProductsBySku}}"/> |
49 | 49 |
|
50 | | - <!--Click on "Add products by SKU" button > Type SKU > And add it to order with 1 qty value--> |
51 | | - <click selector="{{AdminOrderFormItemsOrderedSection.addProductsBySku}}" stepKey="clickAddProductsBySKUButton"/> |
52 | | - <waitForElementVisible stepKey="waitForElementVisible" selector="{{AdminOrderFormItemsSection.skuNumber('0')}}"/> |
53 | | - <fillField selector="{{AdminOrderFormItemsSection.skuNumber('0')}}" stepKey="typeCreatedProductGroupSKU" |
54 | | - userInput="$$createSimpleProduct.sku$$"/> |
55 | | - <fillField selector="{{AdminOrderFormItemsSection.qty('0')}}" stepKey="setOrderItemQuantity" userInput="1"/> |
56 | | - <pressKey selector="{{AdminOrderFormItemsSection.skuNumber('0')}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::ENTER]" |
57 | | - stepKey="pressKey"/> |
| 50 | + <!-- Add product to order --> |
| 51 | + <actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addProductToOrder"> |
| 52 | + <argument name="product" value="$$createSimpleProduct$$"/> |
| 53 | + <argument name="productQty" value="1"/> |
| 54 | + </actionGroup> |
58 | 55 | <waitForPageLoad stepKey="WaitForProductAdd"/> |
59 | 56 | <waitForLoadingMaskToDisappear stepKey="WaitForProductAddLoading"/> |
60 | 57 |
|
|
0 commit comments