|
| 1 | +@cpts_ui @header_links @regression @blocker @smoke @ui |
| 2 | +@allure.tms:https://nhsd-jira.digital.nhs.uk/browse/AEA-XXXX |
| 3 | +Feature: Header links are displayed according to the user's state and the current page |
| 4 | + |
| 5 | + ############################################################################ |
| 6 | + # EXIT |
| 7 | + ############################################################################ |
| 8 | + Scenario: Exit link is shown on the logout page once the user signs out |
| 9 | + Given I am logged in |
| 10 | + And The logout confirmation modal is displayed |
| 11 | + When I confirm the logout |
| 12 | + Then I see the "Exit" link |
| 13 | + |
| 14 | + Scenario: Exit link is shown on the select your role page if the user has no roles with access |
| 15 | + Given I am logged in without access |
| 16 | + Then I see the "Exit" link |
| 17 | + |
| 18 | + Scenario: Exit link is not shown if user has at least one role with access on the select your role page |
| 19 | + Given I am logged in with a single access role |
| 20 | + Then I do not see the "Exit" link |
| 21 | + |
| 22 | + ############################################################################ |
| 23 | + # LOGOUT |
| 24 | + ############################################################################ |
| 25 | + Scenario: Logout link is shown for a logged in user |
| 26 | + Given I am logged in |
| 27 | + Then I see the "Logout" link |
| 28 | + |
| 29 | + Scenario: Logout link is not shown if user is not logged in |
| 30 | + Given I am on the home page |
| 31 | + Then I do not see the "Logout" link |
| 32 | + |
| 33 | + ############################################################################ |
| 34 | + # SELECT YOUR ROLE |
| 35 | + ############################################################################ |
| 36 | + Scenario: Select Your Role link is shown on the homepage, if we dont select a role |
| 37 | + Given I am logged in |
| 38 | + And I am on the home page |
| 39 | + Then I see the "Select Your Role" link |
| 40 | + |
| 41 | + Scenario: Select Your Role link is not shown if I go to the select your role page |
| 42 | + Given I am logged in |
| 43 | + And I go to the select your role page |
| 44 | + Then I do not see the "Select Your Role" link |
| 45 | + |
| 46 | + Scenario: Select Your Role link is not shown if I already have a selected role |
| 47 | + Given I am logged in |
| 48 | + And I have a selected role |
| 49 | + And I am on the homepage |
| 50 | + Then I do not see the "Select Your Role" link |
| 51 | + |
| 52 | + ############################################################################ |
| 53 | + # CHANGE ROLE |
| 54 | + ############################################################################ |
| 55 | + Scenario: Change Role link is shown if the user has a selected role |
| 56 | + Given I am logged in |
| 57 | + And I have a selected role |
| 58 | + And I am on the home page |
| 59 | + Then I see the "Change Role" link |
| 60 | + |
| 61 | + Scenario: Change Role link is not shown if the user has no selected role |
| 62 | + Given I am logged in |
| 63 | + And I am on the homepage |
| 64 | + Then I do not see the "Change Role" link |
| 65 | + |
| 66 | + # FIXME: Address this when the SPA is fixed! |
| 67 | + # Since the SPA is broken, there's actually no reliable way to navigate to the SYR page |
| 68 | + # once you've selected a role! |
| 69 | + # @fixme |
| 70 | + # Scenario: Change Role link is not shown if I go to the select your role page |
| 71 | + # Given I am logged in |
| 72 | + # And I have a selected role |
| 73 | + # And I go to the select your role page |
| 74 | + # Then I do not see the "Change Role" link |
| 75 | + |
| 76 | + Scenario: Change Role link is not shown if I am on the change role page |
| 77 | + Given I am logged in |
| 78 | + When I go to change my role |
| 79 | + Then I do not see the "Change Role" link |
0 commit comments