@@ -65,13 +65,13 @@ def test_accessibility(self):
6565 self .then_the_accessibility_baseline_is_met ()
6666
6767 def test_status_attribution_display (self ):
68- user_in_progress = UserFactory (first_name = "Alice" , last_name = "User" )
69- self .login_as_role (Role .CLINICAL , user_in_progress )
68+ self .given_i_am_logged_in_as_a_user_with_appointment_in_progress ()
7069 self .and_a_clinic_exists_that_is_run_by_my_provider ()
7170 self .and_there_are_appointments_in_various_states_with_attributed_users ()
7271 self .and_i_am_on_the_clinic_show_page ()
7372 self .when_i_click_on_all ()
7473 self .then_i_can_see_status_attribution_for_relevant_appointments ()
74+ self .then_i_can_see_you_in_status_attribution ()
7575
7676 def and_a_clinic_exists_that_is_run_by_my_provider (self ):
7777 user_assignment = self .current_user .assignments .first ()
@@ -326,3 +326,15 @@ def then_i_can_see_status_attribution_for_relevant_appointments(self):
326326
327327 cancelled_row = self .page .locator ("tr" ).filter (has_text = "Participant Cancelled" )
328328 expect (cancelled_row ).to_contain_text ("by C. User" )
329+
330+ def given_i_am_logged_in_as_a_user_with_appointment_in_progress (self ):
331+ # Create and log in the user who will be attributed with the IN_PROGRESS status
332+ user_in_progress = UserFactory (first_name = "Alice" , last_name = "User" )
333+ self .login_as_role (Role .CLINICAL , user_in_progress )
334+
335+ def then_i_can_see_you_in_status_attribution (self ):
336+ # Check that the "(you)" indicator is present for the in-progress attribution
337+ in_progress_row = self .page .locator ("tr" ).filter (
338+ has_text = "Participant InProgress"
339+ )
340+ expect (in_progress_row ).to_contain_text ("(you)" )
0 commit comments