Skip to content

Commit 75fb041

Browse files
ENGCOM-9280: [MFTF] Refactoring StorefrontOrderPagerIsAbsentTest #33683
- Merge Pull Request #33683 from AnnaAPak/magento2:ref-StorefrontOrderPagerIsAbsentTest - Merged commits: 1. 3235565 2. ef78413 3. c6f29a8 4. b0e9c83
2 parents 177254d + b0e9c83 commit 75fb041

File tree

1 file changed

+118
-89
lines changed

1 file changed

+118
-89
lines changed

app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml

Lines changed: 118 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
<group value="mtf_migrated"/>
2020
</annotations>
2121
<before>
22-
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
23-
<!-- 20 products created and category -->
22+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="LoginAsAdmin"/>
23+
2424
<createData entity="_defaultCategory" stepKey="createCategory"/>
2525
<createData entity="SimpleProduct" stepKey="createProduct01">
2626
<requiredEntity createDataKey="createCategory"/>
@@ -83,12 +83,10 @@
8383
<requiredEntity createDataKey="createCategory"/>
8484
</createData>
8585

86-
<!-- Customer is created -->
8786
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
8887

8988
</before>
9089
<after>
91-
<!-- Delete category and products -->
9290
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
9391
<deleteData createDataKey="createProduct01" stepKey="deleteProduct1"/>
9492
<deleteData createDataKey="createProduct02" stepKey="deleteProduct2"/>
@@ -111,103 +109,134 @@
111109
<deleteData createDataKey="createProduct19" stepKey="deleteProduct19"/>
112110
<deleteData createDataKey="createProduct20" stepKey="deleteProduct20"/>
113111

114-
<!-- Delete Customer -->
115112
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
116113
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
117114
</after>
118-
119-
<!-- Login to Storefront as Customer -->
115+
120116
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer">
121117
<argument name="Customer" value="$$createCustomer$$" />
122118
</actionGroup>
119+
120+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="onCategoryPage"/>
121+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageLoad"/>
122+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="scrollToLimiter"/>
123+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectLimitOnPage"/>
124+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForLoadProducts"/>
125+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="scrollToTopOfPage"/>
123126

