|
48 | 48 | <comment userInput="Click on first category" stepKey="openFirstCategoryPage"/>
|
49 | 49 | <click selector="{{AdminCategorySidebarTreeSection.categoryInTree($$category1.name$$)}}" stepKey="clickCategory1Name"/>
|
50 | 50 | <waitForPageLoad stepKey="waitForCategory1Page"/>
|
51 |
| - <!--Check if current category is highlighted--> |
52 |
| - <comment userInput="Check if current category is highlighted" stepKey="checkCateg1NameIsHighlighted"/> |
| 51 | + <!--Check if current category is highlighted and the others are not--> |
| 52 | + <comment userInput="Check if current category is highlighted and the others are not" stepKey="checkCateg1NameIsHighlighted"/> |
53 | 53 | <grabAttributeFrom selector="{{AdminCategorySidebarTreeSection.categoryHighlighted($$category1.name$$)}}" userInput="class" stepKey="grabCategory1Class"/>
|
54 | 54 | <assertContains expectedType="string" expected="active" actual="$grabCategory1Class" stepKey="assertCategory1IsHighlighted"/>
|
| 55 | + <executeJS function="return document.querySelectorAll('{{AdminCategorySidebarTreeSection.categoryNotHighlighted}}').length" stepKey="highlightedAmount"/> |
| 56 | + <assertEquals expectedType="int" expected="1" actual="$highlightedAmount" stepKey="assertRestCategories1IsNotHighlighted"/> |
55 | 57 | <!--See products in the category page-->
|
56 | 58 | <comment userInput="See products in the category page" stepKey="seeProductsInCategoryPage"/>
|
57 | 59 | <seeElement selector="{{StorefrontCategoryMainSection.specifiedProductItemInfo($product1.name$)}}" stepKey="seeProduct1InCategoryPage"/>
|
|
60 | 62 | <comment userInput="Click on second category" stepKey="openSecondCategoryPage"/>
|
61 | 63 | <click selector="{{AdminCategorySidebarTreeSection.categoryInTree($$category2.name$$)}}" stepKey="clickCategory2Name"/>
|
62 | 64 | <waitForPageLoad stepKey="waitForCategory2Page"/>
|
63 |
| - <!--Check if current category is highlighted--> |
64 |
| - <comment userInput="Check if current category is highlighted" stepKey="checkCateg2NameIsHighlighted"/> |
| 65 | + <!--Check if current category is highlighted and the others are not--> |
| 66 | + <comment userInput="Check if current category is highlighted and the others are not" stepKey="checkCateg2NameIsHighlighted"/> |
65 | 67 | <grabAttributeFrom selector="{{AdminCategorySidebarTreeSection.categoryHighlighted($$category2.name$$)}}" userInput="class" stepKey="grabCategory2Class"/>
|
66 | 68 | <assertContains expectedType="string" expected="active" actual="$grabCategory2Class" stepKey="assertCategory2IsHighlighted"/>
|
| 69 | + <executeJS function="return document.querySelectorAll('{{AdminCategorySidebarTreeSection.categoryNotHighlighted}}').length" stepKey="highlightedAmount2"/> |
| 70 | + <assertEquals expectedType="int" expected="1" actual="$highlightedAmount2" stepKey="assertRestCategories1IsNotHighlighted2"/> |
67 | 71 | </test>
|
68 | 72 | </tests>
|
0 commit comments