@@ -424,3 +424,45 @@ Feature: Configuring the theme_boost_union plugin on the "Smart menus" page, app
424
424
| 1 | 0 | 0 | after | before | after |
425
425
| 0 | 0 | 2 | before | after | after |
426
426
| 0 | 1 | 2 | before | after | before |
427
+
428
+ @javascript
429
+ Scenario : Smartmenu: Menus: Presentation - Which menu item is active is displayed.
430
+ When I log in as "admin"
431
+ And I navigate to smart menus
432
+ And I click on "Create menu" "button"
433
+ And I set the following fields to these values:
434
+ | Title | Useful Inline Resources |
435
+ | Menu location (s ) | Main |
436
+ | Menu mode | Inline |
437
+ And I click on "Save and return" "button"
438
+ And I set "Useful Inline Resources" smart menu items with the following fields to these values:
439
+ | Title | Privacy |
440
+ | Menu item type | Static |
441
+ | Menu item URL | /admin /tool /dataprivacy /summary .php |
442
+ And I am on site homepage
443
+ Then the "class" attribute of ".primary-navigation [data-key='home'] a" "css_element" should contain "active"
444
+ And the "class" attribute of ".primary-navigation [data-orgposition='4'] a" "css_element" should not contain "active"
445
+ And I click on "Privacy" "link" in the ".primary-navigation" "css_element"
446
+ Then the "class" attribute of ".primary-navigation [data-key='home'] a" "css_element" should not contain "active"
447
+ And the "class" attribute of ".primary-navigation [data-orgposition='4'] a" "css_element" should contain "active"
448
+ And I navigate to smart menus
449
+ And I click on "Create menu" "button"
450
+ And I set the following fields to these values:
451
+ | Title | Useful Resources |
452
+ | Menu location (s ) | Main |
453
+ | Menu mode | Submenu |
454
+ And I click on "Save and return" "button"
455
+ And I set "Useful Resources" smart menu items with the following fields to these values:
456
+ | Title | Contact |
457
+ | Menu item type | Static |
458
+ | Menu item URL |/user /contactsitesupport .php |
459
+ And I set "Useful Resources" smart menu items with the following fields to these values:
460
+ | Title | Moodle |
461
+ | Menu item type | Static |
462
+ | Menu item URL | https ://moodle .org |
463
+ And I follow "Dashboard"
464
+ Then the "class" attribute of ".primary-navigation [data-key='myhome'] a" "css_element" should contain "active"
465
+ And I click on "Useful Resources" "link" in the ".primary-navigation" "css_element"
466
+ And I click on "Contact" "link" in the ".primary-navigation" "css_element"
467
+ Then the "class" attribute of ".primary-navigation [data-key='myhome'] a" "css_element" should not contain "active"
468
+ And the "class" attribute of ".primary-navigation [data-orgposition='5'] a" "css_element" should contain "active"
0 commit comments