|
19 | 19 | <group value="mtf_migrated"/> |
20 | 20 | </annotations> |
21 | 21 | <before> |
22 | | - <!-- Login as admin --> |
23 | 22 | <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> |
24 | | - |
25 | | - <!-- Create customer --> |
26 | 23 | <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
27 | | - |
28 | | - <!-- Create simple product --> |
29 | 24 | <createData entity="SimpleProduct2" stepKey="createSimpleProduct"> |
30 | 25 | <field key="price">100</field> |
31 | 26 | </createData> |
32 | | - |
33 | | - <!-- Enable payment method --> |
34 | 27 | <magentoCLI command="config:set {{BankTransferEnableConfigData.path}} {{BankTransferEnableConfigData.value}}" stepKey="enableBankTransfer"/> |
35 | 28 | </before> |
36 | 29 | <after> |
37 | | - <!-- Disable payment method --> |
38 | 30 | <magentoCLI command="config:set {{BankTransferDisabledConfigData.path}} {{BankTransferDisabledConfigData.value}}" stepKey="enableBankTransfer"/> |
39 | | - |
40 | | - <!-- Logout customer --> |
41 | 31 | <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogoutStorefront"/> |
42 | | - |
43 | | - <!-- Delete customer --> |
44 | 32 | <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
45 | | - |
46 | | - <!-- Delete product --> |
47 | 33 | <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
48 | | - |
49 | | - <!-- Log out --> |
50 | 34 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
51 | 35 | </after> |
52 | 36 |
|
53 | | - <!-- Create order --> |
54 | 37 | <actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="goToCreateOrderPage"> |
55 | 38 | <argument name="customer" value="$$createCustomer$$"/> |
56 | 39 | </actionGroup> |
57 | | - |
58 | | - <!-- Add product to order --> |
59 | 40 | <actionGroup ref="AddSimpleProductWithQtyToOrderActionGroup" stepKey="addProductToOrder"> |
60 | 41 | <argument name="product" value="$$createSimpleProduct$$"/> |
61 | 42 | <argument name="productQty" value="2"/> |
62 | 43 | </actionGroup> |
63 | | - |
64 | | - <!-- Select bank transfer payment method --> |
65 | 44 | <actionGroup ref="SelectBankTransferPaymentMethodActionGroup" stepKey="selectPaymentMethod"/> |
66 | | - |
67 | | - <!-- Select shipping method --> |
68 | 45 | <actionGroup ref="AdminClickGetShippingMethodsAndRatesActionGroup" stepKey="openShippingMethod"/> |
69 | 46 | <comment userInput="Adding the comment to replace action for preserving Backward Compatibility" stepKey="waitForShippingMethods"/> |
70 | 47 | <actionGroup ref="AdminSelectFixedShippingMethodActionGroup" stepKey="chooseShippingMethod"/> |
71 | 48 | <comment userInput="Adding the comment to replace action for preserving Backward Compatibility" stepKey="waitForShippingMethodLoad"/> |
72 | | - |
73 | | - <!-- Submit order --> |
74 | 49 | <actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/> |
75 | 50 |
|
76 | | - <!-- Grab order id --> |
77 | 51 | <comment userInput="BIC workaround" stepKey="getOrderId"/> |
78 | 52 | <grabTextFrom selector="|Order # (\d+)|" stepKey="orderNumber"/> |
79 | 53 | <grabFromCurrentUrl regex="~/order_id/(\d+)/~" stepKey="orderId"/> |
80 | 54 |
|
81 | | - <!-- Open created order --> |
82 | 55 | <comment userInput="BIC workaround" stepKey="goToOrdersPage"/> |
83 | 56 | <comment userInput="BIC workaround" stepKey="filterOrdersGridById"/> |
84 | 57 | <comment userInput="BIC workaround" stepKey="clickCreatedOrderInGrid"/> |
85 | 58 | <actionGroup ref="AdminOpenOrderByEntityIdActionGroup" stepKey="openOrder1"> |
86 | 59 | <argument name="entityId" value="{$orderId}"/> |
87 | 60 | </actionGroup> |
88 | 61 |
|
89 | | - <!-- Go to invoice tab and fill data --> |
90 | 62 | <actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickInvoiceAction"/> |
91 | | - <fillField selector="{{AdminOrderInvoiceViewSection.invoiceQty}}" userInput="1" stepKey="fillInvoiceQuantity"/> |
92 | | - <click selector="{{AdminOrderInvoiceViewSection.updateInvoiceBtn}}" stepKey="clickUpdateQtyInvoiceBtn"/> |
93 | | - <fillField selector="{{AdminInvoiceTotalSection.invoiceComment}}" userInput="comment" stepKey="writeComment"/> |
| 63 | + <actionGroup ref="AdminFillQtyToInvoiceOnCreateInvoicePageActionGroup" stepKey="fillInvoiceQuantity"/> |
| 64 | + <actionGroup ref="AdminClickUpdateQtysButtonOnCreateInvoicePageActionGroup" stepKey="clickUpdateQtyInvoiceBtn"/> |
| 65 | + <actionGroup ref="AdminFillInvoiceCommentsFieldOnCreateInvoicePageActionGroup" stepKey="writeComment"/> |
94 | 66 | <actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoice"/> |
95 | | - |
96 | | - <!-- Assert invoice with shipment success message --> |
97 | 67 | <see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The invoice has been created." stepKey="seeSuccessMessage"/> |
98 | 68 |
|
99 | | - <!-- Assert invoice in invoices grid --> |
100 | 69 | <actionGroup ref="FilterInvoiceGridByOrderIdWithCleanFiltersActionGroup" stepKey="filterInvoiceGridByOrderId"> |
101 | 70 | <argument name="orderId" value="$orderNumber"/> |
102 | 71 | </actionGroup> |
103 | | - <click selector="{{AdminInvoicesGridSection.firstRow}}" stepKey="opeCreatedInvoice"/> |
104 | | - <waitForPageLoad stepKey="waitForInvoiceDetailsPageToLoad"/> |
| 72 | + <actionGroup ref="AdminSelectFirstGridRowActionGroup" stepKey="opeCreatedInvoice"/> |
| 73 | + <comment userInput="Adding the comment to replace action for preserving Backward Compatibility" stepKey="waitForInvoiceDetailsPageToLoad"/> |
105 | 74 | <grabFromCurrentUrl regex="~/invoice_id/(\d+)/~" stepKey="grabInvoiceId"/> |
106 | | - |
107 | | - <!-- Assert invoice in invoices tab --> |
108 | 75 | <comment userInput="BIC workaround" stepKey="goToOrders"/> |
109 | 76 | <comment userInput="BIC workaround" stepKey="filterOrderGridByIdForAssertingInvoiceBtn"/> |
110 | 77 | <comment userInput="BIC workaround" stepKey="clickOrderInGrid"/> |
111 | 78 | <actionGroup ref="AdminOpenOrderByEntityIdActionGroup" stepKey="openOrder2"> |
112 | 79 | <argument name="entityId" value="{$orderId}"/> |
113 | 80 | </actionGroup> |
114 | | - <click selector="{{AdminOrderDetailsMainActionsSection.invoiceTab}}" stepKey="clickInvoicesTabOrdersPage"/> |
115 | | - <conditionalClick selector="{{AdminOrderInvoicesTabSection.clearFilters}}" dependentSelector="{{AdminOrderInvoicesTabSection.clearFilters}}" visible="true" stepKey="clearInvoiceFilters"/> |
116 | | - <click selector="{{AdminOrderInvoicesTabSection.filters}}" stepKey="openOrderInvoicesGridFilters"/> |
117 | | - <fillField selector="{{AdminOrderInvoicesTabSection.invoiceId}}" userInput="$grabInvoiceId" stepKey="fillInvoiceIdFilter"/> |
118 | | - <fillField selector="{{AdminOrderInvoicesTabSection.amountFrom}}" userInput="110.00" stepKey="fillAmountFromFilter"/> |
119 | | - <fillField selector="{{AdminOrderInvoicesTabSection.amountTo}}" userInput="110.00" stepKey="fillAmountToFilter"/> |
120 | | - <click selector="{{AdminOrderInvoicesTabSection.applyFilters}}" stepKey="clickOrderApplyFilters"/> |
| 81 | + <actionGroup ref="AdminOpenInvoiceTabFromOrderPageActionGroup" stepKey="clickInvoicesTabOrdersPage"/> |
| 82 | + <actionGroup ref="AdminGridFilterResetActionGroup" stepKey="clearInvoiceFilters"/> |
| 83 | + <comment userInput="Adding the comment to replace action for preserving Backward Compatibility" stepKey="openOrderInvoicesGridFilters"/> |
| 84 | + <actionGroup ref="AdminGridFilterFillFieldBySelectorActionGroup" stepKey="fillInvoiceIdFilter"> |
| 85 | + <argument name="selector" value="{{AdminOrderInvoicesTabSection.invoiceId}}"/> |
| 86 | + <argument name="filterValue" value="$grabInvoiceId"/> |
| 87 | + </actionGroup> |
| 88 | + <actionGroup ref="AdminGridFilterFillFieldBySelectorActionGroup" stepKey="fillAmountFromFilter"> |
| 89 | + <argument name="selector" value="{{AdminOrderInvoicesTabSection.amountFrom}}"/> |
| 90 | + <argument name="filterValue" value="110.00"/> |
| 91 | + </actionGroup> |
| 92 | + <actionGroup ref="AdminGridFilterFillFieldBySelectorActionGroup" stepKey="fillAmountToFilter"> |
| 93 | + <argument name="selector" value="{{AdminOrderInvoicesTabSection.amountTo}}"/> |
| 94 | + <argument name="filterValue" value="110.00"/> |
| 95 | + </actionGroup> |
| 96 | + <actionGroup ref="AdminClickSearchInGridActionGroup" stepKey="clickOrderApplyFilters"/> |
121 | 97 | <dontSeeElement selector="{{AdminDataGridTableSection.dataGridEmpty}}" stepKey="assertThatInvoiceGridNotEmpty"/> |
122 | | - |
123 | | - <!-- Assert invoice items --> |
| 98 | + |
124 | 99 | <actionGroup ref="FilterInvoiceGridByOrderIdWithCleanFiltersActionGroup" stepKey="filterInvoiceByOrderId"> |
125 | 100 | <argument name="orderId" value="$orderNumber"/> |
126 | 101 | </actionGroup> |
127 | | - <click selector="{{AdminInvoicesGridSection.firstRow}}" stepKey="openInvoice"/> |
| 102 | + <actionGroup ref="AdminSelectFirstGridRowActionGroup" stepKey="openInvoice"/> |
128 | 103 | <waitForPageLoad stepKey="waitForInvoicePageToLoad"/> |
129 | 104 | <see selector="{{AdminInvoiceTotalSection.itemName}}" userInput="$$createSimpleProduct.name$$" stepKey="seeProductNameInInvoiceItems"/> |
130 | 105 | <see selector="{{AdminInvoiceTotalSection.itemQty}}" userInput="1" stepKey="seeProductQtyInInvoiceItems"/> |
131 | 106 | <see selector="{{AdminInvoiceTotalSection.itemTotalPrice}}" userInput="$$createSimpleProduct.price$$" stepKey="seeProductTotalPriceInInvoiceItems"/> |
132 | 107 |
|
133 | | - <!-- Login as customer --> |
134 | 108 | <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> |
135 | 109 | <argument name="Customer" value="$$createCustomer$$"/> |
136 | 110 | </actionGroup> |
137 | | - <waitForPageLoad stepKey="waitForCustomerLogin"/> |
138 | | - |
139 | | - <!-- Open My Account > My Orders --> |
| 111 | + <comment userInput="Adding the comment to replace action for preserving Backward Compatibility" stepKey="waitForCustomerLogin"/> |
140 | 112 | <actionGroup ref="StorefrontOpenMyAccountPageActionGroup" stepKey="goToMyAccountPage"/> |
141 | 113 | <actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="goToSidebarMenu"> |
142 | 114 | <argument name="menu" value="My Orders"/> |
143 | 115 | </actionGroup> |
144 | | - |
145 | | - <!-- Assert invoiced amount on frontend --> |
146 | | - <click selector="{{StorefrontCustomerOrderSection.viewOrder}}" stepKey="clickViewOrder"/> |
| 116 | + <actionGroup ref="StorefrontClickViewOrderLinkOnMyOrdersPageActionGroup" stepKey="clickViewOrder"/> |
147 | 117 | <dontSeeElement selector="{{StorefrontOrderDetailsSection.orderDateTagElement}}" stepKey="dontSeeDateTag"/> |
148 | | - <click selector="{{StorefrontOrderInvoicesSection.invoiceTab}}" stepKey="clickInvoiceTabOnStorefront"/> |
| 118 | + <actionGroup ref="StorefrontOpenInvoiceTabActionGroup" stepKey="clickInvoiceTabOnStorefront"/> |
149 | 119 | <see selector="{{StorefrontOrderInvoicesSection.grandTotalPrice}}" userInput="$110.00" stepKey="seePrice"/> |
150 | 120 | </test> |
151 | 121 | </tests> |
0 commit comments