|
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 |
| - |
76 |
| - <!-- Grab order id --> |
77 | 50 | <grabTextFrom selector="|Order # (\d+)|" stepKey="getOrderId"/>
|
78 | 51 |
|
79 |
| - <!-- Open created order --> |
80 | 52 | <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="goToOrdersPage"/>
|
81 | 53 | <actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrdersGridById">
|
82 | 54 | <argument name="orderId" value="$getOrderId"/>
|
83 | 55 | </actionGroup>
|
84 |
| - <click selector="{{AdminDataGridTableSection.firstRow}}" stepKey="clickCreatedOrderInGrid"/> |
85 |
| - |
86 |
| - <!-- Go to invoice tab and fill data --> |
| 56 | + <actionGroup ref="AdminSelectFirstGridRowActionGroup" stepKey="clickCreatedOrderInGrid"/> |
87 | 57 | <actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickInvoiceAction"/>
|
88 |
| - <fillField selector="{{AdminOrderInvoiceViewSection.invoiceQty}}" userInput="1" stepKey="fillInvoiceQuantity"/> |
89 |
| - <click selector="{{AdminOrderInvoiceViewSection.updateInvoiceBtn}}" stepKey="clickUpdateQtyInvoiceBtn"/> |
90 |
| - <fillField selector="{{AdminInvoiceTotalSection.invoiceComment}}" userInput="comment" stepKey="writeComment"/> |
| 58 | + <actionGroup ref="AdminFillQtyToInvoiceOnCreateInvoicePageActionGroup" stepKey="fillInvoiceQuantity"/> |
| 59 | + <actionGroup ref="AdminClickUpdateQtysButtonOnCreateInvoicePageActionGroup" stepKey="clickUpdateQtyInvoiceBtn"/> |
| 60 | + <actionGroup ref="AdminFillInvoiceCommentsFieldOnCreateInvoicePageActionGroup" stepKey="writeComment"/> |
91 | 61 | <actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoice"/>
|
92 |
| - |
93 |
| - <!-- Assert invoice with shipment success message --> |
94 | 62 | <see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The invoice has been created." stepKey="seeSuccessMessage"/>
|
95 | 63 |
|
96 |
| - <!-- Assert invoice in invoices grid --> |
97 | 64 | <actionGroup ref="FilterInvoiceGridByOrderIdWithCleanFiltersActionGroup" stepKey="filterInvoiceGridByOrderId">
|
98 | 65 | <argument name="orderId" value="$getOrderId"/>
|
99 | 66 | </actionGroup>
|
100 |
| - <click selector="{{AdminInvoicesGridSection.firstRow}}" stepKey="opeCreatedInvoice"/> |
101 |
| - <waitForPageLoad stepKey="waitForInvoiceDetailsPageToLoad"/> |
| 67 | + <actionGroup ref="AdminSelectFirstGridRowActionGroup" stepKey="opeCreatedInvoice"/> |
| 68 | + <comment userInput="Adding the comment to replace action for preserving Backward Compatibility" stepKey="waitForInvoiceDetailsPageToLoad"/> |
102 | 69 | <grabFromCurrentUrl regex="~/invoice_id/(\d+)/~" stepKey="grabInvoiceId"/>
|
103 |
| - |
104 |
| - <!-- Assert invoice in invoices tab --> |
105 | 70 | <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="goToOrders"/>
|
106 | 71 | <actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderGridByIdForAssertingInvoiceBtn">
|
107 | 72 | <argument name="orderId" value="$getOrderId"/>
|
108 | 73 | </actionGroup>
|
109 |
| - <click selector="{{AdminDataGridTableSection.firstRow}}" stepKey="clickOrderInGrid"/> |
110 |
| - <click selector="{{AdminOrderDetailsMainActionsSection.invoiceTab}}" stepKey="clickInvoicesTabOrdersPage"/> |
111 |
| - <conditionalClick selector="{{AdminOrderInvoicesTabSection.clearFilters}}" dependentSelector="{{AdminOrderInvoicesTabSection.clearFilters}}" visible="true" stepKey="clearInvoiceFilters"/> |
112 |
| - <click selector="{{AdminOrderInvoicesTabSection.filters}}" stepKey="openOrderInvoicesGridFilters"/> |
113 |
| - <fillField selector="{{AdminOrderInvoicesTabSection.invoiceId}}" userInput="$grabInvoiceId" stepKey="fillInvoiceIdFilter"/> |
114 |
| - <fillField selector="{{AdminOrderInvoicesTabSection.amountFrom}}" userInput="110.00" stepKey="fillAmountFromFilter"/> |
115 |
| - <fillField selector="{{AdminOrderInvoicesTabSection.amountTo}}" userInput="110.00" stepKey="fillAmountToFilter"/> |
116 |
| - <click selector="{{AdminOrderInvoicesTabSection.applyFilters}}" stepKey="clickOrderApplyFilters"/> |
| 74 | + <actionGroup ref="AdminSelectFirstGridRowActionGroup" stepKey="clickOrderInGrid"/> |
| 75 | + <actionGroup ref="AdminOpenInvoiceTabFromOrderPageActionGroup" stepKey="clickInvoicesTabOrdersPage"/> |
| 76 | + <actionGroup ref="AdminGridFilterResetActionGroup" stepKey="clearInvoiceFilters"/> |
| 77 | + <comment userInput="Adding the comment to replace action for preserving Backward Compatibility" stepKey="openOrderInvoicesGridFilters"/> |
| 78 | + <actionGroup ref="AdminGridFilterFillFieldBySelectorActionGroup" stepKey="fillInvoiceIdFilter"> |
| 79 | + <argument name="selector" value="{{AdminOrderInvoicesTabSection.invoiceId}}"/> |
| 80 | + <argument name="filterValue" value="$grabInvoiceId"/> |
| 81 | + </actionGroup> |
| 82 | + <actionGroup ref="AdminGridFilterFillFieldBySelectorActionGroup" stepKey="fillAmountFromFilter"> |
| 83 | + <argument name="selector" value="{{AdminOrderInvoicesTabSection.amountFrom}}"/> |
| 84 | + <argument name="filterValue" value="110.00"/> |
| 85 | + </actionGroup> |
| 86 | + <actionGroup ref="AdminGridFilterFillFieldBySelectorActionGroup" stepKey="fillAmountToFilter"> |
| 87 | + <argument name="selector" value="{{AdminOrderInvoicesTabSection.amountTo}}"/> |
| 88 | + <argument name="filterValue" value="110.00"/> |
| 89 | + </actionGroup> |
| 90 | + <actionGroup ref="AdminClickSearchInGridActionGroup" stepKey="clickOrderApplyFilters"/> |
117 | 91 | <dontSeeElement selector="{{AdminDataGridTableSection.dataGridEmpty}}" stepKey="assertThatInvoiceGridNotEmpty"/>
|
118 |
| - |
119 |
| - <!-- Assert invoice items --> |
| 92 | + |
120 | 93 | <actionGroup ref="FilterInvoiceGridByOrderIdWithCleanFiltersActionGroup" stepKey="filterInvoiceByOrderId">
|
121 | 94 | <argument name="orderId" value="$getOrderId"/>
|
122 | 95 | </actionGroup>
|
123 |
| - <click selector="{{AdminInvoicesGridSection.firstRow}}" stepKey="openInvoice"/> |
| 96 | + <actionGroup ref="AdminSelectFirstGridRowActionGroup" stepKey="openInvoice"/> |
124 | 97 | <waitForPageLoad stepKey="waitForInvoicePageToLoad"/>
|
125 | 98 | <see selector="{{AdminInvoiceTotalSection.itemName}}" userInput="$$createSimpleProduct.name$$" stepKey="seeProductNameInInvoiceItems"/>
|
126 | 99 | <see selector="{{AdminInvoiceTotalSection.itemQty}}" userInput="1" stepKey="seeProductQtyInInvoiceItems"/>
|
127 | 100 | <see selector="{{AdminInvoiceTotalSection.itemTotalPrice}}" userInput="$$createSimpleProduct.price$$" stepKey="seeProductTotalPriceInInvoiceItems"/>
|
128 | 101 |
|
129 |
| - <!-- Login as customer --> |
130 | 102 | <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
|
131 | 103 | <argument name="Customer" value="$$createCustomer$$"/>
|
132 | 104 | </actionGroup>
|
133 |
| - <waitForPageLoad stepKey="waitForCustomerLogin"/> |
134 |
| - |
135 |
| - <!-- Open My Account > My Orders --> |
| 105 | + <comment userInput="Adding the comment to replace action for preserving Backward Compatibility" stepKey="waitForCustomerLogin"/> |
136 | 106 | <actionGroup ref="StorefrontOpenMyAccountPageActionGroup" stepKey="goToMyAccountPage"/>
|
137 | 107 | <actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="goToSidebarMenu">
|
138 | 108 | <argument name="menu" value="My Orders"/>
|
139 | 109 | </actionGroup>
|
140 |
| - |
141 |
| - <!-- Assert invoiced amount on frontend --> |
142 |
| - <click selector="{{StorefrontCustomerOrderSection.viewOrder}}" stepKey="clickViewOrder"/> |
| 110 | + <actionGroup ref="StorefrontClickViewOrderLinkOnMyOrdersPageActionGroup" stepKey="clickViewOrder"/> |
143 | 111 | <dontSeeElement selector="{{StorefrontOrderDetailsSection.orderDateTagElement}}" stepKey="dontSeeDateTag"/>
|
144 |
| - <click selector="{{StorefrontOrderInvoicesSection.invoiceTab}}" stepKey="clickInvoiceTabOnStorefront"/> |
| 112 | + <actionGroup ref="StorefrontOpenInvoiceTabActionGroup" stepKey="clickInvoiceTabOnStorefront"/> |
145 | 113 | <see selector="{{StorefrontOrderInvoicesSection.grandTotalPrice}}" userInput="$110.00" stepKey="seePrice"/>
|
146 | 114 | </test>
|
147 | 115 | </tests>
|
0 commit comments