|
| 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 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="AdminApplyCatalogStorefrontConfigurationSettingsTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Catalog"/> |
| 13 | + <stories value="Apply catalog storefront configuration settings"/> |
| 14 | + <title value="You should be able to apply catalog storefront configuration settings."/> |
| 15 | + <description value="You should be able to apply catalog storefront configuration settings."/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="MC-27444"/> |
| 18 | + </annotations> |
| 19 | + <before> |
| 20 | + |
| 21 | + <!-- create category --> |
| 22 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 23 | + |
| 24 | + <!-- create 11 simple products --> |
| 25 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct1"> |
| 26 | + <requiredEntity createDataKey="createCategory"/> |
| 27 | + </createData> |
| 28 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct2"> |
| 29 | + <requiredEntity createDataKey="createCategory"/> |
| 30 | + </createData> |
| 31 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct3"> |
| 32 | + <requiredEntity createDataKey="createCategory"/> |
| 33 | + </createData> |
| 34 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct4"> |
| 35 | + <requiredEntity createDataKey="createCategory"/> |
| 36 | + </createData> |
| 37 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct5"> |
| 38 | + <requiredEntity createDataKey="createCategory"/> |
| 39 | + </createData> |
| 40 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct6"> |
| 41 | + <requiredEntity createDataKey="createCategory"/> |
| 42 | + </createData> |
| 43 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct7"> |
| 44 | + <requiredEntity createDataKey="createCategory"/> |
| 45 | + </createData> |
| 46 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct8"> |
| 47 | + <requiredEntity createDataKey="createCategory"/> |
| 48 | + </createData> |
| 49 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct9"> |
| 50 | + <requiredEntity createDataKey="createCategory"/> |
| 51 | + </createData> |
| 52 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct10"> |
| 53 | + <requiredEntity createDataKey="createCategory"/> |
| 54 | + </createData> |
| 55 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct11"> |
| 56 | + <requiredEntity createDataKey="createCategory"/> |
| 57 | + </createData> |
| 58 | + |
| 59 | + <magentoCLI command="config:set {{CustomListMode.path}} {{CustomListMode.value}}" stepKey="setListMode"/> |
| 60 | + <magentoCLI command="config:set {{CustomStoreFrontGridPerPageValuesConfigData.path}} {{CustomStoreFrontGridPerPageValuesConfigData.value}}" stepKey="setCustomGridPerPageValues"/> |
| 61 | + <magentoCLI command="config:set {{CustomStoreFrontGridPerPageConfigData.path}} {{CustomStoreFrontGridPerPageConfigData.value}}" stepKey="setCustomGridPerPage"/> |
| 62 | + <magentoCLI command="config:set {{CustomStoreFrontListPerPageValuesConfigData.path}} {{CustomStoreFrontListPerPageValuesConfigData.value}}" stepKey="setCustomListPerPageValues"/> |
| 63 | + <magentoCLI command="config:set {{CustomStoreFrontListPerPageConfigData.path}} {{CustomStoreFrontListPerPageConfigData.value}}" stepKey="setCustomListPerPage"/> |
| 64 | + <magentoCLI command="config:set {{CustomStoreFrontProductsSortBy.path}} {{CustomStoreFrontProductsSortBy.value}}" stepKey="setProductSortBy"/> |
| 65 | + <magentoCLI command="config:set {{CustomStoreFrontAllProductsPerPage.path}} {{CustomStoreFrontAllProductsPerPage.value}}" stepKey="setAllProductsPerPage"/> |
| 66 | + <magentoCron groups="index" stepKey="reindex"/> |
| 67 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCache"> |
| 68 | + <argument name="tags" value="full_page"/> |
| 69 | + </actionGroup> |
| 70 | + </before> |
| 71 | + |
| 72 | + <after> |
| 73 | + |
| 74 | + <!-- delete created entities --> |
| 75 | + <deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct1"/> |
| 76 | + <deleteData createDataKey="createSimpleProduct2" stepKey="deleteSimpleProduct2"/> |
| 77 | + <deleteData createDataKey="createSimpleProduct3" stepKey="deleteSimpleProduct3"/> |
| 78 | + <deleteData createDataKey="createSimpleProduct4" stepKey="deleteSimpleProduct4"/> |
| 79 | + <deleteData createDataKey="createSimpleProduct5" stepKey="deleteSimpleProduct5"/> |
| 80 | + <deleteData createDataKey="createSimpleProduct6" stepKey="deleteSimpleProduct6"/> |
| 81 | + <deleteData createDataKey="createSimpleProduct7" stepKey="deleteSimpleProduct7"/> |
| 82 | + <deleteData createDataKey="createSimpleProduct8" stepKey="deleteSimpleProduct8"/> |
| 83 | + <deleteData createDataKey="createSimpleProduct9" stepKey="deleteSimpleProduct9"/> |
| 84 | + <deleteData createDataKey="createSimpleProduct10" stepKey="deleteSimpleProduct10"/> |
| 85 | + <deleteData createDataKey="createSimpleProduct11" stepKey="deleteSimpleProduct11"/> |
| 86 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 87 | + |
| 88 | + |
| 89 | + <magentoCLI command="config:set {{DefaultListMode.path}} {{DefaultListMode.value}}" stepKey="setListMode1"/> |
| 90 | + <magentoCLI command="config:set {{DefaultGridPerPageValuesConfigData.path}} {{DefaultGridPerPageValuesConfigData.value}}" stepKey="setDefaultGridPerPageValues"/> |
| 91 | + <magentoCLI command="config:set {{DefaultGridPerPageDefaultConfigData.path}} {{DefaultGridPerPageDefaultConfigData.value}}" stepKey="setDefaultGridPerPage"/> |
| 92 | + <magentoCLI command="config:set {{DefaultStoreFrontListPerPageValuesConfigData.path}} {{DefaultStoreFrontListPerPageValuesConfigData.value}}" stepKey="setDefaultListPerPageValues"/> |
| 93 | + <magentoCLI command="config:set {{DefaultStoreFrontListPerPageConfigData.path}} {{DefaultStoreFrontListPerPageConfigData.value}}" stepKey="setDefaultListPerPage"/> |
| 94 | + <magentoCLI command="config:set {{DefaultStoreFrontProductsSortBy.path}} {{DefaultStoreFrontProductsSortBy.value}}" stepKey="setDefaultProductSortBy"/> |
| 95 | + <magentoCLI command="config:set {{DefaultStoreFrontAllProductsPerPage.path}} {{DefaultStoreFrontAllProductsPerPage.value}}" stepKey="setDefaultAllProductsPerPage"/> |
| 96 | + |
| 97 | + </after> |
| 98 | + |
| 99 | + <!-- Login to Admin page --> |
| 100 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 101 | + <actionGroup ref="AssertAdminSuccessLoginActionGroup" stepKey="assertLoggedIn"/> |
| 102 | + |
| 103 | + <!-- navigate to created category page --> |
| 104 | + <actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="navigateToCategoryPage1"> |
| 105 | + <argument name="category" value="$$createCategory$$"/> |
| 106 | + </actionGroup> |
| 107 | + |
| 108 | + <!-- Go to storefront created category page and verifies list and grid mode --> |
| 109 | + <actionGroup ref="AdminVerifiesListAndGridModeActionGroup" stepKey="ChangesInListAndGridMode"/> |
| 110 | + |
| 111 | + <!-- again navigate to created category page and check the products per page --> |
| 112 | + <actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="navigateToCategoryPage2"> |
| 113 | + <argument name="category" value="$$createCategory$$"/> |
| 114 | + </actionGroup> |
| 115 | + |
| 116 | + <click selector="{{AdminChecksListAndGridModeSection.gridMode}}" stepKey="switchToGridMode4"/> |
| 117 | + <seeNumberOfElements selector="{{AdminChecksListAndGridModeSection.productCount}}" userInput="10" stepKey="seeNumberOfProductsInGridView"/> |
| 118 | + |
| 119 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> |
| 120 | + |
| 121 | + |
| 122 | + </test> |
| 123 | +</tests> |
0 commit comments