|
| 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="AdminGridPageNumberSetsToOneAfterNewSearchTest"> |
| 12 | + |
| 13 | + <annotations> |
| 14 | + <features value="Catalog"/> |
| 15 | + <stories value="Catalog grid"/> |
| 16 | + <title value="Checking Catalog grid page number after entering a new search keyword"/> |
| 17 | + <description value="Checking Catalog grid page number after entering a new search keyword"/> |
| 18 | + <severity value="MINOR"/> |
| 19 | + <testCaseId value="MC-xxxxx"/> |
| 20 | + <useCaseId value="MC-38787"/> |
| 21 | + <group value="Catalog"/> |
| 22 | + </annotations> |
| 23 | + |
| 24 | + <before> |
| 25 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 26 | + <comment userInput="Clear product grid" stepKey="commentClearProductGrid"/> |
| 27 | + <actionGroup ref="AdminProductCatalogPageOpenActionGroup" stepKey="goToProductCatalog"/> |
| 28 | + <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridToDefaultView"/> |
| 29 | + <actionGroup ref="DeleteProductsIfTheyExistActionGroup" stepKey="deleteProductIfTheyExist"/> |
| 30 | + <createData stepKey="category1" entity="SimpleSubCategory"/> |
| 31 | + |
| 32 | + <createData stepKey="simpleProduct1" entity="SimpleProduct"> |
| 33 | + <requiredEntity createDataKey="category1"/> |
| 34 | + </createData> |
| 35 | + <createData stepKey="simpleProduct2" entity="SimpleProduct"> |
| 36 | + <requiredEntity createDataKey="category1"/> |
| 37 | + </createData> |
| 38 | + <createData stepKey="simpleProduct3" entity="SimpleProduct"> |
| 39 | + <requiredEntity createDataKey="category1"/> |
| 40 | + </createData> |
| 41 | + <createData stepKey="simpleProduct4" entity="SimpleProduct"> |
| 42 | + <requiredEntity createDataKey="category1"/> |
| 43 | + </createData> |
| 44 | + <createData stepKey="virtualProduct1" entity="VirtualProduct"> |
| 45 | + <requiredEntity createDataKey="category1"/> |
| 46 | + </createData> |
| 47 | + <createData stepKey="virtualProduct2" entity="VirtualProduct"> |
| 48 | + <requiredEntity createDataKey="category1"/> |
| 49 | + </createData> |
| 50 | + <createData stepKey="virtualProduct3" entity="VirtualProduct"> |
| 51 | + <requiredEntity createDataKey="category1"/> |
| 52 | + </createData> |
| 53 | + </before> |
| 54 | + |
| 55 | + <after> |
| 56 | + <actionGroup ref="AdminProductCatalogPageOpenActionGroup" stepKey="goToProductCatalog"/> |
| 57 | + <actionGroup ref="AdminDataGridDeleteCustomPerPageActionGroup" stepKey="deleteCustomAddedPerPage"> |
| 58 | + <argument name="perPage" value="ProductPerPage.productCount"/> |
| 59 | + </actionGroup> |
| 60 | + <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearFilters"/> |
| 61 | + |
| 62 | + <deleteData stepKey="deleteCategory1" createDataKey="category1"/> |
| 63 | + |
| 64 | + <deleteData stepKey="deleteSimpleProduct1" createDataKey="simpleProduct1"/> |
| 65 | + <deleteData stepKey="deleteSimpleProduct2" createDataKey="simpleProduct2"/> |
| 66 | + <deleteData stepKey="deleteSimpleProduct3" createDataKey="simpleProduct3"/> |
| 67 | + <deleteData stepKey="deleteSimpleProduct4" createDataKey="simpleProduct4"/> |
| 68 | + <deleteData stepKey="deleteVirtualProduct1" createDataKey="virtualProduct1"/> |
| 69 | + <deleteData stepKey="deleteVirtualProduct2" createDataKey="virtualProduct2"/> |
| 70 | + <deleteData stepKey="deleteVirtualProduct3" createDataKey="virtualProduct3"/> |
| 71 | + |
| 72 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 73 | + </after> |
| 74 | + |
| 75 | + <actionGroup ref="AdminProductCatalogPageOpenActionGroup" stepKey="goToProductCatalog"/> |
| 76 | + |
| 77 | + <actionGroup ref="AdminDataGridSelectCustomPerPageActionGroup" stepKey="select1ProductPerPage"> |
| 78 | + <argument name="perPage" value="ProductPerPage.productCount"/> |
| 79 | + </actionGroup> |
| 80 | + |
| 81 | + <actionGroup ref="SearchProductGridByStringNoClearActionGroup" stepKey="searchForSimpleProduct"> |
| 82 | + <argument name="keyword" value="SimpleProduct"/> |
| 83 | + </actionGroup> |
| 84 | + |
| 85 | + <comment userInput="Go to the next page" stepKey="nextPage"/> |
| 86 | + <click selector="{{AdminDataGridPaginationSection.nextPage}}" stepKey="clickNextPageProductGrid"/> |
| 87 | + <seeInField selector="{{AdminDataGridPaginationSection.currentPage}}" userInput="2" stepKey="seeOnSecondPageProductGrid"/> |
| 88 | + |
| 89 | + <actionGroup ref="SearchProductGridByStringNoClearActionGroup" stepKey="searchForVirtualProduct"> |
| 90 | + <argument name="keyword" value="VirtualProduct"/> |
| 91 | + </actionGroup> |
| 92 | + |
| 93 | + <seeInField selector="{{AdminDataGridPaginationSection.currentPage}}" userInput="1" stepKey="seeOnFirstPageProductGrid"/> |
| 94 | + </test> |
| 95 | +</tests> |
0 commit comments