Skip to content

Commit 424763c

Browse files
committed
Remove active category in the cache key
- Update functional test coverage;
1 parent d046661 commit 424763c

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed
Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
-->
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10-
<test name="StorefrontNoStoreCodeYesCategoryPathCustomSuffixNavigationTest">
10+
<test name="StorefrontNoStoreCodeYesCategoryPathHtmlSuffixNavigationTest">
1111
<annotations>
1212
<features value="Catalog"/>
13-
<stories value="Navigation Menu Highlighting with Custom Suffix, No Store Code, Yes Category Path"/>
14-
<title value="Validation of Navigation Menu Highlighting with custom Suffix, No Store Code and Yes Category Path in URLs"/>
15-
<description value="This test verifies that the correct category is highlighted in the navigation menu when navigating through categories and products on the storefront, specifically with custom URL suffixes and the settings 'Add Store Code to Urls: No' and 'Use Categories Path for Product URLs: Yes'. The test focuses on the impact of these configurations on category highlighting."/>
13+
<stories value="Navigation Menu Highlighting with .html Suffix, No Store Code, Yes Category Path"/>
14+
<title value="Validation of Navigation Menu Highlighting with .html Suffix, No Store Code and Yes Category Path in URLs"/>
15+
<description value="This test verifies that the correct category is highlighted in the navigation menu when navigating through categories and products on the storefront, specifically with .html URL suffixes and the settings 'Add Store Code to Urls: No' and 'Use Categories Path for Product URLs: Yes'. The test focuses on the impact of these configurations on category highlighting."/>
1616
<testCaseId value="AC-10851"/>
1717
<severity value="MAJOR"/>
1818
<group value="catalog"/>
@@ -44,8 +44,8 @@
4444
<argument name="indices" value=""/>
4545
</actionGroup>
4646
<!-- Set custom url suffixes -->
47-
<magentoCLI command="config:set catalog/seo/category_url_suffix .htm" stepKey="setCategoryUrlSuffix"/>
48-
<magentoCLI command="config:set catalog/seo/product_url_suffix .phtml" stepKey="setProductUrlSuffix"/>
47+
<magentoCLI command="config:set catalog/seo/category_url_suffix .html" stepKey="setCategoryUrlSuffix"/>
48+
<magentoCLI command="config:set catalog/seo/product_url_suffix .html" stepKey="setProductUrlSuffix"/>
4949
<!-- Set "Add Store Code to Urls": No -->
5050
<magentoCLI command="config:set {{StorefrontDisableAddStoreCodeToUrls.path}} {{StorefrontDisableAddStoreCodeToUrls.value}}" stepKey="disableStoreCodeToUrls"/>
5151
<!-- Set "Use Categories Path for Product URLs": Yes -->
@@ -62,14 +62,11 @@
6262
<deleteData createDataKey="product_1_1" stepKey="deleteProduct_1_1" />
6363
<deleteData createDataKey="product_1_2" stepKey="deleteProduct_1_2" />
6464
<deleteData createDataKey="product_1_1_1_2" stepKey="deleteProduct_1_1_1_2" />
65-
<!-- Set url suffixes to its default values -->
66-
<magentoCLI command="config:set catalog/seo/category_url_suffix .html" stepKey="setCategoryUrlSuffix"/>
67-
<magentoCLI command="config:set catalog/seo/product_url_suffix .html" stepKey="setProductUrlSuffix"/>
6865
<!-- Set "Use Categories Path for Product URLs": No -->
6966
<magentoCLI command="config:set {{DisableCategoriesPathForProductUrls.path}} {{DisableCategoriesPathForProductUrls.value}}" stepKey="disableCategoriesPathForProductUrls"/>
7067
<!-- Flush needed cache -->
7168
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterChangingConfig">
72-
<argument name="tags" value=""/>
69+
<argument name="tags" value="config full_page"/>
7370
</actionGroup>
7471
</after>
7572
<!-- Open storefront homepage -->
@@ -200,7 +197,7 @@
200197
</assertEquals>
201198

202199
<!-- Open direct Category 1.2 url -->
203-
<amOnPage url="/$$category_1.custom_attributes[url_key]$$/$$category_1_2.custom_attributes[url_key]$$.htm" stepKey="openCategoryPageDirectly"/>
200+
<amOnPage url="/$$category_1.custom_attributes[url_key]$$/$$category_1_2.custom_attributes[url_key]$$.html" stepKey="openCategoryPageDirectly"/>
204201
<waitForPageLoad stepKey="waitForCategoryStoreFrontPageToLoad"/>
205202
<!-- Check if parent Category 1 has 'has-active' class and Category 1.2 child category has 'active' class -->
206203
<grabAttributeFrom selector="{{AdminCategorySidebarTreeSection.categoryHighlighted($$category_1.name$$)}}" userInput="class" stepKey="grabCategory_1_Class_Try4"/>
@@ -260,7 +257,7 @@
260257
</assertEquals>
261258

262259
<!-- Open product assigned to both Category 1_1 & Category 1_2 by its direct page url with category in it -->
263-
<amOnPage url="/$$category_1.custom_attributes[url_key]$$/$$category_1_2.custom_attributes[url_key]$$/$$product_1_1_1_2.custom_attributes[url_key]$$.phtml" stepKey="openProductPageDirectly" />
260+
<amOnPage url="/$$category_1.custom_attributes[url_key]$$/$$category_1_2.custom_attributes[url_key]$$/$$product_1_1_1_2.custom_attributes[url_key]$$.html" stepKey="openProductPageDirectly" />
264261
<waitForPageLoad stepKey="waitForProductPageLoad"/>
265262
<!-- Check if parent Category 1 has 'has-active' class and Category 1.2 child category has 'active' class -->
266263
<grabAttributeFrom selector="{{AdminCategorySidebarTreeSection.categoryHighlighted($$category_1.name$$)}}" userInput="class" stepKey="grabCategory_1_Class_Try6"/>

0 commit comments

Comments
 (0)