@@ -49,7 +49,6 @@ def __init__(
4949 self .conflicting_consent_checkbox = self .page .get_by_role (
5050 "checkbox" , name = "Conflicting consent"
5151 )
52- self .current_year_radio = page .get_by_role ("radio" , name = "2024 to 2025" )
5352
5453 self .programme_tab_link = self .page .get_by_role ("link" , name = "Programme" )
5554 self .import_class_lists_link = self .page .get_by_role (
@@ -119,7 +118,6 @@ def __init__(
119118 self .update_results_button = self .page .get_by_role (
120119 "button" , name = "Update results"
121120 )
122- self .year_10_checkbox = self .page .get_by_role ("checkbox" , name = "Year 10" )
123121 self .confirm_button = self .page .get_by_role ("button" , name = "Confirm" )
124122 self .search_textbox = self .page .get_by_role ("textbox" , name = "Search" )
125123 self .search_button = self .page .get_by_role ("button" , name = "Search" )
@@ -183,6 +181,10 @@ def __init__(
183181 vaccinations_card = page .get_by_role ("table" , name = "Vaccinations" )
184182 self .vaccinations_card_row = vaccinations_card .get_by_role ("row" )
185183 self .sessions_link = page .get_by_role ("link" , name = "Sessions" , exact = True ).first
184+ self .advanced_filters_link = page .get_by_text ("Advanced filters" )
185+ self .missing_nhs_no_checkbox = self .page .get_by_role (
186+ "checkbox" , name = "Children missing an NHS number"
187+ )
186188
187189 def __get_display_formatted_date (self , date_to_format : str ) -> str :
188190 _parsed_date = datetime .strptime (date_to_format , "%Y%m%d" )
@@ -248,6 +250,7 @@ def click_session_for_programme_group(self, location: str, programme_group: str)
248250
249251 self .search_textbox .fill (str (location ))
250252 self .search_button .click ()
253+
251254 self .page .get_by_role ("link" , name = str (location )).click ()
252255
253256 expect (self .page .locator ("h1" , has_text = str (location ))).to_be_visible (
@@ -395,17 +398,25 @@ def click_confirm_button(self):
395398
396399 @step ("Check box for year {1}" )
397400 def check_year_checkbox (self , year : str ):
398- self .page .get_by_role ("checkbox" , name = f"Year { year } " ).check ()
401+ if year == "0" :
402+ self .page .get_by_role ("checkbox" , name = "Reception" ).check ()
403+ else :
404+ self .page .get_by_role ("checkbox" , name = f"Year { year } " ).check ()
399405
400406 @step ("Uncheck box for year {1}" )
401407 def uncheck_year_checkbox (self , year : str ):
402- self .page .get_by_role ("checkbox" , name = f"Year { year } " ).uncheck ()
408+ if year == "0" :
409+ self .page .get_by_role ("checkbox" , name = "Reception" ).uncheck ()
410+ else :
411+ self .page .get_by_role ("checkbox" , name = f"Year { year } " ).uncheck ()
403412
404- @step ("Check box for year {1}" )
405- def check_box_for_year_other_than (self , year : str ):
406- self .page .get_by_role ("checkbox" , name = "Year " ).filter (
407- has_not_text = year
408- ).first .check ()
413+ @step ("Click Advanced filters" )
414+ def click_advanced_filters (self ):
415+ self .advanced_filters_link .click ()
416+
417+ @step ("Check Children missing an NHS number" )
418+ def check_missing_nhs_no_checkbox (self ):
419+ self .missing_nhs_no_checkbox .check ()
409420
410421 @step ("Click on Record vaccinations" )
411422 def click_record_vaccinations_tab (self ):
@@ -632,14 +643,6 @@ def verify_scheduled_date(self, message: str):
632643 self .expect_main_to_contain_text (message )
633644 self .click_continue_link ()
634645
635- @step ("Click on 2024 to 2025" )
636- def click_add_to_current_year (self ):
637- self .current_year_radio .check ()
638- self .click_continue_button ()
639-
640- def select_current_year (self ):
641- self .page .get_by_role ("radio" , name = "2024 to 2025" ).check ()
642-
643646 def schedule_a_valid_session (
644647 self , location : str , programme_group : str , for_today : bool = False
645648 ):
@@ -689,32 +692,6 @@ def get_online_consent_url(self, *programmes: list[Programme]) -> str:
689692 link_text = f"View the { ' and ' .join (str (programme ) for programme in programmes )} online consent form"
690693 return str (self .page .get_by_role ("link" , name = link_text ).get_attribute ("href" ))
691694
692- def verify_attendance_filters (self ):
693- self .click_register_tab ()
694-
695- search_summary = self .page .get_by_text ("Showing 1 to" )
696-
697- expect (search_summary ).not_to_have_text ("Showing 1 to 1 of 1 children" )
698- self .year_10_checkbox .check ()
699- self .click_on_update_results ()
700-
701- expect (search_summary ).to_have_text ("Showing 1 to 1 of 1 children" )
702-
703- self .year_10_checkbox .uncheck ()
704- self .click_on_update_results ()
705-
706- expect (search_summary ).not_to_have_text ("Showing 1 to 1 of 1 children" )
707-
708- def select_year_groups (self , * year_groups : int ) -> None :
709- for year_group in year_groups :
710- if year_group == 0 :
711- self .page .get_by_role ("checkbox" , name = "Reception" ).check ()
712- else :
713- self .page .get_by_role (
714- "checkbox" , name = f"Year { year_group } " , exact = True
715- ).check ()
716- self .click_continue_button ()
717-
718695 def register_child_as_attending (self , child : Child ):
719696 self .click_register_tab ()
720697 self .search_for (str (child ))
0 commit comments