Skip to content

Commit a349784

Browse files
committed
ACP2E-1783: Unable to create 301/302 redirect for product with a category path when Generate "category/product" URL Rewrites set to Yes
- improved mftf test
1 parent 74c12ed commit a349784

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

app/code/Magento/UrlRewrite/Test/Mftf/Section/AdminUrlRewriteIndexSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
<element name="gridCellByColumnValue" type="text" selector="//*[@data-role='grid']//tbody//td[count(//*[@data-role='grid']//th[contains(., '{{column}}')]/preceding-sibling::th)+1][normalize-space(.)='{{columnValue}}']" parameterized="true"/>
1616
<element name="select" type="button" selector="//*[@data-role='grid']//tbody//tr[{{row}}+1]//button[@class='action-select']" timeout="30" parameterized="true"/>
1717
<element name="activeEdit" type="button" selector="//*[@data-role='grid']//tbody//ul[@class='action-menu _active']//a[@data-action='item-edit']" timeout="30"/>
18+
<element name="clearFiltersButton" type="button" selector="//div[@class='admin__data-grid-header']//button[@class='action-tertiary action-clear']" timeout="10"/>
1819
</section>
1920
</sections>

app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCreateProductUrlRewriteTest.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,16 @@
2727
<magentoCLI command="cache:flush" stepKey="cleanCache"/>
2828
</before>
2929
<after>
30+
<!-- Clear filters: URL re-write, product -->
31+
<amOnPage url="{{AdminUrlRewriteIndexPage.url}}" stepKey="openUrlRewriteEditPage"/>
32+
<conditionalClick selector="{{AdminUrlRewriteIndexSection.clearFiltersButton}}" dependentSelector="{{AdminUrlRewriteIndexSection.clearFiltersButton}}" visible="true" stepKey="cleanFiltersIfTheySet"/>
33+
<actionGroup ref="ClearProductsFilterActionGroup" stepKey="clearProductsFilter"/>
3034
<!-- Delete the category and product -->
3135
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
3236
<deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/>
3337
<magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 0" stepKey="disableGenerateUrlRewrite"/>
38+
<magentoCLI command="indexer:reindex" stepKey="performExitReindex"/>
3439
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
35-
<magentoCLI command="indexer:reindex" stepKey="performReindex"/>
3640
</after>
3741

3842
<!--Delete created product url rewrite and verify AssertUrlRewriteDeletedMessage-->

0 commit comments

Comments
 (0)