|
44 | 44 | </after>
|
45 | 45 |
|
46 | 46 | <!-- 1. Open Marketing - SEO & Search - URL Rewrites -->
|
47 |
| - <amOnPage url="{{AdminUrlRewriteIndexPage.url}}" stepKey="amOnUrlRewriteIndexPage"/> |
48 |
| - <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters"/> |
49 |
| - <fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="$createSimpleProduct.custom_attributes[url_key]$.html" stepKey="inputProductName"/> |
50 |
| - <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters"/> |
51 |
| - <waitForPageLoad stepKey="waitForPageToLoad"/> |
52 |
| - <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', $createSimpleProduct.custom_attributes[url_key]$.html)}}" stepKey="seeValue1"/> |
53 |
| - <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', $createCategory.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html)}}" stepKey="seeValue2"/> |
| 47 | + <actionGroup ref="AdminSearchUrlRewriteByRequestPathActionGroup" stepKey="searchingUrlRewrite"> |
| 48 | + <argument name="requestPath" value="$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 49 | + </actionGroup> |
| 50 | + <actionGroup ref="AssertAdminRequestPathInUrlRewriteGrigActionGroup" stepKey="seeProductUrlInGrid"> |
| 51 | + <argument name="requestPath" value="$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 52 | + </actionGroup> |
| 53 | + <actionGroup ref="AssertAdminRequestPathInUrlRewriteGrigActionGroup" stepKey="seeCategoryUrlInGrid"> |
| 54 | + <argument name="requestPath" value="$createCategory.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 55 | + </actionGroup> |
54 | 56 |
|
55 | 57 | <!-- 2. Set the configuration for Generate "category/product" URL Rewrites to No-->
|
56 |
| - <amOnPage url="{{CatalogConfigPage.url}}" stepKey="amOnCatalogConfigPage"/> |
57 |
| - <conditionalClick selector="{{CatalogSection.seo}}" dependentSelector="{{CatalogSection.CheckIfSeoTabExpand}}" visible="true" stepKey="expandSeoTab" /> |
58 |
| - <waitForElementVisible selector="{{CatalogSection.GenerateUrlRewrites}}" stepKey="GenerateUrlRewritesSelect"/> |
59 |
| - <selectOption userInput="0" selector="{{CatalogSection.GenerateUrlRewrites}}" stepKey="selectUrlGenerationNo" /> |
60 |
| - <waitForElementVisible selector="{{GenerateUrlRewritesConfirm.title}}" stepKey="waitForConfirmModal"/> |
61 |
| - <click selector="{{GenerateUrlRewritesConfirm.ok}}" stepKey="confirmSwitchingGenerationOff"/> |
62 |
| - <click selector="{{CatalogSection.save}}" stepKey="saveConfig" /> |
63 |
| - <waitForPageLoad stepKey="waitForSavingSystemConfiguration"/> |
| 58 | + <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 0" stepKey="disableGenerateUrlRewrite"/> |
64 | 59 |
|
65 | 60 | <!-- 3. Flush cache-->
|
66 | 61 | <magentoCLI command="cache:flush" stepKey="cleanCache"/>
|
67 | 62 |
|
68 | 63 | <!-- 4. Open Marketing - SEO & Search - URL Rewrites -->
|
69 |
| - <amOnPage url="{{AdminUrlRewriteIndexPage.url}}" stepKey="amOnUrlRewriteIndexPage2"/> |
70 |
| - <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters1"/> |
71 |
| - <fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="$createSimpleProduct.custom_attributes[url_key]$.html" stepKey="inputProductName2"/> |
72 |
| - <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters1"/> |
73 |
| - <waitForPageLoad stepKey="waitForPageToLoad1"/> |
74 |
| - <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', $createSimpleProduct.custom_attributes[url_key]$.html)}}" stepKey="seeInListValue1"/> |
75 |
| - <dontSeeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', $createCategory.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html)}}" stepKey="dontSeeValue2"/> |
| 64 | + <actionGroup ref="AdminSearchUrlRewriteByRequestPathActionGroup" stepKey="searchingUrlRewriteAfterDisablingTheConfig"> |
| 65 | + <argument name="requestPath" value="$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 66 | + </actionGroup> |
| 67 | + <actionGroup ref="AssertAdminRequestPathInUrlRewriteGrigActionGroup" stepKey="seeProductUrlInGridAfterDisablingTheConfig"> |
| 68 | + <argument name="requestPath" value="$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 69 | + </actionGroup> |
| 70 | + <actionGroup ref="AssertAdminRequestPathIsNotFoundInUrlRewriteGrigActionGroup" stepKey="categoryUrlIsNotShownAfterDisablingTheConfig"> |
| 71 | + <argument name="requestPath" value="$createCategory.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html"/> |
| 72 | + </actionGroup> |
76 | 73 | </test>
|
77 | 74 | </tests>
|
0 commit comments