124-
<!-- Customer placed the order with 20 products -->
125-
<amOnPage url="{{StorefrontCategoryPage.url($$createCategory.custom_attributes[url_key]$$)}}" stepKey="onCategoryPage"/>
126-
<waitForPageLoad stepKey="waitForPageLoad"/>
127-
<scrollTo selector="{{StorefrontCategoryMainSection.perPage}}" stepKey="scrollToLimiter"/>
128-
<selectOption userInput="36" selector="{{StorefrontCategoryMainSection.perPage}}" stepKey="selectLimitOnPage"/>
129-
<waitForPageLoad stepKey="waitForLoadProducts"/>
130-
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
127+
<createData entity="CustomerCart" stepKey="createCustomerCart">
128+
<requiredEntity createDataKey="createCustomer"/>
129+
</createData>
130+
<createData entity="CustomerCartItem" stepKey="addProduct1">
131+
<requiredEntity createDataKey="createCustomerCart"/>
132+
<requiredEntity createDataKey="createProduct01"/>
133+
</createData>
134+
<createData entity="CustomerCartItem" stepKey="addProduct2">
135+
<requiredEntity createDataKey="createCustomerCart"/>
136+
<requiredEntity createDataKey="createProduct02"/>
137+
</createData>
138+
<createData entity="CustomerCartItem" stepKey="addProduct3">
139+
<requiredEntity createDataKey="createCustomerCart"/>
140+
<requiredEntity createDataKey="createProduct03"/>
141+
</createData>
142+
<createData entity="CustomerCartItem" stepKey="addProduct4">
143+
<requiredEntity createDataKey="createCustomerCart"/>
144+
<requiredEntity createDataKey="createProduct04"/>
145+
</createData>
146+
<createData entity="CustomerCartItem" stepKey="addProduct5">
147+
<requiredEntity createDataKey="createCustomerCart"/>
148+
<requiredEntity createDataKey="createProduct05"/>
149+
</createData>
150+
<createData entity="CustomerCartItem" stepKey="addProduct6">
151+
<requiredEntity createDataKey="createCustomerCart"/>
152+
<requiredEntity createDataKey="createProduct06"/>
153+
</createData>
154+
<createData entity="CustomerCartItem" stepKey="addProduct7">
155+
<requiredEntity createDataKey="createCustomerCart"/>
156+
<requiredEntity createDataKey="createProduct07"/>
157+
</createData>
158+
<createData entity="CustomerCartItem" stepKey="addProduct8">
159+
<requiredEntity createDataKey="createCustomerCart"/>
160+
<requiredEntity createDataKey="createProduct08"/>
161+
</createData>
162+
<createData entity="CustomerCartItem" stepKey="addProduct9">
163+
<requiredEntity createDataKey="createCustomerCart"/>
164+
<requiredEntity createDataKey="createProduct09"/>
165+
</createData>
166+
<createData entity="CustomerCartItem" stepKey="addProduct10">
167+
<requiredEntity createDataKey="createCustomerCart"/>
168+
<requiredEntity createDataKey="createProduct10"/>
169+
</createData>
170+
<createData entity="CustomerCartItem" stepKey="addProduct11">
171+
<requiredEntity createDataKey="createCustomerCart"/>
172+
<requiredEntity createDataKey="createProduct11"/>
173+
</createData>
174+
<createData entity="CustomerCartItem" stepKey="addProduct12">
175+
<requiredEntity createDataKey="createCustomerCart"/>
176+
<requiredEntity createDataKey="createProduct12"/>
177+
</createData>
178+
<createData entity="CustomerCartItem" stepKey="addProduct13">
179+
<requiredEntity createDataKey="createCustomerCart"/>
180+
<requiredEntity createDataKey="createProduct13"/>
181+
</createData>
182+
<createData entity="CustomerCartItem" stepKey="addProduct14">
183+
<requiredEntity createDataKey="createCustomerCart"/>
184+
<requiredEntity createDataKey="createProduct14"/>
185+
</createData>
186+
<createData entity="CustomerCartItem" stepKey="addProduct15">
187+
<requiredEntity createDataKey="createCustomerCart"/>
188+
<requiredEntity createDataKey="createProduct15"/>
189+
</createData>
190+
<createData entity="CustomerCartItem" stepKey="addProduct16">
191+
<requiredEntity createDataKey="createCustomerCart"/>
192+
<requiredEntity createDataKey="createProduct16"/>
193+
</createData>
194+
<createData entity="CustomerCartItem" stepKey="addProduct17">
195+
<requiredEntity createDataKey="createCustomerCart"/>
196+
<requiredEntity createDataKey="createProduct17"/>
197+
</createData>
198+
<createData entity="CustomerCartItem" stepKey="addProduct18">
199+
<requiredEntity createDataKey="createCustomerCart"/>
200+
<requiredEntity createDataKey="createProduct18"/>
201+
</createData>
202+
<createData entity="CustomerCartItem" stepKey="addProduct19">
203+
<requiredEntity createDataKey="createCustomerCart"/>
204+
<requiredEntity createDataKey="createProduct19"/>
205+
</createData>
206+
<createData entity="CustomerCartItem" stepKey="addProduct20">
207+
<requiredEntity createDataKey="createCustomerCart"/>
208+
<requiredEntity createDataKey="createProduct20"/>
209+
</createData>
210+
211+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="onCheckout"/>
212+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="see20Products"/>
213+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickNextButton"/>
131214

