@@ -22,16 +22,27 @@ class pg_programmes:
2222 LBL_IMPORT_STARTED = "Import processing started"
2323 LBL_PARAGRAPH = "paragraph"
2424 LBL_MAIN = "main"
25+ LNK_DOSE2_CHILD = "Dose2 Dose2"
26+ BTN_EDIT_VACCINATION_RECORD = "Edit vaccination record"
2527
2628 def click_hpv (self ):
2729 self .po .perform_action (locator = self .LNK_HPV , action = actions .CLICK_LINK )
2830
2931 def click_imports (self ):
3032 self .po .perform_action (locator = self .LNK_IMPORTS , action = actions .CLICK_LINK )
3133
34+ def click_vaccinations (self ):
35+ self .po .perform_action (
36+ locator = "get_by_label('Secondary menu').get_by_role('link', name='Vaccinations').click()" ,
37+ action = actions .CHAIN_LOCATOR_ACTION ,
38+ )
39+
3240 def click_cohorts (self ):
3341 self .po .perform_action (locator = self .LNK_COHORTS , action = actions .CLICK_LINK )
3442
43+ def click_edit_vaccination_record (self ):
44+ self .po .perform_action (locator = self .BTN_EDIT_VACCINATION_RECORD , action = actions .CLICK_BUTTON )
45+
3546 def click_import_records (self ):
3647 self .po .perform_action (locator = self .LNK_IMPORT_RECORDS , action = actions .CLICK_LINK )
3748
@@ -76,6 +87,9 @@ def click_uploaded_file_datetime(self):
7687 def record_upload_time (self ):
7788 self .upload_time = get_link_formatted_date_time ()
7889
90+ def click_dose2_child (self ):
91+ self .po .perform_action (locator = self .LNK_DOSE2_CHILD , action = actions .CLICK_LINK )
92+
7993 def verify_upload_output (self , file_path : str ):
8094 _expected_errors = self .tdo .get_expected_errors (file_path = file_path )
8195 if _expected_errors is not None :
@@ -156,3 +170,21 @@ def upload_invalid_hpv_child_records(self, file_paths: str):
156170 self .choose_file_child_records (file_path = _input_file_path )
157171 self .click_continue ()
158172 self .verify_upload_output (file_path = _output_file_path )
173+
174+ def edit_dose_to_not_given (self ):
175+ self .click_hpv ()
176+ self .click_vaccinations ()
177+ self .click_dose2_child ()
178+ self .click_edit_vaccination_record ()
179+ self .po .perform_action (locator = "Change outcome" , action = actions .CLICK_LINK )
180+ self .po .perform_action (locator = "They refused it" , action = actions .RADIO_BUTTON_SELECT )
181+ self .click_continue ()
182+ self .po .perform_action (locator = "Save changes" , action = actions .CLICK_BUTTON )
183+ self .po .verify (
184+ locator = self .LBL_MAIN ,
185+ property = object_properties .TEXT ,
186+ value = "!Sorry, there’s a problem with the service" ,
187+ exact = False ,
188+ by_test_id = False ,
189+ chain_locator = False ,
190+ )
0 commit comments