|
6 | 6 | */
|
7 | 7 | -->
|
8 | 8 | <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
9 |
| - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
10 |
| - <test name="AdminUrlRewriteGeneratedForMultipleStoreviewsWithConfigTurnedOffTest"> |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="AdminUrlRewriteMultipleStoreviewsProductImportWithConfigTurnedOffTest"> |
11 | 11 | <annotations>
|
12 | 12 | <features value="Url Rewrite"/>
|
13 | 13 | <stories value="Url Rewrites for Multiple Storeviews"/>
|
14 |
| - <title value="Url Rewrites Correctly Generated for Multiple Storeviews During Product Import"/> |
| 14 | + <title value="Url Rewrites Correctly Generated for Multiple Storeviews During Product Import With Configuration Turned Off"/> |
15 | 15 | <description value="Check Url Rewrites Correctly Generated for Multiple Storeviews During Product Import."/>
|
16 | 16 | <severity value="CRITICAL"/>
|
17 |
| - <testCaseId value="MC-12656"/> |
| 17 | + <testCaseId value="MC-6802"/> |
18 | 18 | <group value="urlRewrite"/>
|
19 | 19 | </annotations>
|
20 | 20 | <before>
|
| 21 | + <!-- Set the configuration for Generate "category/product" URL Rewrites to Yes (default)--> |
| 22 | + <comment userInput="Enable SEO configuration setting to generate category/product URL Rewrites" stepKey="commentEnableUrlRewriteConfig"/> |
| 23 | + <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 1" stepKey="enableGenerateUrlRewrite"/> |
| 24 | + <!--Flush cache--> |
| 25 | + <magentoCLI command="cache:flush" stepKey="cleanCache1"/> |
21 | 26 | <createData entity="ApiCategory" stepKey="createCategory">
|
22 | 27 | <field key="name">category-admin</field>
|
23 | 28 | </createData>
|
|
30 | 35 | <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreViewNl">
|
31 | 36 | <argument name="customStore" value="customStoreNLNotUnique"/>
|
32 | 37 | </actionGroup>
|
| 38 | + <!-- Set the configuration for Generate "category/product" URL Rewrites to No--> |
| 39 | + <comment userInput="Disable SEO configuration setting to generate category/product URL Rewrites" stepKey="commentDisableUrlRewriteConfig"/> |
| 40 | + <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 0" stepKey="disableGenerateUrlRewrite"/> |
| 41 | + <!--Flush cache--> |
| 42 | + <magentoCLI command="cache:flush" stepKey="cleanCache"/> |
33 | 43 | </before>
|
34 | 44 | <after>
|
35 | 45 | <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
|
|
39 | 49 | <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewNl">
|
40 | 50 | <argument name="customStore" value="customStoreNLNotUnique"/>
|
41 | 51 | </actionGroup>
|
42 |
| - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearStoreFilters"/> |
| 52 | + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearStoreGridFilters"/> |
43 | 53 | <actionGroup ref="DeleteProductByNameActionGroup" stepKey="deleteImportedProduct">
|
44 | 54 | <argument name="sku" value="productformagetwo68980"/>
|
45 | 55 | <argument name="name" value="productformagetwo68980"/>
|
46 | 56 | </actionGroup>
|
47 | 57 | <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFiltersIfSet"/>
|
48 | 58 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
|
| 59 | + <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 1" stepKey="resetConfigurationSetting"/> |
| 60 | + <!--Flush cache--> |
| 61 | + <magentoCLI command="cache:flush" stepKey="cleanCache2"/> |
49 | 62 | </after>
|
50 | 63 | <actionGroup ref="SwitchCategoryStoreViewActionGroup" stepKey="switchToStoreViewEn">
|
51 | 64 | <argument name="Store" value="customStoreENNotUnique.name"/>
|
|
105 | 118 | <waitForPageLoad stepKey="waitForPageToLoad2"/>
|
106 | 119 | <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', 'productformagetwo68980-english.html')}}" stepKey="seeUrlInRequestPathColumn2"/>
|
107 | 120 | <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Target Path', 'catalog/product/view/id/$grabProductIdFromUrl')}}" stepKey="seeUrlInTargetPathColumn2"/>
|
| 121 | + <dontSeeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', 'category-english/productformagetwo68980-english.html')}}" stepKey="seeUrlInRequestPathColumn4"/> |
| 122 | + <dontSeeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Target Path', catalog/product/view/id/$grabProductIdFromUrl/category/$$createCategory.id$$)}}" stepKey="seeUrlInTargetPathColumn4"/> |
108 | 123 |
|
109 | 124 | <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters3"/>
|
110 | 125 | <fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="productformagetwo68980-dutch.html" stepKey="inputProductUrlForENStoreView1"/>
|
111 | 126 | <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters3"/>
|
112 | 127 | <waitForPageLoad stepKey="waitForPageToLoad3"/>
|
113 | 128 | <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', 'productformagetwo68980-dutch.html')}}" stepKey="seeUrlInRequestPathColumn3"/>
|
114 | 129 | <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Target Path', 'catalog/product/view/id/$grabProductIdFromUrl')}}" stepKey="seeUrlInTargetPathColumn3"/>
|
| 130 | + <dontSeeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', 'category-dutch/productformagetwo68980-dutch.html')}}" stepKey="seeUrlInRequestPathColumn5"/> |
| 131 | + <dontSeeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Target Path', catalog/product/view/id/$grabProductIdFromUrl/category/$$createCategory.id$$)}}" stepKey="seeUrlInTargetPathColumn5"/> |
115 | 132 |
|
116 |
| - <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters4"/> |
117 |
| - <fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="category-english/productformagetwo68980-english.html" stepKey="inputProductUrlForENStoreView2"/> |
118 |
| - <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters4"/> |
119 |
| - <waitForPageLoad stepKey="waitForPageToLoad4"/> |
120 |
| - <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', 'category-english/productformagetwo68980-english.html')}}" stepKey="seeUrlInRequestPathColumn4"/> |
121 |
| - <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Target Path', catalog/product/view/id/$grabProductIdFromUrl/category/$$createCategory.id$$)}}" stepKey="seeUrlInTargetPathColumn4"/> |
| 133 | + <!-- Switch StoreView --> |
| 134 | + <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnProduct4Page"/> |
| 135 | + <actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="switchToCustomStoreView"> |
| 136 | + <argument name="storeView" value="customStoreENNotUnique"/> |
| 137 | + </actionGroup> |
| 138 | + |
| 139 | + <amOnPage url="/productformagetwo68980-english.html" stepKey="navigateToProductPage"/> |
| 140 | + <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="productformagetwo68980-english" stepKey="seeProductName"/> |
| 141 | + <amOnPage url="/category-english/productformagetwo68980-english.html" stepKey="navigateToProductPage2"/> |
| 142 | + <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="productformagetwo68980-english" stepKey="seeProductName2"/> |
| 143 | + |
| 144 | + <!-- Switch StoreView --> |
| 145 | + <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnProduct4Page2"/> |
| 146 | + <actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="switchToCustomStoreView2"> |
| 147 | + <argument name="storeView" value="customStoreNLNotUnique"/> |
| 148 | + </actionGroup> |
122 | 149 |
|
123 |
| - <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters5"/> |
124 |
| - <fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="category-dutch/productformagetwo68980-dutch.html" stepKey="inputProductUrlForENStoreView3"/> |
125 |
| - <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters5"/> |
126 |
| - <waitForPageLoad stepKey="waitForPageToLoad5"/> |
127 |
| - <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', 'category-dutch/productformagetwo68980-dutch.html')}}" stepKey="seeUrlInRequestPathColumn5"/> |
128 |
| - <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Target Path', catalog/product/view/id/$grabProductIdFromUrl/category/$$createCategory.id$$)}}" stepKey="seeUrlInTargetPathColumn5"/> |
| 150 | + <amOnPage url="/productformagetwo68980-dutch.html" stepKey="navigateToProductPage3"/> |
| 151 | + <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="productformagetwo68980-dutch" stepKey="seeProductName3"/> |
| 152 | + <amOnPage url="/category-dutch/productformagetwo68980-dutch.html" stepKey="navigateToProductPage4"/> |
| 153 | + <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="productformagetwo68980-dutch" stepKey="seeProductName4"/> |
129 | 154 | </test>
|
130 | 155 | </tests>
|
0 commit comments