AutorÃa | Ultima modificación | Ver Log |
@coreFeature: Menu navigation has accurate checkmarks in single activity course formatIn order to correctly navigate the menu itemsAs an adminI need to see accurate checkmarks besides the menu items I am currently on while in a single activity format courseBackground:Given the following "users" exist:| username | firstname | lastname | email || teacher1 | T1 | Teacher1 | teacher1@example.com || student1 | Student | 1 | student1@example.com |And the following "courses" exist:| fullname | shortname | format | activitytype || Course 1 | C1 | singleactivity | quiz |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher || student1 | C1 | student |And the following "activities" exist:| activity | name | intro | course | idnumber || quiz | Quiz 1 | Quiz 1 for testing the Add menu | C1 | quiz1 |Scenario: Admin can see checkmark beside menu item they are currently on in a single activity format courseGiven I log in as "admin"And I am on "Course 1" course homepageWhen I navigate to "Backup" in current page administrationThen menu item "Backup" should be activeWhen I navigate to "Permissions" in current page administrationThen menu item "Permissions" should be activeAnd menu item "Backup" should not be activeWhen I navigate to "Participants" in current page administrationThen menu item "Participants" should be activeAnd menu item "Backup" should not be activeAnd menu item "Permissions" should not be activeWhen I navigate to "Grades" in current page administrationThen menu item "Grades" should be activeAnd menu item "Backup" should not be activeAnd menu item "Permissions" should not be activeAnd menu item "Participants" should not be activeScenario: Admin can see checkmark beside menu item they are currently on after pressing browser back button in a singleactivity format courseGiven I log in as "admin"And I am on "Course 1" course homepageWhen I navigate to "Backup" in current page administrationThen menu item "Backup" should be activeWhen I navigate to "Permissions" in current page administrationThen menu item "Permissions" should be activeAnd menu item "Backup" should not be activeWhen I press the "back" button in the browserThen menu item "Backup" should be activeAnd menu item "Permissions" should not be activeScenario: Admin can see checkmark beside menu item they are currently on after pressing browser back button whenjumping between course and activity menu in a single activity format courseGiven I log in as "admin"And I am on "Course 1" course homepageWhen I navigate to "Backup" in current page administrationThen menu item "Backup" should be activeWhen I navigate to "Participants" in current page administrationThen menu item "Participants" should be activeAnd menu item "Backup" should not be activeWhen I press the "back" button in the browserThen menu item "Backup" should be activeAnd menu item "Participants" should not be active@javascriptScenario: Admin should not see checkmark if link is not navigated to in current browser for single activity format quizGiven I log in as "admin"And I am on "Course 1" course homepageAnd I update the href of the "//*//a/following-sibling::*//a[contains(text(), 'Participants')]" "xpath" link to "#"When I navigate to "Participants" in current page administrationThen menu item "Participants" should not be activeAnd I update the href of the "//*//a/following-sibling::*//a[contains(text(), 'Backup')]" "xpath" link to "#"When I click on "//*//a[contains(text(),'Activity')]" "xpath"And I click on "//*//a/following-sibling::*//a[contains(text(), 'Backup')]" "xpath"Then menu item "Backup" should not be active