File tree Expand file tree Collapse file tree 3 files changed +25
-12
lines changed
Expand file tree Collapse file tree 3 files changed +25
-12
lines changed Original file line number Diff line number Diff line change @@ -75,3 +75,12 @@ Feature: Role selection page renders roles properly when logged in
7575 When I click on the summary expander
7676 Then I can see the summary container
7777 And I cannot see the summary table body
78+
79+ @allure.tms:https://nhsd-jira.digital.nhs.uk/browse/AEA-4645
80+ Scenario : User with assigned roles sees the correct logged-in message
81+ Given I am logged in as a user with the role "Health Professional Access Role"
82+ And I am accessing "GREENE'S PHARMACY (FG419)"
83+ When I view the homepage
84+ Then I see a message saying "You are currently logged in at {pharmacy} with {role}."
85+ | pharmacy | role |
86+ | GREENE 'S PHARMACY (FG419 ) | Health Professional Access Role |
Original file line number Diff line number Diff line change @@ -102,3 +102,13 @@ def i_can_see_the_no_access_table_body_data(context):
102102 select_your_role_page = SelectYourRole (context .page )
103103 expect (select_your_role_page .first_row_org_name_no_access ).to_be_visible ()
104104 expect (select_your_role_page .first_row_role_name_no_access ).to_be_visible ()
105+
106+
107+ @then ('I see a message saying "You are currently logged in at {pharmacy} with {role}."' )
108+ def i_see_logged_in_message (context , pharmacy , role ):
109+ select_your_role_page = SelectYourRole (context .page )
110+ message = f"You are currently logged in at { pharmacy } with { role } ."
111+ expect (select_your_role_page .logged_in_message_container ).to_contain_text (
112+ "Information: Information: You"
113+ )
114+ expect (select_your_role_page .logged_in_message ).to_contain_text (message )
Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ def __init__(self, page: Page):
1515 )
1616 self .role_column_header = page .get_by_role ("columnheader" , name = "Role" )
1717
18+ # Logged-in message
19+ self .logged_in_message_container = page .get_by_text (
20+ "Information: Information: You"
21+ )
22+ self .logged_in_message = page .get_by_text ("You are currently logged in" )
23+
1824 # Roles without access
1925 self .roles_without_access_table_body = page .get_by_role ("group" ).locator ("div" )
2026
@@ -46,15 +52,3 @@ def __init__(self, page: Page):
4652 self .first_row_role_name_no_access = page .get_by_role (
4753 "cell" , name = "General Medical Practitioner"
4854 ).first
49-
50- self .no_access_header = page .locator (".nhsuk-heading-xl" )
51- self .no_access_message = page .get_by_text ("None of the roles on your" )
52- self .roles_without_access_header = page .get_by_role (
53- "heading" , name = "Your roles without access"
54- )
55- self .first_row_org_name_no_access = page .get_by_role (
56- "cell" , name = "NO ORG NAME (ODS: A21464)"
57- ).first
58- self .first_row_role_name_no_access = page .get_by_role (
59- "cell" , name = "General Medical Practitioner"
60- ).first
You can’t perform that action at this time.
0 commit comments