-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b94121
commit b0c0c59
Showing
5 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...Catalog/Test/Mftf/ActionGroup/ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" extends="ChangeSeoUrlKeyForSubCategoryActionGroup"> | ||
<annotations> | ||
<description>Requires navigation to subcategory creation/edit. Updates the Search Engine Optimization with uncheck Redirect Checkbox .</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="value" type="string"/> | ||
</arguments> | ||
|
||
<uncheckOption selector="{{AdminCategorySEOSection.UrlKeyRedirectCheckbox}}" stepKey="uncheckRedirectCheckbox" after="enterURLKey"/> | ||
</actionGroup> | ||
</actionGroups> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...Rewrite/Test/Mftf/ActionGroup/StorefrontAssertProductRewriteUrlSubCategoryActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="StorefrontAssertProductRewriteUrlSubCategoryActionGroup"> | ||
<annotations> | ||
<description>Validates that the provided Product Title is present on the Rewrite URL with a subcategory page.</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="category" defaultValue="_defaultCategory"/> | ||
<argument name="subCategory" defaultValue="SimpleSubCategory"/> | ||
<argument name="product" defaultValue="SimpleProduct" /> | ||
</arguments> | ||
|
||
<amOnPage url="{{category.url_key_default_store}}/{{subCategory.url_key_default_store}}/{{product.urlKey}}2.html" stepKey="goToProductPage"/> | ||
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{product.name}}" stepKey="seeProductNameInStoreFront"/> | ||
</actionGroup> | ||
</actionGroups> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminRewriteProductWithTwoStoreTest"> | ||
<annotations> | ||
<title value="Rewriting URL of product"/> | ||
<description value="Rewriting URL of product. Verify the full URL address"/> | ||
<group value="CatalogUrlRewrite"/> | ||
</annotations> | ||
|
||
<before> | ||
<magentoCLI command="config:set {{EnableCategoriesPathProductUrls.path}} {{EnableCategoriesPathProductUrls.value}}" stepKey="enableUseCategoriesPath"/> | ||
<magentoCLI command="cache:flush" stepKey="flushCache"/> | ||
|
||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView" /> | ||
<createData entity="_defaultCategoryDifferentUrlStore" stepKey="defaultCategory"/> | ||
<createData entity="SimpleSubCategoryDifferentUrlStore" stepKey="subCategory"> | ||
<requiredEntity createDataKey="defaultCategory"/> | ||
</createData> | ||
<createData entity="SimpleProduct" stepKey="simpleProduct"> | ||
<requiredEntity createDataKey="subCategory"/> | ||
</createData> | ||
</before> | ||
|
||
<after> | ||
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView"/> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
<deleteData createDataKey="subCategory" stepKey="deleteSubCategory"/> | ||
<deleteData createDataKey="defaultCategory" stepKey="deleteNewRootCategory"/> | ||
|
||
<magentoCLI command="config:set {{DisableCategoriesPathProductUrls.path}} {{DisableCategoriesPathProductUrls.value}}" stepKey="disableUseCategoriesPath"/> | ||
<magentoCLI command="cache:flush" stepKey="flushCache"/> | ||
</after> | ||
|
||
<actionGroup ref="NavigateToCreatedCategoryActionGroup" stepKey="navigateToCreatedDefaultCategory"> | ||
<argument name="Category" value="$$defaultCategory$$"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="AdminSwitchDefaultStoreViewForDefaultCategory"> | ||
<argument name="storeView" value="_defaultStore.name"/> | ||
</actionGroup> | ||
<actionGroup ref="ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" stepKey="changeSeoUrlKeyForDefaultCategoryDefaultStore"> | ||
<argument name="value" value="{{_defaultCategoryDifferentUrlStore.url_key_default_store}}"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="AdminSwitchCustomStoreViewForDefaultCategory"> | ||
<argument name="storeView" value="customStore.name"/> | ||
</actionGroup> | ||
<actionGroup ref="ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" stepKey="changeSeoUrlKeyForDefaultCategoryCustomStore"> | ||
<argument name="value" value="{{_defaultCategoryDifferentUrlStore.url_key_custom_store}}"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="NavigateToCreatedCategoryActionGroup" stepKey="navigateToCreatedSubCategory"> | ||
<argument name="Category" value="$$subCategory$$"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="AdminSwitchDefaultStoreViewForSubCategory"> | ||
<argument name="storeView" value="_defaultStore.name"/> | ||
</actionGroup> | ||
<actionGroup ref="ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" stepKey="changeSeoUrlKeyForSubCategoryDefaultStore"> | ||
<argument name="value" value="{{SimpleSubCategoryDifferentUrlStore.url_key_default_store}}"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="AdminSwitchCustomStoreViewForSubCategory"> | ||
<argument name="storeView" value="customStore.name"/> | ||
</actionGroup> | ||
<actionGroup ref="ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" stepKey="changeSeoUrlKeyForSubCategoryCustomStore"> | ||
<argument name="value" value="{{SimpleSubCategoryDifferentUrlStore.url_key_custom_store}}"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="StorefrontAssertProductRewriteUrlSubCategoryActionGroup" stepKey="validatesRewriteUrl"> | ||
<argument name="category" value="_defaultCategoryDifferentUrlStore"/> | ||
<argument name="subCategory" value="SimpleSubCategoryDifferentUrlStore" /> | ||
<argument name="product" value="SimpleProduct" /> | ||
</actionGroup> | ||
|
||
</test> | ||
</tests> |