Skip to content

Commit 10f9e1b

Browse files
MC-6463: Product custom URL Key is preserved when assigned to a Category (with custom URL Key) alongside with another Product without custom URL Key
1 parent 065cf97 commit 10f9e1b

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

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

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
<description value="Verify Product custom URL Key (for custom Store View) is preserved when assigned to a Category (with custom URL Key) alongside with another Product without custom URL Key"/>
1616
<testCaseId value="MC-6463"/>
1717
<severity value="MAJOR"/>
18-
<group value="mtf_migrated"/>
18+
<group value="catalog"/>
19+
<group value="url_rewrite"/>
1920
</annotations>
2021
<before>
2122
<createData entity="_defaultCategory" stepKey="createCategory"/>
@@ -25,11 +26,12 @@
2526
<createData entity="SimpleProduct" stepKey="createProductForUrlRewrite">
2627
<requiredEntity createDataKey="createCategory" />
2728
</createData>
28-
<actionGroup ref="LoginAsAdmin" stepKey="login"/>
29-
<!-- Create second store view-->
29+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
30+
<!-- Create second store view -->
3031
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView">
3132
<argument name="customStore" value="customStore"/>
3233
</actionGroup>
34+
<magentoCLI command="indexer:reindex" stepKey="runReindex"/>
3335
</before>
3436
<after>
3537
<deleteData createDataKey="createProduct" stepKey="deleteProduct" />
@@ -39,7 +41,7 @@
3941
<argument name="customStore" value="customStore"/>
4042
</actionGroup>
4143
<actionGroup ref="AdminGridFilterResetActionGroup" stepKey="clearFilterForStores"/>
42-
<actionGroup ref="logout" stepKey="logout"/>
44+
<actionGroup ref="logout" stepKey="logoutFromAdmin"/>
4345
</after>
4446
<!--Step 1. Navigate as Admin on Product Page for edit product`s Url Key-->
4547
<actionGroup ref="navigateToCreatedProductEditPage" stepKey="goToProductForUrlRewrite">
@@ -70,17 +72,19 @@
7072
<argument name="newRequestPath" value="u1.html"/>
7173
</actionGroup>
7274
<!--Step 6. On Storefront Assert what URL Key for product is correct(as initial URL) -->
73-
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="amOnStorefrontProduct">
74-
<argument name="productUrl" value="$$createProduct.custom_attributes[url_key]$$"/>
75+
<actionGroup ref="OpenProductFromCategoryPageActionGroup" stepKey="navigateToProductInDefaultStore">
76+
<argument name="category" value="$$createCategory$$"/>
77+
<argument name="product" value="$$createProduct$$"/>
7578
</actionGroup>
7679
<actionGroup ref="StorefrontCheckProductUrlActionGroup" stepKey="checkProductUrl">
7780
<argument name="productUrl" value="$$createProduct.custom_attributes[url_key]$$"/>
7881
</actionGroup>
7982
<!--Step 7. On Storefront Assert what URL Key for product is correct for Default Store View (as initial URL) -->
80-
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="amOnStorefrontProductWithChangedUrl">
81-
<argument name="productUrl" value="$$createProductForUrlRewrite.custom_attributes[url_key]$$"/>
83+
<actionGroup ref="OpenProductFromCategoryPageActionGroup" stepKey="navigateToProductForUrlRewriteInDefaultStore">
84+
<argument name="category" value="$$createCategory$$"/>
85+
<argument name="product" value="$$createProductForUrlRewrite$$"/>
8286
</actionGroup>
83-
<actionGroup ref="StorefrontCheckProductUrlActionGroup" stepKey="checkProductWithChangedUrl">
87+
<actionGroup ref="StorefrontCheckProductUrlActionGroup" stepKey="checkProductWithChangedUrl">
8488
<argument name="productUrl" value="$$createProductForUrlRewrite.custom_attributes[url_key]$$"/>
8589
</actionGroup>
8690
<!--Step 8. On Storefront switch on created Custom Store View -->
@@ -93,10 +97,11 @@
9397
<argument name="newRequestPath" value="u1.html"/>
9498
</actionGroup>
9599
<!--Step 10. On Storefront Assert what URL Key for product is correct for Custom Store View (as initial URL) -->
96-
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="amOnCustomStoreProduct">
97-
<argument name="productUrl" value="$$createProduct.custom_attributes[url_key]$$"/>
100+
<actionGroup ref="OpenProductFromCategoryPageActionGroup" stepKey="navigateToProductInCustomStore">
101+
<argument name="category" value="$$createCategory$$"/>
102+
<argument name="product" value="$$createProduct$$"/>
98103
</actionGroup>
99-
<actionGroup ref="StorefrontCheckProductUrlActionGroup" stepKey="checkProductP1UrlonCustomStore">
104+
<actionGroup ref="StorefrontCheckProductUrlActionGroup" stepKey="checkProductUrlOnCustomStore">
100105
<argument name="productUrl" value="$$createProduct.custom_attributes[url_key]$$"/>
101106
</actionGroup>
102107
<!--Step 11. On Storefront Assert what URL Key for product is changed and is correct for Custom Store View -->

0 commit comments

Comments
 (0)