Skip to content

Commit 2c83e36

Browse files
committed
Add behat tests that confirm that also moodle-an-hochschulen#694 is solved
thanks @wiebkemueller-hsh for linking these issues
1 parent 1dcb02c commit 2c83e36

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/behat/theme_boost_union_smartmenusettings_menus_presentation.feature

+7
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,13 @@ Feature: Configuring the theme_boost_union plugin on the "Smart menus" page, app
442442
And I am on site homepage
443443
Then the "class" attribute of ".primary-navigation [data-key='home'] a" "css_element" should contain "active"
444444
And the "class" attribute of ".primary-navigation [data-orgposition='4'] a" "css_element" should not contain "active"
445+
And "//a[@aria-current = 'true']" "xpath" should exist in the ".primary-navigation [data-key='home']" "css_element"
446+
And "//a[@aria-current = 'true']" "xpath" should not exist in the ".primary-navigation [data-orgposition='4']" "css_element"
445447
And I click on "Privacy" "link" in the ".primary-navigation" "css_element"
446448
Then the "class" attribute of ".primary-navigation [data-key='home'] a" "css_element" should not contain "active"
447449
And the "class" attribute of ".primary-navigation [data-orgposition='4'] a" "css_element" should contain "active"
450+
And "//a[@aria-current = 'true']" "xpath" should exist in the ".primary-navigation [data-orgposition='4']" "css_element"
451+
And "//a[@aria-current = 'true']" "xpath" should not exist in the ".primary-navigation [data-key='home']" "css_element"
448452
And I navigate to smart menus
449453
And I click on "Create menu" "button"
450454
And I set the following fields to these values:
@@ -462,7 +466,10 @@ Feature: Configuring the theme_boost_union plugin on the "Smart menus" page, app
462466
| Menu item URL | https://moodle.org |
463467
And I follow "Dashboard"
464468
Then the "class" attribute of ".primary-navigation [data-key='myhome'] a" "css_element" should contain "active"
469+
And "//a[@aria-current = 'true']" "xpath" should exist in the ".primary-navigation [data-key='myhome']" "css_element"
465470
And I click on "Useful Resources" "link" in the ".primary-navigation" "css_element"
466471
And I click on "Contact" "link" in the ".primary-navigation" "css_element"
467472
Then the "class" attribute of ".primary-navigation [data-key='myhome'] a" "css_element" should not contain "active"
468473
And the "class" attribute of ".primary-navigation [data-orgposition='5'] a" "css_element" should contain "active"
474+
And "//a[@aria-current = 'true']" "xpath" should exist in the ".primary-navigation [data-orgposition='5']" "css_element"
475+

0 commit comments

Comments
 (0)