Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ def start_mavis(start_exe_session, start_playwright):
close_browser(browser=_browser, page=ce.page)


# @pytest.fixture
# def start_consent_workflow(start_exe_session, start_playwright):
# _browser, _context = start_browser(pw=start_playwright, browser_or_device=ce.current_browser_name)
# ce.page = _context.new_page()
# ce.page.goto(url=ce.parental_consent_url)
# yield
# close_browser(browser=_browser, page=ce.page)


@pytest.fixture
def start_consent_workflow(start_exe_session, start_playwright):
_browser, _context = start_browser(pw=start_playwright, browser_or_device=ce.current_browser_name)
Expand Down
1 change: 1 addition & 0 deletions libs/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
class object_properties:
TEXT: Final[str] = "text"
VISIBILITY: Final[str] = "visibility"
HREF: Final[str] = "href"


class actions:
Expand Down
3 changes: 3 additions & 0 deletions libs/playwright_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ def get_object_property(self, locator: str, property: str, by_test_id: bool = Fa
else:
elem = self.ce.page.get_by_role(locator).nth(0)
return elem.is_visible()
case object_properties.HREF:
elem = self.ce.page.get_by_role("link", name=locator).nth(0)
return elem.get_attribute(object_properties.HREF)

def perform_action(self, locator, action, value=None, exact: bool = False) -> None:
self.capture_screenshot(identifier=locator, action=f"before-{action}")
Expand Down
7 changes: 7 additions & 0 deletions pages/pg_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,10 @@ def perform_invalid_login(self, user: str, pwd: str, expected_message: str) -> s

def perform_logout(self):
self.po.perform_action(locator=self.BTN_LOGOUT, action=actions.CLICK_BUTTON)

def go_to_url(self, url: str) -> None:
_full_url = f"{self.ce.service_url.replace("/start","")}{url}" if url.startswith("/") else url
self.ce.page.goto(_full_url)

def go_to_login_page(self) -> None:
self.ce.page.goto(self.ce.service_url)
4 changes: 4 additions & 0 deletions pages/pg_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class pg_sessions:
LBL_CHILD_NOT_COMPETENT = "Child assessed as not Gillick competent"
LNK_EDIT_GILLICK_COMPETENCE = "Edit Gillick competence"
BTN_UPDATE_GILLICK_ASSESSMENT = "Update your assessment"
LNK_CONSENT_FORM = "View parental consent form ("

def __get_display_formatted_date(self, date_to_format: str) -> str:
_parsed_date = datetime.strptime(date_to_format, "%Y%m%d")
Expand Down Expand Up @@ -333,3 +334,6 @@ def set_gillick_competence_for_student(self):
self.add_gillick_competence(is_competent=True, competence_details="Gillick competent")
self.click_edit_gillick_competence()
self.edit_gillick_competence(is_competent=False, competence_details="Not Gillick competent")

def get_consent_url(self) -> str:
return self.po.get_object_property(locator=self.LNK_CONSENT_FORM, property=object_properties.HREF)
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ markers =
childlist
vaccsbatch
rav
bugs
Binary file modified test_data/ParentalConsent.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion test_data/child/o_invalid_structure.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The file is missing the following headers: ["CHILD_DATE_OF_BIRTH", "CHILD_FIRST_NAME", "CHILD_LAST_NAME", "CHILD_POSTCODE", "CHILD_SCHOOL_URN"]
The file is missing the following headers: CHILD_DATE_OF_BIRTH, CHILD_FIRST_NAME, CHILD_LAST_NAME, CHILD_POSTCODE, CHILD_SCHOOL_URN
2 changes: 1 addition & 1 deletion test_data/child/o_negative.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Records could not be imported
The records cannot be uploaded due to errors in the CSV file. When fixing these errors, note that the header does not count as a row.
Row 1 CHILD_FIRST_NAME: is required but missing
Row 2 CHILD_LAST_NAME: is required but missing
Row 3 CHILD_SCHOOL_URN: is not included in the list
Row 3 CHILD_SCHOOL_URN: The school URN is not recognised. If you’ve checked the URN, and you believe it’s valid, contact our support organisation.
Row 4 CHILD_DATE_OF_BIRTH: is required but missing
Row 5 CHILD_NHS_NUMBER: is the wrong length (should be 10 characters)
Row 6 CHILD_NHS_NUMBER: is the wrong length (should be 10 characters)
Expand Down
2 changes: 1 addition & 1 deletion test_data/class_list/o_invalid_structure.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The file is missing the following headers: ["CHILD_DATE_OF_BIRTH", "CHILD_FIRST_NAME", "CHILD_LAST_NAME"]
There is a problemThe file is missing the following headers: CHILD_DATE_OF_BIRTH, CHILD_FIRST_NAME, CHILD_LAST_NAME
2 changes: 1 addition & 1 deletion test_data/cohorts/o_invalid_structure.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The file is missing the following headers: ["CHILD_DATE_OF_BIRTH", "CHILD_FIRST_NAME", "CHILD_LAST_NAME", "CHILD_POSTCODE", "CHILD_SCHOOL_URN"]
The file is missing the following headers: CHILD_DATE_OF_BIRTH, CHILD_FIRST_NAME, CHILD_LAST_NAME, CHILD_POSTCODE, CHILD_SCHOOL_URN
4 changes: 2 additions & 2 deletions test_data/cohorts/o_negative.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Records could not be imported
Row 1 CHILD_FIRST_NAME: is required but missing
Row 2 CHILD_LAST_NAME: is required but missing
Row 4 CHILD_DATE_OF_BIRTH: is required but missing
Row 6 CHILD_SCHOOL_URN: is not included in the list
Row 7 CHILD_SCHOOL_URN: is not included in the list
Row 6 CHILD_SCHOOL_URN: The school URN is not recognised. If you’ve checked the URN, and you believe it’s valid, contact our support organisation.
Row 7 CHILD_SCHOOL_URN: The school URN is not recognised. If you’ve checked the URN, and you believe it’s valid, contact our support organisation.
Row 8 CHILD_POSTCODE: is required but missing
Row 9 PARENT_1_EMAIL: ‘example.com’ should be a valid email address, like [email protected]
Row 10 PARENT_2_EMAIL: ‘example.com’ should be a valid email address, like [email protected]
Expand Down
4 changes: 2 additions & 2 deletions test_data/hpv/i_dup_1.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ORGANISATION_CODE,SCHOOL_URN,SCHOOL_NAME,NHS_NUMBER,PERSON_FORENAME,PERSON_SURNAME,PERSON_DOB,PERSON_GENDER_CODE,PERSON_POSTCODE,DATE_OF_VACCINATION,VACCINE_GIVEN,BATCH_NUMBER,BATCH_EXPIRY_DATE,ANATOMICAL_SITE,DOSE_SEQUENCE,VACCINATED,CARE_SETTING
R1L,120026,shaftesbury junior school,9316984933,Forename_5,Surname_5,20120108,Male,WF2 9AB,20241001,Cervarix,270916878,20250730,Left Buttock,1,Y,1
TEST_DESC_IGNORED,ORGANISATION_CODE,SCHOOL_URN,SCHOOL_NAME,NHS_NUMBER,PERSON_FORENAME,PERSON_SURNAME,PERSON_DOB,PERSON_GENDER_CODE,PERSON_POSTCODE,DATE_OF_VACCINATION,VACCINE_GIVEN,BATCH_NUMBER,BATCH_EXPIRY_DATE,ANATOMICAL_SITE,DOSE_SEQUENCE,VACCINATED,CARE_SETTING,PERFORMING_PROFESSIONAL_FORENAME,PERFORMING_PROFESSIONAL_SURNAME,PERFORMING_PROFESSIONAL_EMAIL,CLINIC_NAME,TIME_OF_VACCINATION,REASON_NOT_VACCINATED
P_Gardasil9,R1L,142181,Bohunt School Wokingham,9000000000,ChildFirst1,ChildLast1,20100811,Male,DN9 1PB,<<VACCS_DATE>>,Gardasil9,AutoBatch1,20301231,Left Thigh,1,Y,1,,,[email protected],Clinic,12:00,
4 changes: 2 additions & 2 deletions test_data/hpv/i_dup_2.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ORGANISATION_CODE,SCHOOL_URN,SCHOOL_NAME,NHS_NUMBER,PERSON_FORENAME,PERSON_SURNAME,PERSON_DOB,PERSON_GENDER_CODE,PERSON_POSTCODE,DATE_OF_VACCINATION,VACCINE_GIVEN,BATCH_NUMBER,BATCH_EXPIRY_DATE,ANATOMICAL_SITE,DOSE_SEQUENCE,VACCINATED,CARE_SETTING
R1L,120026,shaftesbury junior school,9316984933,Forename_5,Surname_5,20120108,Male,WF2 9AB,20241001,Cervarix,270916878,20250730,Left Buttock,1,Y,1
TEST_DESC_IGNORED,ORGANISATION_CODE,SCHOOL_URN,SCHOOL_NAME,NHS_NUMBER,PERSON_FORENAME,PERSON_SURNAME,PERSON_DOB,PERSON_GENDER_CODE,PERSON_POSTCODE,DATE_OF_VACCINATION,VACCINE_GIVEN,BATCH_NUMBER,BATCH_EXPIRY_DATE,ANATOMICAL_SITE,DOSE_SEQUENCE,VACCINATED,CARE_SETTING,PERFORMING_PROFESSIONAL_FORENAME,PERFORMING_PROFESSIONAL_SURNAME,PERFORMING_PROFESSIONAL_EMAIL,CLINIC_NAME,TIME_OF_VACCINATION,REASON_NOT_VACCINATED
P_Gardasil9,R1L,142181,Bohunt School Wokingham,9000000000,ChildFirst1,ChildLast1,20100811,Male,DN9 1PB,<<VACCS_DATE>>,Gardasil9,AutoBatch1,20301231,Left Thigh,1,Y,1,,,[email protected],Clinic,12:00,
8 changes: 4 additions & 4 deletions test_data/hpv/i_negative.csv
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ N_FutureDOB,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20
N_NonLeapYearDOB,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100229,Male,DN9 1PB,<<VACCS_DATE>>,Gardasil9,Batch1,20301231,left thigh,1,Y,1,,,[email protected],Clinic,12:00,
N_EmptyGender,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100228,,DN9 1PB,<<VACCS_DATE>>,Gardasil9,Batch1,20301231,left thigh,1,Y,1,,,[email protected],Clinic,12:00,
N_InvalidGender,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100228,Transgender,DN9 1PB,<<VACCS_DATE>>,Gardasil9,Batch1,20301231,left thigh,1,Y,1,,,[email protected],Clinic,12:00,
N_EmptyPostCode,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100228,Female,,<<VACCS_DATE>>,Gardasil9,Batch1,20301231,left thigh,1,Y,1,,,[email protected],Clinic,12:00,
N_EmptyPostCode,R1L,142181,Bohunt School Wokingham,,<<FNAME>>,<<LNAME>>,20100228,Female,,<<VACCS_DATE>>,Gardasil9,Batch1,20301231,left thigh,1,Y,1,,,[email protected],Clinic,12:00,
N_InvalidPostCode,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100228,Female,1AA AA1,<<VACCS_DATE>>,Gardasil9,Batch1,20301231,left thigh,1,Y,1,,,[email protected],Clinic,12:00,
N_EmptyVaccDate,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100228,Female,DN9 1PB,,Gardasil9,Batch1,20301231,left thigh,1,Y,1,,,[email protected],Clinic,12:00,
N_FutureVaccDate,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100228,Female,DN9 1PB,20301231,Gardasil9,Batch1,20301231,left thigh,1,Y,1,,,[email protected],Clinic,12:00,
Expand All @@ -31,6 +31,6 @@ N_InvalidProfSName,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNA
N_InvalidProfEmail,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100228,Female,DN9 1PB,<<VACCS_DATE>>,Gardasil9,Batch1,20301231,left thigh,1,Y,1,,,[email protected],Clinic,12:00,
N_InvalidClinic,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100228,Female,DN9 1PB,<<VACCS_DATE>>,Gardasil9,Batch1,20301231,left thigh,1,Y,2,,,[email protected],Invalid Clinic,12:00,
N_InvalidTime,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100228,Female,DN9 1PB,<<VACCS_DATE>>,Gardasil9,Batch1,20301231,left thigh,1,Y,1,,,[email protected],,32:00,
N_InvalidReason,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100228,Female,DN9 1PB,<<VACCS_DATE>>,Gardasil9,Batch1,20301231,left thigh,1,Y,1,,,[email protected],,32:00,Did not attend1
N_InvalidVaccinatedFlag,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100228,Female,DN9 1PB,<<VACCS_DATE>>,Gardasil9,Batch1,20301231,left thigh,1,X,1,,,[email protected],,32:00,
N_InvalidCareSetting,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100228,Female,DN9 1PB,<<VACCS_DATE>>,Gardasil9,Batch1,20301231,left thigh,1,Y,10,,,[email protected],,32:00,
N_InvalidReason,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100228,Female,DN9 1PB,<<VACCS_DATE>>,Gardasil9,Batch1,20301231,left thigh,1,Y,1,,,[email protected],,12:00,Did not attend1
N_InvalidVaccinatedFlag,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100228,Female,DN9 1PB,<<VACCS_DATE>>,Gardasil9,Batch1,20301231,left thigh,1,X,1,,,[email protected],,12:00,
N_InvalidCareSetting,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100228,Female,DN9 1PB,<<VACCS_DATE>>,Gardasil9,Batch1,20301231,left thigh,1,Y,10,,,[email protected],,12:00,
12 changes: 6 additions & 6 deletions test_data/hpv/i_positive.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ TEST_DESC_IGNORED,ORGANISATION_CODE,SCHOOL_URN,SCHOOL_NAME,NHS_NUMBER,PERSON_FOR
P_Gardasil9,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100811,Male,DN9 1PB,<<VACCS_DATE>>,Gardasil9,AutoBatch1,20301231,Left Thigh,1,Y,1,,,[email protected],Clinic,12:00,
P_Gardasil,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100811,Male,DN9 1PB,<<VACCS_DATE>>,Gardasil,AutoBatch1,20301231,Right Thigh,1,Y,1,,,[email protected],Clinic,12:00,
P_Cervarix,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100811,Male,DN9 1PB,<<VACCS_DATE>>,Cervarix,AutoBatch1,20301231,left upper arm,1,Y,1,,,[email protected],Clinic,12:00,
P_NFA,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100811,Male,ZZ99 3VZ,<<VACCS_DATE>>,Cervarix9,AutoBatch1,20301231,left arm (upper position),1,Y,1,,,[email protected],Clinic,12:00,
P_Add_Not_Known,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100811,Male,ZZ99 3WZ,<<VACCS_DATE>>,Cervarix9,AutoBatch1,20301231,left arm (lower position),1,Y,1,,,[email protected],Clinic,12:00,
P_AllowPastExpiryDate,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100811,Male,ZZ99 3WZ,<<VACCS_DATE>>,Cervarix9,AutoBatch1,20120730,right upper arm,1,Y,1,,,[email protected],Clinic,12:00,
P_SiteRAU,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100811,Male,ZZ99 3WZ,<<VACCS_DATE>>,Cervarix9,AutoBatch1,20320730,right arm (upper position),1,Y,1,,,[email protected],Clinic,12:00,
P_SiteRAL,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100811,Male,ZZ99 3WZ,<<VACCS_DATE>>,Cervarix9,AutoBatch1,20320730,right arm (lower position),1,Y,1,,,[email protected],Clinic,12:00,
P_NotVaccinated,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100811,Male,ZZ99 3WZ,<<VACCS_DATE>>,Cervarix9,AutoBatch1,20320730,right arm (upper position),1,N,1,,,[email protected],Clinic,12:00,Did not attend
P_NFA,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100811,Male,ZZ99 3VZ,<<VACCS_DATE>>,Gardasil9,AutoBatch1,20301231,left arm (upper position),1,Y,1,,,[email protected],Clinic,12:00,
P_Add_Not_Known,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100811,Male,ZZ99 3WZ,<<VACCS_DATE>>,Gardasil9,AutoBatch1,20301231,left arm (lower position),1,Y,1,,,[email protected],Clinic,12:00,
P_AllowPastExpiryDate,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100811,Male,DN9 1PB,<<VACCS_DATE>>,Gardasil9,AutoBatch1,20120730,right upper arm,1,Y,1,,,[email protected],Clinic,12:00,
P_SiteRAU,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100811,Male,DN9 1PB,<<VACCS_DATE>>,Gardasil9,AutoBatch1,20320730,right arm (upper position),1,Y,1,,,[email protected],Clinic,12:00,
P_SiteRAL,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100811,Male,DN9 1PB,<<VACCS_DATE>>,Gardasil9,AutoBatch1,20320730,right arm (lower position),1,Y,1,,,[email protected],Clinic,12:00,
P_NotVaccinated,R1L,142181,Bohunt School Wokingham,<<NHS_NO>>,<<FNAME>>,<<LNAME>>,20100811,Male,DN9 1PB,<<VACCS_DATE>>,,,,,1,N,1,,,[email protected],Clinic,12:00,Did not attend
2 changes: 1 addition & 1 deletion test_data/hpv/o_invalid_structure.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The file is missing the following headers: ["ORGANISATION_CODE", "SCHOOL_URN", "SCHOOL_NAME", "NHS_NUMBER", "PERSON_FORENAME", "PERSON_SURNAME", "PERSON_DOB", "PERSON_POSTCODE", "DATE_OF_VACCINATION", "VACCINE_GIVEN", "BATCH_NUMBER", "BATCH_EXPIRY_DATE", "ANATOMICAL_SITE"]
The file is missing the following headers: ORGANISATION_CODE, SCHOOL_URN, SCHOOL_NAME, NHS_NUMBER, PERSON_FORENAME, PERSON_SURNAME, PERSON_DOB, PERSON_POSTCODE, DATE_OF_VACCINATION, VACCINE_GIVEN, BATCH_NUMBER, BATCH_EXPIRY_DATE, ANATOMICAL_SITE
16 changes: 10 additions & 6 deletions test_data/hpv/o_negative.csv
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,19 @@ Row 15 PERSON_POSTCODE: Enter a valid postcode, such as SW1A 1AA
Row 16 PERSON_POSTCODE: Enter a valid postcode, such as SW1A 1AA
Row 17 DATE_OF_VACCINATION: Enter a date in the correct format
Row 18 DATE_OF_VACCINATION: The vaccination date is outside the programme. Enter a date before today.
Row 19 VACCINE_GIVEN: Enter a valid vaccine, eg Gardasil 9.
Row 20 VACCINE_GIVEN: Enter a valid vaccine, eg Gardasil 9.
Row 19 VACCINE_GIVEN: Enter a valid vaccine, eg Gardasil9.
Row 20 VACCINE_GIVEN: Enter a valid vaccine, eg Gardasil9.
Row 21 BATCH_NUMBER: Enter a batch number.
Row 22 BATCH_EXPIRY_DATE: Enter a batch expiry date.
Row 23 ANATOMICAL_SITE: Enter an anatomical site.
Row 24 ANATOMICAL_SITE: Enter a anatomical site that is appropriate for the vaccine.
Row 25 DOSE_SEQUENCE: The dose sequence number cannot be greater than 3. Enter a dose sequence number, for example, 1, 2 or 3.
Row 26 DOSE_SEQUENCE: must be less than or equal to 3
Row 27 CARE_SETTING: Enter a care setting.
Row 28 CARE_SETTING: Enter a valid care setting.
Row 32 PERFORMING_PROFESSIONAL_EMAIL: Enter a valid email address
Row 34 TIME_OF_VACCINATION: Enter a time in the correct format
Row 35 REASON_NOT_VACCINATED: Enter a reason
Row 28 PERFORMING_PROFESSIONAL_EMAIL: Enter a valid email address
Row 29 PERFORMING_PROFESSIONAL_EMAIL: Enter a valid email address
Row 30 PERFORMING_PROFESSIONAL_EMAIL: Enter a valid email address
Row 31 CLINIC_NAME: Enter a clinic name
Row 32 TIME_OF_VACCINATION: Enter a time in the correct format
Row 34 VACCINATED: You need to record whether the child was vaccinated or not. Enter ‘Y’ or ‘N’ in the ‘vaccinated’ column.BATCH_EXPIRY_DATE: must be blankBATCH_NUMBER: must be blankANATOMICAL_SITE: must be blankREASON_NOT_VACCINATED: Enter a valid reasonVACCINE_GIVEN: must be blank
Row 35 CARE_SETTING: Enter a valid care setting.
2 changes: 1 addition & 1 deletion test_data/hpv/o_positive.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ Completed
Programme HPV
Type Immunisation list
Imported by Nurse Joy
15 vaccination records
9 vaccination records
19 changes: 10 additions & 9 deletions tests/test_02_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,24 @@ class Test_Regression_Sessions:
dashboard_page = pg_dashboard.pg_dashboard()
sessions_page = pg_sessions.pg_sessions()

@pytest.mark.sessions
@pytest.mark.order(201)
def test_reg_create_valid_session(self, start_mavis):
@pytest.fixture
def test_setup(self, start_mavis):
self.login_page.perform_valid_login()
self.dashboard_page.click_sessions()
yield
self.login_page.perform_logout()

@pytest.mark.sessions
@pytest.mark.order(201)
def test_reg_create_valid_session(self, test_setup):
self.sessions_page.schedule_a_valid_session()

@pytest.mark.sessions
@pytest.mark.order(202)
def test_reg_delete_all_sessions(self, start_mavis):
self.login_page.perform_valid_login()
self.dashboard_page.click_sessions()
def test_reg_delete_all_sessions(self, test_setup):
self.sessions_page.delete_all_sessions()

@pytest.mark.sessions
@pytest.mark.order(203)
def test_reg_create_invalid_session(self, start_mavis):
self.login_page.perform_valid_login()
self.dashboard_page.click_sessions()
def test_reg_create_invalid_session(self, test_setup):
self.sessions_page.create_invalid_session()
12 changes: 6 additions & 6 deletions tests/test_03_class_list_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Test_Regression_Class_List_Upload:
sessions_page = pg_sessions.pg_sessions()

@pytest.fixture()
def create_session(self, start_mavis: None):
def test_setup(self, start_mavis: None):
self.login_page.perform_valid_login()
self.dashboard_page.click_sessions()
self.sessions_page.schedule_a_valid_session()
Expand All @@ -23,25 +23,25 @@ def create_session(self, start_mavis: None):

@pytest.mark.classlist
@pytest.mark.order(301)
def test_reg_class_list_file_upload_positive(self, create_session: None):
def test_reg_class_list_file_upload_positive(self, test_setup: None):
self.sessions_page.upload_class_list(file_paths=test_data_file_paths.CLASS_POSITIVE)

@pytest.mark.classlist
@pytest.mark.order(302)
def test_reg_class_list_file_upload_negative(self, create_session: None):
def test_reg_class_list_file_upload_negative(self, test_setup: None):
self.sessions_page.upload_class_list(file_paths=test_data_file_paths.CLASS_NEGATIVE)

@pytest.mark.classlist
@pytest.mark.order(303)
def test_reg_class_list_file_structure(self, create_session: None):
def test_reg_class_list_file_structure(self, test_setup: None):
self.sessions_page.upload_invalid_class_list_records(file_paths=test_data_file_paths.CLASS_INVALID_STRUCTURE)

@pytest.mark.classlist
@pytest.mark.order(304)
def test_reg_class_list_no_record(self, create_session: None):
def test_reg_class_list_no_record(self, test_setup: None):
self.sessions_page.upload_invalid_class_list_records(file_paths=test_data_file_paths.CLASS_HEADER_ONLY)

@pytest.mark.classlist
@pytest.mark.order(305)
def test_reg_class_list_empty_file(self, create_session: None):
def test_reg_class_list_empty_file(self, test_setup: None):
self.sessions_page.upload_invalid_class_list_records(file_paths=test_data_file_paths.CLASS_EMPTY_FILE)
Loading
Loading