|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright 2025 Adobe |
| 5 | + * All Rights Reserved. |
| 6 | + */ |
| 7 | +--> |
| 8 | + |
| 9 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="StorefrontVerifyPagerIsPresentOnViewOrderPageForGuestUsingOrdersAndReturnsTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Sales"/> |
| 14 | + <stories value="Pager should be present on view order page if quantity of ordered products exceeds limit"/> |
| 15 | + <title value="Pager should be present on view order page"/> |
| 16 | + <description value="Verify Pager is present on View Order page for Guest using Orders and Returns functionality if qty of ordered products exceeds display limit"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="AC-4415"/> |
| 19 | + <group value="Sales"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <!-- Create simple products --> |
| 23 | + <createData entity="ApiSimpleProduct" stepKey="createProduct1"/> |
| 24 | + <createData entity="ApiSimpleProduct" stepKey="createProduct2"/> |
| 25 | + <createData entity="ApiSimpleProduct" stepKey="createProduct3"/> |
| 26 | + <createData entity="ApiSimpleProduct" stepKey="createProduct4"/> |
| 27 | + <createData entity="ApiSimpleProduct" stepKey="createProduct5"/> |
| 28 | + <createData entity="ApiSimpleProduct" stepKey="createProduct6"/> |
| 29 | + <createData entity="ApiSimpleProduct" stepKey="createProduct7"/> |
| 30 | + <createData entity="ApiSimpleProduct" stepKey="createProduct8"/> |
| 31 | + <createData entity="ApiSimpleProduct" stepKey="createProduct9"/> |
| 32 | + <createData entity="ApiSimpleProduct" stepKey="createProduct10"/> |
| 33 | + <createData entity="ApiSimpleProduct" stepKey="createProduct11"/> |
| 34 | + <createData entity="ApiSimpleProduct" stepKey="createProduct12"/> |
| 35 | + <createData entity="ApiSimpleProduct" stepKey="createProduct13"/> |
| 36 | + <createData entity="ApiSimpleProduct" stepKey="createProduct14"/> |
| 37 | + <createData entity="ApiSimpleProduct" stepKey="createProduct15"/> |
| 38 | + <createData entity="ApiSimpleProduct" stepKey="createProduct16"/> |
| 39 | + <createData entity="ApiSimpleProduct" stepKey="createProduct17"/> |
| 40 | + <createData entity="ApiSimpleProduct" stepKey="createProduct18"/> |
| 41 | + <createData entity="ApiSimpleProduct" stepKey="createProduct19"/> |
| 42 | + <createData entity="ApiSimpleProduct" stepKey="createProduct20"/> |
| 43 | + <createData entity="ApiSimpleProduct" stepKey="createProduct21"/> |
| 44 | + <!-- Pre-condition 1,2: Place an order with 21 products --> |
| 45 | + <createData entity="GuestCart" stepKey="createGuestCart"/> |
| 46 | + <createData entity="SimpleCartItem" stepKey="addCartItem"> |
| 47 | + <requiredEntity createDataKey="createGuestCart"/> |
| 48 | + <requiredEntity createDataKey="createProduct1"/> |
| 49 | + </createData> |
| 50 | + <createData entity="SimpleCartItem" stepKey="addCartItem2"> |
| 51 | + <requiredEntity createDataKey="createGuestCart"/> |
| 52 | + <requiredEntity createDataKey="createProduct2"/> |
| 53 | + </createData> |
| 54 | + <createData entity="SimpleCartItem" stepKey="addCartItem3"> |
| 55 | + <requiredEntity createDataKey="createGuestCart"/> |
| 56 | + <requiredEntity createDataKey="createProduct3"/> |
| 57 | + </createData> |
| 58 | + <createData entity="SimpleCartItem" stepKey="addCartItem4"> |
| 59 | + <requiredEntity createDataKey="createGuestCart"/> |
| 60 | + <requiredEntity createDataKey="createProduct4"/> |
| 61 | + </createData> |
| 62 | + <createData entity="SimpleCartItem" stepKey="addCartItem5"> |
| 63 | + <requiredEntity createDataKey="createGuestCart"/> |
| 64 | + <requiredEntity createDataKey="createProduct5"/> |
| 65 | + </createData> |
| 66 | + <createData entity="SimpleCartItem" stepKey="addCartItem6"> |
| 67 | + <requiredEntity createDataKey="createGuestCart"/> |
| 68 | + <requiredEntity createDataKey="createProduct6"/> |
| 69 | + </createData> |
| 70 | + <createData entity="SimpleCartItem" stepKey="addCartItem7"> |
| 71 | + <requiredEntity createDataKey="createGuestCart"/> |
| 72 | + <requiredEntity createDataKey="createProduct7"/> |
| 73 | + </createData> |
| 74 | + <createData entity="SimpleCartItem" stepKey="addCartItem8"> |
| 75 | + <requiredEntity createDataKey="createGuestCart"/> |
| 76 | + <requiredEntity createDataKey="createProduct8"/> |
| 77 | + </createData> |
| 78 | + <createData entity="SimpleCartItem" stepKey="addCartItem9"> |
| 79 | + <requiredEntity createDataKey="createGuestCart"/> |
| 80 | + <requiredEntity createDataKey="createProduct9"/> |
| 81 | + </createData> |
| 82 | + <createData entity="SimpleCartItem" stepKey="addCartItem10"> |
| 83 | + <requiredEntity createDataKey="createGuestCart"/> |
| 84 | + <requiredEntity createDataKey="createProduct10"/> |
| 85 | + </createData> |
| 86 | + <createData entity="SimpleCartItem" stepKey="addCartItem11"> |
| 87 | + <requiredEntity createDataKey="createGuestCart"/> |
| 88 | + <requiredEntity createDataKey="createProduct11"/> |
| 89 | + </createData> |
| 90 | + <createData entity="SimpleCartItem" stepKey="addCartItem12"> |
| 91 | + <requiredEntity createDataKey="createGuestCart"/> |
| 92 | + <requiredEntity createDataKey="createProduct12"/> |
| 93 | + </createData> |
| 94 | + <createData entity="SimpleCartItem" stepKey="addCartItem13"> |
| 95 | + <requiredEntity createDataKey="createGuestCart"/> |
| 96 | + <requiredEntity createDataKey="createProduct13"/> |
| 97 | + </createData> |
| 98 | + <createData entity="SimpleCartItem" stepKey="addCartItem14"> |
| 99 | + <requiredEntity createDataKey="createGuestCart"/> |
| 100 | + <requiredEntity createDataKey="createProduct14"/> |
| 101 | + </createData> |
| 102 | + <createData entity="SimpleCartItem" stepKey="addCartItem15"> |
| 103 | + <requiredEntity createDataKey="createGuestCart"/> |
| 104 | + <requiredEntity createDataKey="createProduct15"/> |
| 105 | + </createData> |
| 106 | + <createData entity="SimpleCartItem" stepKey="addCartItem16"> |
| 107 | + <requiredEntity createDataKey="createGuestCart"/> |
| 108 | + <requiredEntity createDataKey="createProduct16"/> |
| 109 | + </createData> |
| 110 | + <createData entity="SimpleCartItem" stepKey="addCartItem17"> |
| 111 | + <requiredEntity createDataKey="createGuestCart"/> |
| 112 | + <requiredEntity createDataKey="createProduct17"/> |
| 113 | + </createData> |
| 114 | + <createData entity="SimpleCartItem" stepKey="addCartItem18"> |
| 115 | + <requiredEntity createDataKey="createGuestCart"/> |
| 116 | + <requiredEntity createDataKey="createProduct18"/> |
| 117 | + </createData> |
| 118 | + <createData entity="SimpleCartItem" stepKey="addCartItem19"> |
| 119 | + <requiredEntity createDataKey="createGuestCart"/> |
| 120 | + <requiredEntity createDataKey="createProduct19"/> |
| 121 | + </createData> |
| 122 | + <createData entity="SimpleCartItem" stepKey="addCartItem20"> |
| 123 | + <requiredEntity createDataKey="createGuestCart"/> |
| 124 | + <requiredEntity createDataKey="createProduct20"/> |
| 125 | + </createData> |
| 126 | + <createData entity="SimpleCartItem" stepKey="addCartItem21"> |
| 127 | + <requiredEntity createDataKey="createGuestCart"/> |
| 128 | + <requiredEntity createDataKey="createProduct21"/> |
| 129 | + </createData> |
| 130 | + <createData entity="GuestAddressInformation" stepKey="addGuestOrderAddress"> |
| 131 | + <requiredEntity createDataKey="createGuestCart"/> |
| 132 | + </createData> |
| 133 | + <updateData createDataKey="createGuestCart" entity="GuestOrderPaymentMethod" stepKey="sendGuestPaymentInformation"> |
| 134 | + <requiredEntity createDataKey="createGuestCart"/> |
| 135 | + </updateData> |
| 136 | + </before> |
| 137 | + <after> |
| 138 | + <!-- Delete simple products --> |
| 139 | + <deleteData createDataKey="createProduct1" stepKey="deleteProduct1"/> |
| 140 | + <deleteData createDataKey="createProduct2" stepKey="deleteProduct2"/> |
| 141 | + <deleteData createDataKey="createProduct3" stepKey="deleteProduct3"/> |
| 142 | + <deleteData createDataKey="createProduct4" stepKey="deleteProductT4"/> |
| 143 | + <deleteData createDataKey="createProduct5" stepKey="deleteProduct5"/> |
| 144 | + <deleteData createDataKey="createProduct6" stepKey="deleteProduct6"/> |
| 145 | + <deleteData createDataKey="createProduct7" stepKey="deleteProduct7"/> |
| 146 | + <deleteData createDataKey="createProduct8" stepKey="deleteProduct8"/> |
| 147 | + <deleteData createDataKey="createProduct9" stepKey="deleteProduct9"/> |
| 148 | + <deleteData createDataKey="createProduct10" stepKey="deleteProduct10"/> |
| 149 | + <deleteData createDataKey="createProduct11" stepKey="deleteProduct11"/> |
| 150 | + <deleteData createDataKey="createProduct12" stepKey="deleteProduct12"/> |
| 151 | + <deleteData createDataKey="createProduct13" stepKey="deleteProduct13"/> |
| 152 | + <deleteData createDataKey="createProduct14" stepKey="deleteProduct14"/> |
| 153 | + <deleteData createDataKey="createProduct15" stepKey="deleteProduct15"/> |
| 154 | + <deleteData createDataKey="createProduct16" stepKey="deleteProduct16"/> |
| 155 | + <deleteData createDataKey="createProduct17" stepKey="deleteProduct17"/> |
| 156 | + <deleteData createDataKey="createProduct18" stepKey="deleteProduct18"/> |
| 157 | + <deleteData createDataKey="createProduct19" stepKey="deleteProduct19"/> |
| 158 | + <deleteData createDataKey="createProduct20" stepKey="deleteProduct20"/> |
| 159 | + <deleteData createDataKey="createProduct21" stepKey="deleteProduct21"/> |
| 160 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> |
| 161 | + </after> |
| 162 | + <!-- Get order-id, email --> |
| 163 | + <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> |
| 164 | + <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="onOrderPage"/> |
| 165 | + <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearFilters"/> |
| 166 | + <grabTextFrom selector="{{AdminOrdersGridSection.orderIdByIncrementId($createGuestCart.return$)}}" stepKey="grabOrderNumber"/> |
| 167 | + <actionGroup ref="OpenOrderByIdActionGroup" stepKey="openCreatedOrder"> |
| 168 | + <argument name="orderId" value="{$grabOrderNumber}"/> |
| 169 | + </actionGroup> |
| 170 | + <grabTextFrom selector="{{AdminOrderDetailsInformationSection.customerEmail}}" stepKey="grabEmail"/> |
| 171 | + <!-- Step 1,2: Go to storefront as guest and navigate to: orders and returns page --> |
| 172 | + <actionGroup ref="StorefrontOpenOrdersAndReturnsPageActionGroup" stepKey="goToOrdersAndReturnsPage"/> |
| 173 | + <waitForPageLoad stepKey="waiForStorefrontPage"/> |
| 174 | + <!-- Step 3: Fill the form with address data form and precondition--> |
| 175 | + <actionGroup ref="StorefrontFillOrdersAndReturnsFormByEmailActionGroup" stepKey="fillOrder"> |
| 176 | + <argument name="orderNumber" value="$grabOrderNumber"/> |
| 177 | + <argument name="customer" value="BillingAddressTX"/> |
| 178 | + <argument name="emailId" value="$grabEmail"/> |
| 179 | + </actionGroup> |
| 180 | + <!-- Step 4: Click on the "continue" Button --> |
| 181 | + <click selector="{{StorefrontOrderAndReturnInformationSection.continueButton}}" stepKey="clickContinueButton"/> |
| 182 | + <waitForPageLoad stepKey="waitForPageLoad1"/> |
| 183 | + <!-- Step 4 Assertion: Verify order page is opened, only 20 items present on the first page and pagers (Top and Bottom) and text "Items 1-20 of 21 total" are present --> |
| 184 | + <waitForElementVisible selector="{{StorefrontOrderAndReturnInformationSection.orderPage({$grabOrderNumber})}}" stepKey="verifyOrderPage" /> |
| 185 | + <waitForText userInput="Items 1 to 20 of 21 total" selector="{{StorefrontOrderAndReturnInformationSection.pagerAtTop}}" stepKey="seeTotalProductsAndNumberOfProductsPerPageAtTop"/> |
| 186 | + <waitForText userInput="Items 1 to 20 of 21 total" selector="{{StorefrontOrderAndReturnInformationSection.pagerAtBottom}}" stepKey="seePagerAtBottom"/> |
| 187 | + </test> |
| 188 | +</tests> |
0 commit comments