132-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct1">
133-
<argument name="productName" value="$$createProduct01.name$$"/>
134-
</actionGroup>
135-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct2">
136-
<argument name="productName" value="$$createProduct02.name$$"/>
137-
</actionGroup>
138-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct3">
139-
<argument name="productName" value="$$createProduct03.name$$"/>
140-
</actionGroup>
141-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct4">
142-
<argument name="productName" value="$$createProduct04.name$$"/>
143-
</actionGroup>
144-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct5">
145-
<argument name="productName" value="$$createProduct05.name$$"/>
146-
</actionGroup>
147-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct6">
148-
<argument name="productName" value="$$createProduct06.name$$"/>
149-
</actionGroup>
150-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct7">
151-
<argument name="productName" value="$$createProduct07.name$$"/>
152-
</actionGroup>
153-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct8">
154-
<argument name="productName" value="$$createProduct08.name$$"/>
155-
</actionGroup>
156-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct9">
157-
<argument name="productName" value="$$createProduct09.name$$"/>
158-
</actionGroup>
159-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct10">
160-
<argument name="productName" value="$$createProduct10.name$$"/>
161-
</actionGroup>
162-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct11">
163-
<argument name="productName" value="$$createProduct11.name$$"/>
164-
</actionGroup>
165-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct12">
166-
<argument name="productName" value="$$createProduct12.name$$"/>
167-
</actionGroup>
168-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct13">
169-
<argument name="productName" value="$$createProduct13.name$$"/>
170-
</actionGroup>
171-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct14">
172-
<argument name="productName" value="$$createProduct14.name$$"/>
173-
</actionGroup>
174-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct15">
175-
<argument name="productName" value="$$createProduct15.name$$"/>
176-
</actionGroup>
177-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct16">
178-
<argument name="productName" value="$$createProduct16.name$$"/>
179-
</actionGroup>
180-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct17">
181-
<argument name="productName" value="$$createProduct17.name$$"/>
182-
</actionGroup>
183-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct18">
184-
<argument name="productName" value="$$createProduct18.name$$"/>
185-
</actionGroup>
186-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct19">
187-
<argument name="productName" value="$$createProduct19.name$$"/>
188-
</actionGroup>
189-
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct20">
190-
<argument name="productName" value="$$createProduct20.name$$"/>
191-
</actionGroup>
215+
<createData entity="CustomerAddressInformation" stepKey="addCustomerOrderAddress">
216+
<requiredEntity createDataKey="createCustomerCart"/>
217+
</createData>
192218

193-
<!-- Place Order -->
194-
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="onCheckout"/>
195-
<see userInput="20" selector="{{CheckoutOrderSummarySection.itemsQtyInCart}}" stepKey="see20Products"/>
196-
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNextButton"/>
197-
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="placeOrder"/>
198-
<waitForPageLoad stepKey="waitForSuccess"/>
199-
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>
219+
<updateData createDataKey="createCustomerCart" entity="CustomerOrderPaymentMethod" stepKey="placeOrder">
220+
<requiredEntity createDataKey="createCustomerCart"/>
221+
</updateData>
200222

201-
<!-- Go to My Account > My Orders page -->
202-
<actionGroup ref="StorefrontOpenMyAccountPageActionGroup" stepKey="onMyAccount"/>
203-
<click selector="{{StorefrontCustomerSidebarSection.sidebarTab('My Orders')}}" stepKey="clickOnMyOrders"/>
204-
<waitForPageLoad stepKey="waitForOrdersLoad"/>
223+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSuccess"/>
224+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="grabOrderNumber"/>
225+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="onMyAccount"/>
226+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickOnMyOrders"/>
227+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForOrdersLoad"/>
228+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickOrderView"/>
229+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForOrderPageLoad"/>
205230

206-
<!-- Click 'View Order' link on order from preconditions -->
207-
<click selector="{{StorefrontCustomerOrdersGridSection.orderView({$grabOrderNumber})}}" stepKey="clickOrderView"/>
208-
<waitForPageLoad stepKey="waitForOrderPageLoad"/>
231+
<getData entity="GetOrderData" stepKey="getOrderData">
232+
<requiredEntity createDataKey="createCustomerCart"/>
233+
</getData>
234+
235+
<actionGroup ref="StorefrontGoToCustomerOrderDetailsPageActionGroup" stepKey="openOrderDetailPage">
236+
<argument name="orderId" value="$createCustomerCart.return$"/>
237+
<argument name="orderNumber" value="$getOrderData.increment_id$"/>
238+
</actionGroup>
209239

210-
<!-- Assert: Order items pager hidden on frontend -->
211240
<dontSeeElement selector="{{StorefrontCustomerOrderViewSection.pager}}" stepKey="assertPagerIsAbsent"/>
212241
</test>
213242
</tests>

0 commit comments

Comments
 (0)