File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
mavis/test/pages/children Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 11import time
2+ from datetime import timedelta
23
34from playwright .sync_api import Page , expect
45
@@ -32,6 +33,10 @@ def __init__(self, page: Page) -> None:
3233 self .archive_child_record_link = self .page .get_by_role (
3334 "link" , name = "Archive child record"
3435 )
36+ self .vaccination_record_link = self .page .get_by_role (
37+ "link" ,
38+ name = (get_current_datetime () - timedelta (days = 1 )).strftime ("%-d %B %Y" ),
39+ )
3540
3641 @step ("Click on {2} session for programme" )
3742 def click_session_for_programme (
@@ -87,3 +92,7 @@ def click_archive_child_record(self) -> None:
8792
8893 def check_child_is_unarchived (self ) -> None :
8994 expect (self .archive_child_record_link ).to_be_visible ()
95+
96+ @step ("Click on Vaccination record link" )
97+ def click_vaccination_record_link (self ) -> None :
98+ self .vaccination_record_link .click ()
Original file line number Diff line number Diff line change 88from mavis .test .helpers .imms_api_helper import ImmsApiHelper
99from mavis .test .helpers .sidekiq_helper import SidekiqHelper
1010from mavis .test .pages import ChildrenSearchPage , DashboardPage
11+ from mavis .test .pages .children .child_record_page import ChildRecordPage
1112from mavis .test .pages .log_in_page import LogInPage
1213from mavis .test .pages .start_page import StartPage
14+ from mavis .test .pages .vaccination_record .vaccination_record_page import (
15+ VaccinationRecordPage ,
16+ )
1317from mavis .test .utils import get_current_datetime
1418
1519pytestmark = pytest .mark .imms_api
@@ -81,5 +85,11 @@ def test_create_imms_record_then_verify_on_children_page(
8185
8286 # Verify the child appears in search results
8387 child_card_locator = ChildrenSearchPage (page ).search .get_patient_card_locator (child )
84- expect (child_card_locator ).to_be_visible ()
8588 expect (child_card_locator ).to_contain_text ("FluVaccinated" )
89+
90+ ChildrenSearchPage (page ).search .click_child (child )
91+ ChildRecordPage (page ).click_vaccination_record_link ()
92+ VaccinationRecordPage (page ).expect_vaccination_details ("Outcome" , "Vaccinated" )
93+ VaccinationRecordPage (page ).expect_vaccination_details (
94+ "Source" , "External source such as GP practice"
95+ )
You can’t perform that action at this time.
0 commit comments