Skip to content

Commit 52345ac

Browse files
committed
ACQE-8256: Navigation Menu Highlighting with No Suffix, Yes Store Code, Yes Category Path
- Title is updated in the test file
1 parent fe6232b commit 52345ac

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

app/code/Magento/Catalog/Test/Mftf/Data/SeoConfigData.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,8 @@
3030
<data key="label">''</data>
3131
<data key="value">.html</data>
3232
</entity>
33+
<entity name="CategoryClassStatus">
34+
<data key="scope">active</data>
35+
<data key="value">has-active</data>
36+
</entity>
3337
</entities>

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPathWithStoreCodeTest.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<annotations>
1313
<features value="Catalog"/>
1414
<stories value="Category Navigation Highlighting with Store Code in URLs"/>
15-
<title value="Verify category highlighting in navigation with store code in URLs and URL suffixes"/>
15+
<title value="Category highlighting in navigation with store code in URLs and URL suffixes"/>
1616
<description value="Correct category should be highlighted in the navigation menu when navigating through categories and products on the storefront based on store code"/>
1717
<severity value="MAJOR"/>
1818
<testCaseId value="AC-10852"/>
@@ -113,13 +113,13 @@
113113
<grabAttributeFrom selector="{{AdminCategorySidebarTreeSection.categoryHighlighted($$createCat11.name$$)}}" userInput="class" stepKey="grabCat11Class"/>
114114
<assertStringContainsString stepKey="assertCat11IsHighlighted">
115115
<actualResult type="const">$grabCat11Class</actualResult>
116-
<expectedResult type="string">active</expectedResult>
116+
<expectedResult type="string">{{CategoryClassStatus.scope}}</expectedResult>
117117
</assertStringContainsString>
118118
<!-- Verify parent Cat 1 has 'has-active' class -->
119119
<grabAttributeFrom selector="{{AdminCategorySidebarTreeSection.categoryHighlighted($$createCat1.name$$)}}" userInput="class" stepKey="grabCat1ParentClass"/>
120120
<assertStringContainsString stepKey="assertCat1HasActiveClass">
121121
<actualResult type="const">$grabCat1ParentClass</actualResult>
122-
<expectedResult type="string">has-active</expectedResult>
122+
<expectedResult type="string">{{CategoryClassStatus.value}}</expectedResult>
123123
</assertStringContainsString>
124124
<!-- Verify Cat 1.1 is highlighted with active class -->
125125
<executeJS function="return document.querySelectorAll('{{AdminCategorySidebarTreeSection.categoryNotHighlighted}}').length" stepKey="highlightedCategoryAmount_Try2"/>
@@ -139,13 +139,13 @@
139139
<grabAttributeFrom selector="{{AdminCategorySidebarTreeSection.categoryHighlighted($$createCat11.name$$)}}" userInput="class" stepKey="grabCat11ClassOnProduct"/>
140140
<assertStringContainsString stepKey="assertCat11IsHighlightedOnProduct">
141141
<actualResult type="const">$grabCat11ClassOnProduct</actualResult>
142-
<expectedResult type="string">active</expectedResult>
142+
<expectedResult type="string">{{CategoryClassStatus.scope}}</expectedResult>
143143
</assertStringContainsString>
144144
<!-- Verify parent Cat 1 still has 'has-active' class -->
145145
<grabAttributeFrom selector="{{AdminCategorySidebarTreeSection.categoryHighlighted($$createCat1.name$$)}}" userInput="class" stepKey="grabCat1ParentClassOnProduct"/>
146146
<assertStringContainsString stepKey="assertCat1HasActiveClassOnProduct">
147147
<actualResult type="const">$grabCat1ParentClassOnProduct</actualResult>
148-
<expectedResult type="string">has-active</expectedResult>
148+
<expectedResult type="string">{{CategoryClassStatus.value}}</expectedResult>
149149
</assertStringContainsString>
150150
<!-- Verify Cat 1.1 is still highlighted -->
151151
<executeJS function="return document.querySelectorAll('{{AdminCategorySidebarTreeSection.categoryNotHighlighted}}').length" stepKey="highlightedCategoryAmount_Try3"/>
@@ -174,13 +174,13 @@
174174
<grabAttributeFrom selector="{{AdminCategorySidebarTreeSection.categoryHighlighted($$createCat12.name$$)}}" userInput="class" stepKey="grabCat12Class"/>
175175
<assertStringContainsString stepKey="assertCat12IsHighlighted">
176176
<actualResult type="const">$grabCat12Class</actualResult>
177-
<expectedResult type="string">active</expectedResult>
177+
<expectedResult type="string">{{CategoryClassStatus.scope}}</expectedResult>
178178
</assertStringContainsString>
179179
<!-- Verify parent Cat 1 has 'has-active' class -->
180180
<grabAttributeFrom selector="{{AdminCategorySidebarTreeSection.categoryHighlighted($$createCat1.name$$)}}" userInput="class" stepKey="grabCat1ParentClassForCat12"/>
181181
<assertStringContainsString stepKey="assertCat1HasActiveClassForCat12">
182182
<actualResult type="const">$grabCat1ParentClassForCat12</actualResult>
183-
<expectedResult type="string">has-active</expectedResult>
183+
<expectedResult type="string">{{CategoryClassStatus.value}}</expectedResult>
184184
</assertStringContainsString>
185185
<!-- Verify Cat 1.2 is highlighted with active class -->
186186
<executeJS function="return document.querySelectorAll('{{AdminCategorySidebarTreeSection.categoryNotHighlighted}}').length" stepKey="highlightedCategoryAmount_Try5"/>
@@ -201,12 +201,12 @@
201201
<grabAttributeFrom selector="{{AdminCategorySidebarTreeSection.categoryHighlighted($$createCat1.name$$)}}" userInput="class" stepKey="grabCat1ParentClassDirectNav"/>
202202
<assertStringContainsString stepKey="assertCat1HasActiveClassDirectNav">
203203
<actualResult type="const">$grabCat1ParentClassDirectNav</actualResult>
204-
<expectedResult type="string">has-active</expectedResult>
204+
<expectedResult type="string">{{CategoryClassStatus.value}}</expectedResult>
205205
</assertStringContainsString>
206206
<grabAttributeFrom selector="{{AdminCategorySidebarTreeSection.categoryHighlighted($$createCat12.name$$)}}" userInput="class" stepKey="grabCat12ClassDirect"/>
207207
<assertStringContainsString stepKey="assertCat12IsHighlightedDirect">
208208
<actualResult type="const">$grabCat12ClassDirect</actualResult>
209-
<expectedResult type="string">active</expectedResult>
209+
<expectedResult type="string">{{CategoryClassStatus.scope}}</expectedResult>
210210
</assertStringContainsString>
211211
<!-- Verify Cat 1.2 is highlighted after direct navigation -->
212212
<executeJS function="return document.querySelectorAll('{{AdminCategorySidebarTreeSection.categoryNotHighlighted}}').length" stepKey="highlightedCategoryAmount_Try6"/>
@@ -226,13 +226,13 @@
226226
<grabAttributeFrom selector="{{AdminCategorySidebarTreeSection.categoryHighlighted($$createCat12.name$$)}}" userInput="class" stepKey="grabCat12ClassOnProduct"/>
227227
<assertStringContainsString stepKey="assertCat12IsHighlightedOnProduct">
228228
<actualResult type="const">$grabCat12ClassOnProduct</actualResult>
229-
<expectedResult type="string">active</expectedResult>
229+
<expectedResult type="string">{{CategoryClassStatus.scope}}</expectedResult>
230230
</assertStringContainsString>
231231
<!-- Verify parent Cat 1 still has 'has-active' class on product page -->
232232
<grabAttributeFrom selector="{{AdminCategorySidebarTreeSection.categoryHighlighted($$createCat1.name$$)}}" userInput="class" stepKey="grabCat1ParentClassOnProductFromCat12"/>
233233
<assertStringContainsString stepKey="assertCat1HasActiveClassOnProductFromCat12">
234234
<actualResult type="const">$grabCat1ParentClassOnProductFromCat12</actualResult>
235-
<expectedResult type="string">has-active</expectedResult>
235+
<expectedResult type="string">{{CategoryClassStatus.value}}</expectedResult>
236236
</assertStringContainsString>
237237
<!-- Verify Cat 1.2 is still highlighted on product page -->
238238
<executeJS function="return document.querySelectorAll('{{AdminCategorySidebarTreeSection.categoryNotHighlighted}}').length" stepKey="highlightedCategoryAmount_Try7"/>

0 commit comments

Comments
 (0)