|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright © Magento, Inc. All rights reserved. |
| 5 | + * See COPYING.txt for license details. |
| 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="StorefrontOrderPagerDisplayedTest"> |
| 12 | + <annotations> |
| 13 | + <stories value="Storefront order pager"/> |
| 14 | + <title value="Pager is displayed for 21 order items"/> |
| 15 | + <description value="Pager is displayed for 21 order items"/> |
| 16 | + <severity value="CRITICAL"/> |
| 17 | + <testCaseId value="MC-16167"/> |
| 18 | + <group value="sales"/> |
| 19 | + <group value="mtf_migrated"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> |
| 23 | + <!-- 21 products created and category --> |
| 24 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 25 | + <createData entity="SimpleProduct" stepKey="createProduct01"> |
| 26 | + <requiredEntity createDataKey="createCategory"/> |
| 27 | + </createData> |
| 28 | + <createData entity="SimpleProduct" stepKey="createProduct02"> |
| 29 | + <requiredEntity createDataKey="createCategory"/> |
| 30 | + </createData> |
| 31 | + <createData entity="SimpleProduct" stepKey="createProduct03"> |
| 32 | + <requiredEntity createDataKey="createCategory"/> |
| 33 | + </createData> |
| 34 | + <createData entity="SimpleProduct" stepKey="createProduct04"> |
| 35 | + <requiredEntity createDataKey="createCategory"/> |
| 36 | + </createData> |
| 37 | + <createData entity="_defaultProduct" stepKey="createProduct05"> |
| 38 | + <requiredEntity createDataKey="createCategory"/> |
| 39 | + </createData> |
| 40 | + <createData entity="_defaultProduct" stepKey="createProduct06"> |
| 41 | + <requiredEntity createDataKey="createCategory"/> |
| 42 | + </createData> |
| 43 | + <createData entity="_defaultProduct" stepKey="createProduct07"> |
| 44 | + <requiredEntity createDataKey="createCategory"/> |
| 45 | + </createData> |
| 46 | + <createData entity="_defaultProduct" stepKey="createProduct08"> |
| 47 | + <requiredEntity createDataKey="createCategory"/> |
| 48 | + </createData> |
| 49 | + <createData entity="_defaultProduct" stepKey="createProduct09"> |
| 50 | + <requiredEntity createDataKey="createCategory"/> |
| 51 | + </createData> |
| 52 | + <createData entity="SimpleProduct" stepKey="createProduct10"> |
| 53 | + <requiredEntity createDataKey="createCategory"/> |
| 54 | + </createData> |
| 55 | + <createData entity="SimpleProduct" stepKey="createProduct11"> |
| 56 | + <requiredEntity createDataKey="createCategory"/> |
| 57 | + </createData> |
| 58 | + <createData entity="SimpleProduct" stepKey="createProduct12"> |
| 59 | + <requiredEntity createDataKey="createCategory"/> |
| 60 | + </createData> |
| 61 | + <createData entity="ApiSimpleProduct" stepKey="createProduct13"> |
| 62 | + <requiredEntity createDataKey="createCategory"/> |
| 63 | + </createData> |
| 64 | + <createData entity="ApiSimpleProduct" stepKey="createProduct14"> |
| 65 | + <requiredEntity createDataKey="createCategory"/> |
| 66 | + </createData> |
| 67 | + <createData entity="ApiSimpleProduct" stepKey="createProduct15"> |
| 68 | + <requiredEntity createDataKey="createCategory"/> |
| 69 | + </createData> |
| 70 | + <createData entity="ApiSimpleProduct" stepKey="createProduct16"> |
| 71 | + <requiredEntity createDataKey="createCategory"/> |
| 72 | + </createData> |
| 73 | + <createData entity="ApiSimpleProduct" stepKey="createProduct17"> |
| 74 | + <requiredEntity createDataKey="createCategory"/> |
| 75 | + </createData> |
| 76 | + <createData entity="ApiSimpleProduct" stepKey="createProduct18"> |
| 77 | + <requiredEntity createDataKey="createCategory"/> |
| 78 | + </createData> |
| 79 | + <createData entity="ApiSimpleProduct" stepKey="createProduct19"> |
| 80 | + <requiredEntity createDataKey="createCategory"/> |
| 81 | + </createData> |
| 82 | + <createData entity="ApiSimpleProduct" stepKey="createProduct20"> |
| 83 | + <requiredEntity createDataKey="createCategory"/> |
| 84 | + </createData> |
| 85 | + <createData entity="SimpleProduct" stepKey="createProduct21"> |
| 86 | + <requiredEntity createDataKey="createCategory"/> |
| 87 | + </createData> |
| 88 | + |
| 89 | + <!-- Customer is created --> |
| 90 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 91 | + |
| 92 | + </before> |
| 93 | + <after> |
| 94 | + <!-- Delete category and products --> |
| 95 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 96 | + <deleteData createDataKey="createProduct01" stepKey="deleteProduct1"/> |
| 97 | + <deleteData createDataKey="createProduct02" stepKey="deleteProduct2"/> |
| 98 | + <deleteData createDataKey="createProduct03" stepKey="deleteProduct3"/> |
| 99 | + <deleteData createDataKey="createProduct04" stepKey="deleteProduct4"/> |
| 100 | + <deleteData createDataKey="createProduct05" stepKey="deleteProduct5"/> |
| 101 | + <deleteData createDataKey="createProduct06" stepKey="deleteProduct6"/> |
| 102 | + <deleteData createDataKey="createProduct07" stepKey="deleteProduct7"/> |
| 103 | + <deleteData createDataKey="createProduct08" stepKey="deleteProduct8"/> |
| 104 | + <deleteData createDataKey="createProduct09" stepKey="deleteProduct9"/> |
| 105 | + <deleteData createDataKey="createProduct10" stepKey="deleteProduct10"/> |
| 106 | + <deleteData createDataKey="createProduct11" stepKey="deleteProduct11"/> |
| 107 | + <deleteData createDataKey="createProduct12" stepKey="deleteProduct12"/> |
| 108 | + <deleteData createDataKey="createProduct13" stepKey="deleteProduct13"/> |
| 109 | + <deleteData createDataKey="createProduct14" stepKey="deleteProduct14"/> |
| 110 | + <deleteData createDataKey="createProduct15" stepKey="deleteProduct15"/> |
| 111 | + <deleteData createDataKey="createProduct16" stepKey="deleteProduct16"/> |
| 112 | + <deleteData createDataKey="createProduct17" stepKey="deleteProduct17"/> |
| 113 | + <deleteData createDataKey="createProduct18" stepKey="deleteProduct18"/> |
| 114 | + <deleteData createDataKey="createProduct19" stepKey="deleteProduct19"/> |
| 115 | + <deleteData createDataKey="createProduct20" stepKey="deleteProduct20"/> |
| 116 | + <deleteData createDataKey="createProduct21" stepKey="deleteProduct21"/> |
| 117 | + |
| 118 | + <!-- Delete Customer --> |
| 119 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 120 | + <actionGroup ref="logout" stepKey="logout"/> |
| 121 | + </after> |
| 122 | + |
| 123 | + <!-- Login to Storefront as Customer --> |
| 124 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> |
| 125 | + <argument name="Customer" value="$$createCustomer$$" /> |
| 126 | + </actionGroup> |
| 127 | + |
| 128 | + <!-- Customer placed the order with 20 products --> |
| 129 | + <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onCategoryPage"/> |
| 130 | + <waitForPageLoad stepKey="waitForPageLoad"/> |
| 131 | + <scrollTo selector="{{StorefrontCategoryMainSection.perPage}}" stepKey="scrollToLimiter"/> |
| 132 | + <selectOption userInput="30" selector="{{StorefrontCategoryMainSection.perPage}}" stepKey="selectLimitOnPage"/> |
| 133 | + <waitForPageLoad stepKey="waitForLoadProducts"/> |
| 134 | + <scrollToTopOfPage stepKey="scrollToTopOfPage"/> |
| 135 | + |
| 136 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct1"> |
| 137 | + <argument name="productName" value="$$createProduct01.name$$"/> |
| 138 | + </actionGroup> |
| 139 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct2"> |
| 140 | + <argument name="productName" value="$$createProduct02.name$$"/> |
| 141 | + </actionGroup> |
| 142 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct3"> |
| 143 | + <argument name="productName" value="$$createProduct03.name$$"/> |
| 144 | + </actionGroup> |
| 145 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct4"> |
| 146 | + <argument name="productName" value="$$createProduct04.name$$"/> |
| 147 | + </actionGroup> |
| 148 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct5"> |
| 149 | + <argument name="productName" value="$$createProduct05.name$$"/> |
| 150 | + </actionGroup> |
| 151 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct6"> |
| 152 | + <argument name="productName" value="$$createProduct06.name$$"/> |
| 153 | + </actionGroup> |
| 154 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct7"> |
| 155 | + <argument name="productName" value="$$createProduct07.name$$"/> |
| 156 | + </actionGroup> |
| 157 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct8"> |
| 158 | + <argument name="productName" value="$$createProduct08.name$$"/> |
| 159 | + </actionGroup> |
| 160 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct9"> |
| 161 | + <argument name="productName" value="$$createProduct09.name$$"/> |
| 162 | + </actionGroup> |
| 163 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct10"> |
| 164 | + <argument name="productName" value="$$createProduct10.name$$"/> |
| 165 | + </actionGroup> |
| 166 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct11"> |
| 167 | + <argument name="productName" value="$$createProduct11.name$$"/> |
| 168 | + </actionGroup> |
| 169 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct12"> |
| 170 | + <argument name="productName" value="$$createProduct12.name$$"/> |
| 171 | + </actionGroup> |
| 172 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct13"> |
| 173 | + <argument name="productName" value="$$createProduct13.name$$"/> |
| 174 | + </actionGroup> |
| 175 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct14"> |
| 176 | + <argument name="productName" value="$$createProduct14.name$$"/> |
| 177 | + </actionGroup> |
| 178 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct15"> |
| 179 | + <argument name="productName" value="$$createProduct15.name$$"/> |
| 180 | + </actionGroup> |
| 181 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct16"> |
| 182 | + <argument name="productName" value="$$createProduct16.name$$"/> |
| 183 | + </actionGroup> |
| 184 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct17"> |
| 185 | + <argument name="productName" value="$$createProduct17.name$$"/> |
| 186 | + </actionGroup> |
| 187 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct18"> |
| 188 | + <argument name="productName" value="$$createProduct18.name$$"/> |
| 189 | + </actionGroup> |
| 190 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct19"> |
| 191 | + <argument name="productName" value="$$createProduct19.name$$"/> |
| 192 | + </actionGroup> |
| 193 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct20"> |
| 194 | + <argument name="productName" value="$$createProduct20.name$$"/> |
| 195 | + </actionGroup> |
| 196 | + <actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct21"> |
| 197 | + <argument name="productName" value="$$createProduct21.name$$"/> |
| 198 | + </actionGroup> |
| 199 | + |
| 200 | + <!-- Place Order --> |
| 201 | + <actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="onCheckout"/> |
| 202 | + <see userInput="21" selector="{{CheckoutOrderSummarySection.itemsQtyInCart}}" stepKey="see21Products"/> |
| 203 | + <click selector="{{CheckoutShippingSection.next}}" stepKey="clickNextButton"/> |
| 204 | + <waitForLoadingMaskToDisappear stepKey="waitForCheckoutLoad"/> |
| 205 | + <click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="placeOrder"/> |
| 206 | + <waitForPageLoad stepKey="waitForSuccess"/> |
| 207 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> |
| 208 | + |
| 209 | + <!-- Go to My Account > My Orders page --> |
| 210 | + <amOnPage url="{{StorefrontCustomerDashboardPage.url}}" stepKey="onMyAccount"/> |
| 211 | + <waitForPageLoad stepKey="waitForAccountPage"/> |
| 212 | + <click selector="{{StorefrontCustomerSidebarSection.sidebarTab('My Orders')}}" stepKey="clickOnMyOrders"/> |
| 213 | + <waitForPageLoad stepKey="waitForOrdersLoad"/> |
| 214 | + |
| 215 | + <!-- Click 'View Order' link on order from preconditions --> |
| 216 | + <click selector="{{StorefrontCustomerOrdersGridSection.orderView({$grabOrderNumber})}}" stepKey="clickOrderView"/> |
| 217 | + <waitForPageLoad stepKey="waitForOrderPageLoad"/> |
| 218 | + |
| 219 | + <!-- Assert: Pager is displayed for 21 order items --> |
| 220 | + <seeElement selector="{{StorefrontCustomerOrderViewSection.pager}}" stepKey="assertPagerIsDisplayed"/> |
| 221 | + </test> |
| 222 | +</tests> |
0 commit comments