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
89 changes: 64 additions & 25 deletions .github/workflows/MAVIS_TEST.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
playwright install
playwright install-deps
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand All @@ -49,10 +48,11 @@ jobs:
HEADLESS: ${{ vars.HEADLESS }}
CAPTURE_SCREENSHOTS: ${{ vars.CAPTURE_SCREENSHOTS }}
TEST_URL: ${{ vars.TEST_URL }}
PARENTAL_CONSENT_URL: ${{ vars.PARENTAL_CONSENT_URL }}
RESET_ENDPOINT: ${{ vars.RESET_ENDPOINT }}
LOGIN_PASSWORD: ${{ secrets.LOGIN_PASSWORD }}
LOGIN_USERNAME: ${{ secrets.LOGIN_USERNAME }}
NURSE_PASSWORD: ${{ secrets.NURSE_PASSWORD }}
NURSE_USERNAME: ${{ secrets.NURSE_USERNAME }}
SUPERUSER_PASSWORD: ${{ secrets.SUPERUSER_PASSWORD }}
SUPERUSER_USERNAME: ${{ secrets.SUPERUSER_USERNAME }}
TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
API_TOKEN: ${{ secrets.API_TOKEN }}
Expand All @@ -65,10 +65,11 @@ jobs:
HEADLESS: ${{ vars.HEADLESS }}
CAPTURE_SCREENSHOTS: ${{ vars.CAPTURE_SCREENSHOTS }}
TEST_URL: ${{ vars.TEST_URL }}
PARENTAL_CONSENT_URL: ${{ vars.PARENTAL_CONSENT_URL }}
RESET_ENDPOINT: ${{ vars.RESET_ENDPOINT }}
LOGIN_PASSWORD: ${{ secrets.LOGIN_PASSWORD }}
LOGIN_USERNAME: ${{ secrets.LOGIN_USERNAME }}
NURSE_PASSWORD: ${{ secrets.NURSE_PASSWORD }}
NURSE_USERNAME: ${{ secrets.NURSE_USERNAME }}
SUPERUSER_PASSWORD: ${{ secrets.SUPERUSER_PASSWORD }}
SUPERUSER_USERNAME: ${{ secrets.SUPERUSER_USERNAME }}
TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
API_TOKEN: ${{ secrets.API_TOKEN }}
Expand All @@ -81,58 +82,96 @@ jobs:
HEADLESS: ${{ vars.HEADLESS }}
CAPTURE_SCREENSHOTS: ${{ vars.CAPTURE_SCREENSHOTS }}
TEST_URL: ${{ vars.TEST_URL }}
PARENTAL_CONSENT_URL: ${{ vars.PARENTAL_CONSENT_URL }}
RESET_ENDPOINT: ${{ vars.RESET_ENDPOINT }}
LOGIN_PASSWORD: ${{ secrets.LOGIN_PASSWORD }}
LOGIN_USERNAME: ${{ secrets.LOGIN_USERNAME }}
NURSE_PASSWORD: ${{ secrets.NURSE_PASSWORD }}
NURSE_USERNAME: ${{ secrets.NURSE_USERNAME }}
SUPERUSER_PASSWORD: ${{ secrets.SUPERUSER_PASSWORD }}
SUPERUSER_USERNAME: ${{ secrets.SUPERUSER_USERNAME }}
TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
API_TOKEN: ${{ secrets.API_TOKEN }}
run: |
echo "::group::Firefox"
pytest --browser_or_device firefox
echo "::endgroup::"
- name: Test on iPhone 12
- name: Test on Edge
env:
HEADLESS: ${{ vars.HEADLESS }}
CAPTURE_SCREENSHOTS: ${{ vars.CAPTURE_SCREENSHOTS }}
TEST_URL: ${{ vars.TEST_URL }}
PARENTAL_CONSENT_URL: ${{ vars.PARENTAL_CONSENT_URL }}
RESET_ENDPOINT: ${{ vars.RESET_ENDPOINT }}
LOGIN_PASSWORD: ${{ secrets.LOGIN_PASSWORD }}
LOGIN_USERNAME: ${{ secrets.LOGIN_USERNAME }}
NURSE_PASSWORD: ${{ secrets.NURSE_PASSWORD }}
NURSE_USERNAME: ${{ secrets.NURSE_USERNAME }}
SUPERUSER_PASSWORD: ${{ secrets.SUPERUSER_PASSWORD }}
SUPERUSER_USERNAME: ${{ secrets.SUPERUSER_USERNAME }}
TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
API_TOKEN: ${{ secrets.API_TOKEN }}
run: |
echo "::group::iPhone 12"
pytest -m mobile --browser_or_device iphone_12
echo "::group::Edge"
pytest --browser_or_device msedge
echo "::endgroup::"
- name: Test on iPhone 11
- name: Test on iPhone 14
env:
HEADLESS: ${{ vars.HEADLESS }}
CAPTURE_SCREENSHOTS: ${{ vars.CAPTURE_SCREENSHOTS }}
TEST_URL: ${{ vars.TEST_URL }}
PARENTAL_CONSENT_URL: ${{ vars.PARENTAL_CONSENT_URL }}
RESET_ENDPOINT: ${{ vars.RESET_ENDPOINT }}
LOGIN_PASSWORD: ${{ secrets.LOGIN_PASSWORD }}
LOGIN_USERNAME: ${{ secrets.LOGIN_USERNAME }}
NURSE_PASSWORD: ${{ secrets.NURSE_PASSWORD }}
NURSE_USERNAME: ${{ secrets.NURSE_USERNAME }}
SUPERUSER_PASSWORD: ${{ secrets.SUPERUSER_PASSWORD }}
SUPERUSER_USERNAME: ${{ secrets.SUPERUSER_USERNAME }}
TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
API_TOKEN: ${{ secrets.API_TOKEN }}
run: |
echo "::group::iPhone 11"
pytest -m mobile --browser_or_device iphone_11
echo "::group::iPhone 14"
pytest -m mobile --browser_or_device iphone_14
echo "::endgroup::"
- name: Test on iPhone 15
env:
HEADLESS: ${{ vars.HEADLESS }}
CAPTURE_SCREENSHOTS: ${{ vars.CAPTURE_SCREENSHOTS }}
TEST_URL: ${{ vars.TEST_URL }}
RESET_ENDPOINT: ${{ vars.RESET_ENDPOINT }}
NURSE_PASSWORD: ${{ secrets.NURSE_PASSWORD }}
NURSE_USERNAME: ${{ secrets.NURSE_USERNAME }}
SUPERUSER_PASSWORD: ${{ secrets.SUPERUSER_PASSWORD }}
SUPERUSER_USERNAME: ${{ secrets.SUPERUSER_USERNAME }}
TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
API_TOKEN: ${{ secrets.API_TOKEN }}
run: |
echo "::group::iPhone 15"
pytest -m mobile --browser_or_device iphone_15
echo "::endgroup::"
- name: Test on iPad Gen 7
env:
HEADLESS: ${{ vars.HEADLESS }}
CAPTURE_SCREENSHOTS: ${{ vars.CAPTURE_SCREENSHOTS }}
TEST_URL: ${{ vars.TEST_URL }}
RESET_ENDPOINT: ${{ vars.RESET_ENDPOINT }}
NURSE_PASSWORD: ${{ secrets.NURSE_PASSWORD }}
NURSE_USERNAME: ${{ secrets.NURSE_USERNAME }}
SUPERUSER_PASSWORD: ${{ secrets.SUPERUSER_PASSWORD }}
SUPERUSER_USERNAME: ${{ secrets.SUPERUSER_USERNAME }}
TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
API_TOKEN: ${{ secrets.API_TOKEN }}
run: |
echo "::group::iPad Gen 7"
pytest -m mobile --browser_or_device ipad_7
echo "::endgroup::"
- name: Test on Google Pixel 5
env:
HEADLESS: ${{ vars.HEADLESS }}
CAPTURE_SCREENSHOTS: ${{ vars.CAPTURE_SCREENSHOTS }}
TEST_URL: ${{ vars.TEST_URL }}
PARENTAL_CONSENT_URL: ${{ vars.PARENTAL_CONSENT_URL }}
RESET_ENDPOINT: ${{ vars.RESET_ENDPOINT }}
LOGIN_PASSWORD: ${{ secrets.LOGIN_PASSWORD }}
LOGIN_USERNAME: ${{ secrets.LOGIN_USERNAME }}
NURSE_PASSWORD: ${{ secrets.NURSE_PASSWORD }}
NURSE_USERNAME: ${{ secrets.NURSE_USERNAME }}
SUPERUSER_PASSWORD: ${{ secrets.SUPERUSER_PASSWORD }}
SUPERUSER_USERNAME: ${{ secrets.SUPERUSER_USERNAME }}
TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
API_TOKEN: ${{ secrets.API_TOKEN }}
Expand Down
13 changes: 9 additions & 4 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,17 @@ def start_browser(pw, browser_or_device: str):
}
try:
match browser_or_device.lower():
case "iphone_12":
case "iphone_14":
_browser = pw.webkit.launch(headless=ce.headless_mode)
_context = _browser.new_context(**pw.devices["iPhone 12"], http_credentials=_http_credentials)
case "iphone_11":
_context = _browser.new_context(**pw.devices["iPhone 14"], http_credentials=_http_credentials)
case "iphone_15":
_browser = pw.chromium.launch(channel="chrome", headless=ce.headless_mode)
_context = _browser.new_context(**pw.devices["iPhone 11"], http_credentials=_http_credentials)
_context = _browser.new_context(**pw.devices["iPhone 15"], http_credentials=_http_credentials)
case "ipad_7":
_browser = pw.chromium.launch(headless=ce.headless_mode)
_context = _browser.new_context(
**pw.devices["iPad (gen 7) landscape"], http_credentials=_http_credentials
)
case "pixel_5":
_browser = pw.webkit.launch(headless=ce.headless_mode)
_context = _browser.new_context(**pw.devices["Pixel 5"], http_credentials=_http_credentials)
Expand Down
14 changes: 8 additions & 6 deletions libs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ class CurrentExecution:
session_screenshots_dir: str = ""
screenshot_sequence: int = 0
capture_screenshot_flag: bool = False
login_username: str = ""
login_password: str = ""
parental_consent_url: str = ""
nurse_username: str = ""
nurse_password: str = ""
superuser_username: str = ""
superuser_password: str = ""
reset_endpoint: str = ""
api_token: str = ""

Expand All @@ -28,11 +29,12 @@ def get_env_values():
CurrentExecution.service_url = os.getenv("TEST_URL")
CurrentExecution.base_auth_username = os.getenv("TEST_USERNAME")
CurrentExecution.base_auth_password = os.getenv("TEST_PASSWORD")
CurrentExecution.login_username = os.getenv("LOGIN_USERNAME")
CurrentExecution.login_password = os.getenv("LOGIN_PASSWORD")
CurrentExecution.nurse_username = os.getenv("NURSE_USERNAME")
CurrentExecution.nurse_password = os.getenv("NURSE_PASSWORD")
CurrentExecution.superuser_username = os.getenv("SUPERUSER_USERNAME")
CurrentExecution.superuser_password = os.getenv("SUPERUSER_PASSWORD")
CurrentExecution.headless_mode = os.getenv("HEADLESS").lower() == "true"
CurrentExecution.capture_screenshot_flag = os.getenv("CAPTURE_SCREENSHOTS").lower() == "true"
CurrentExecution.parental_consent_url = os.getenv("PARENTAL_CONSENT_URL")
CurrentExecution.reset_endpoint = os.getenv("RESET_ENDPOINT")
CurrentExecution.api_token = os.getenv("API_TOKEN")

Expand Down
4 changes: 3 additions & 1 deletion libs/api_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ def api_get(endpoint, header, param):
resp = requests.get(url=endpoint, params=param)
else:
resp = requests.get(url=endpoint, params=param, headers=header)
assert api_operations.__verify_response_code(resp.status_code), f"API GET failed for {endpoint}."
assert api_operations.__verify_response_code(
resp.status_code
), f"API GET failed for {endpoint} - {resp.status_code}."
return resp

@staticmethod
Expand Down
109 changes: 28 additions & 81 deletions libs/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ class api_constants:
API_SUCCESS_STATUS_CODE_MAX: Final[int] = 299


class workflow_type:
APPLICATION: Final[str] = "application"
PARENTAL_CONSENT: Final[str] = "parental_consent"


class data_values:
EMPTY: Final[str] = "<empty>"

Expand Down Expand Up @@ -108,81 +103,33 @@ class escape_characters:
]


class test_data_file_paths:
PARENTAL_CONSENT: Final[str] = "test_data/ParentalConsent.xlsx"
VACCS_HPV_POSITIVE: Final[str] = (
f"test_data/hpv/i_positive.csv{escape_characters.SEPARATOR_CHAR}test_data/hpv/o_positive.csv{escape_characters.SEPARATOR_CHAR}hpv"
)
VACCS_HPV_NEGATIVE: Final[str] = (
f"test_data/hpv/i_negative.csv{escape_characters.SEPARATOR_CHAR}test_data/hpv/o_negative.csv{escape_characters.SEPARATOR_CHAR}hpv"
)
VACCS_HIST_HPV_POSITIVE: Final[str] = (
f"test_data/hpv/i_hist_positive.csv{escape_characters.SEPARATOR_CHAR}test_data/hpv/o_hist_positive.csv{escape_characters.SEPARATOR_CHAR}hpv"
)
VACCS_HIST_HPV_NEGATIVE: Final[str] = (
f"test_data/hpv/i_hist_negative.csv{escape_characters.SEPARATOR_CHAR}test_data/hpv/o_hist_negative.csv{escape_characters.SEPARATOR_CHAR}hpv"
)
VACCS_HPV_DUP_1: Final[str] = (
f"test_data/hpv/i_dup_1.csv{escape_characters.SEPARATOR_CHAR}test_data/hpv/o_dup_1.csv{escape_characters.SEPARATOR_CHAR}hpv"
)
VACCS_HPV_DUP_2: Final[str] = (
f"test_data/hpv/i_dup_2.csv{escape_characters.SEPARATOR_CHAR}test_data/hpv/o_dup_2.csv{escape_characters.SEPARATOR_CHAR}hpv"
)
VACCS_HPV_INVALID_STRUCTURE: Final[str] = (
f"test_data/hpv/i_invalid_structure.csv{escape_characters.SEPARATOR_CHAR}test_data/hpv/o_invalid_structure.csv{escape_characters.SEPARATOR_CHAR}hpv"
)
VACCS_HPV_EMPTY_FILE: Final[str] = (
f"test_data/hpv/i_empty.csv{escape_characters.SEPARATOR_CHAR}test_data/hpv/o_empty.csv{escape_characters.SEPARATOR_CHAR}hpv"
)
VACCS_HPV_HEADER_ONLY: Final[str] = (
f"test_data/hpv/i_header_only.csv{escape_characters.SEPARATOR_CHAR}test_data/hpv/o_header_only.csv{escape_characters.SEPARATOR_CHAR}hpv"
)
COHORTS_POSITIVE: Final[str] = (
f"test_data/cohorts/i_positive.csv{escape_characters.SEPARATOR_CHAR}test_data/cohorts/o_positive.csv{escape_characters.SEPARATOR_CHAR}cohort"
)
COHORTS_NEGATIVE: Final[str] = (
f"test_data/cohorts/i_negative.csv{escape_characters.SEPARATOR_CHAR}test_data/cohorts/o_negative.csv{escape_characters.SEPARATOR_CHAR}cohort"
)
COHORTS_INVALID_STRUCTURE: Final[str] = (
f"test_data/cohorts/i_invalid_structure.csv{escape_characters.SEPARATOR_CHAR}test_data/cohorts/o_invalid_structure.csv{escape_characters.SEPARATOR_CHAR}cohort"
)
COHORTS_EMPTY_FILE: Final[str] = (
f"test_data/cohorts/i_empty.csv{escape_characters.SEPARATOR_CHAR}test_data/cohorts/o_empty.csv{escape_characters.SEPARATOR_CHAR}cohort"
)
COHORTS_HEADER_ONLY: Final[str] = (
f"test_data/cohorts/i_header_only.csv{escape_characters.SEPARATOR_CHAR}test_data/cohorts/o_header_only.csv{escape_characters.SEPARATOR_CHAR}cohort"
)
CHILD_POSITIVE: Final[str] = (
f"test_data/child/i_positive.csv{escape_characters.SEPARATOR_CHAR}test_data/child/o_positive.csv{escape_characters.SEPARATOR_CHAR}child"
)
CHILD_NEGATIVE: Final[str] = (
f"test_data/child/i_negative.csv{escape_characters.SEPARATOR_CHAR}test_data/child/o_negative.csv{escape_characters.SEPARATOR_CHAR}child"
)
CHILD_INVALID_STRUCTURE: Final[str] = (
f"test_data/child/i_invalid_structure.csv{escape_characters.SEPARATOR_CHAR}test_data/child/o_invalid_structure.csv{escape_characters.SEPARATOR_CHAR}child"
)
CHILD_EMPTY_FILE: Final[str] = (
f"test_data/child/i_empty.csv{escape_characters.SEPARATOR_CHAR}test_data/child/o_empty.csv{escape_characters.SEPARATOR_CHAR}child"
)
CHILD_HEADER_ONLY: Final[str] = (
f"test_data/child/i_header_only.csv{escape_characters.SEPARATOR_CHAR}test_data/child/o_header_only.csv{escape_characters.SEPARATOR_CHAR}child"
)
CLASS_POSITIVE: Final[str] = (
f"test_data/class_list/i_positive.csv{escape_characters.SEPARATOR_CHAR}test_data/class_list/o_positive.csv{escape_characters.SEPARATOR_CHAR}class"
)
CLASS_NEGATIVE: Final[str] = (
f"test_data/class_list/i_negative.csv{escape_characters.SEPARATOR_CHAR}test_data/class_list/o_negative.csv{escape_characters.SEPARATOR_CHAR}class"
)
CLASS_INVALID_STRUCTURE: Final[str] = (
f"test_data/class_list/i_invalid_structure.csv{escape_characters.SEPARATOR_CHAR}test_data/class_list/o_invalid_structure.csv{escape_characters.SEPARATOR_CHAR}class"
)
CLASS_EMPTY_FILE: Final[str] = (
f"test_data/class_list/i_empty.csv{escape_characters.SEPARATOR_CHAR}test_data/class_list/o_empty.csv{escape_characters.SEPARATOR_CHAR}class"
)
CLASS_HEADER_ONLY: Final[str] = (
f"test_data/class_list/i_header_only.csv{escape_characters.SEPARATOR_CHAR}test_data/class_list/o_header_only.csv{escape_characters.SEPARATOR_CHAR}class"
)


class file_encoding:
ASCII = "ascii"


class test_data_file_paths:
PARENTAL_CONSENT: Final[str] = "test_data/ParentalConsent.xlsx"
VACCS_HPV_POSITIVE: Final[str] = "VACCS_HPV_POSITIVE"
VACCS_HPV_NEGATIVE: Final[str] = "VACCS_HPV_NEGATIVE"
VACCS_HIST_HPV_POSITIVE: Final[str] = "VACCS_HIST_HPV_POSITIVE"
VACCS_HIST_HPV_NEGATIVE: Final[str] = "VACCS_HIST_HPV_NEGATIVE"
VACCS_HPV_DUP_1: Final[str] = "VACCS_HPV_DUP_1"
VACCS_HPV_DUP_2: Final[str] = "VACCS_HPV_DUP_2"
VACCS_HPV_INVALID_STRUCTURE: Final[str] = "VACCS_HPV_INVALID_STRUCTURE"
VACCS_HPV_EMPTY_FILE: Final[str] = "VACCS_HPV_EMPTY_FILE"
VACCS_HPV_HEADER_ONLY: Final[str] = "VACCS_HPV_HEADER_ONLY"
COHORTS_POSITIVE: Final[str] = "COHORTS_POSITIVE"
COHORTS_NEGATIVE: Final[str] = "COHORTS_NEGATIVE"
COHORTS_INVALID_STRUCTURE: Final[str] = "COHORTS_INVALID_STRUCTURE"
COHORTS_EMPTY_FILE: Final[str] = "COHORTS_EMPTY_FILE"
COHORTS_HEADER_ONLY: Final[str] = "COHORTS_HEADER_ONLY"
CHILD_POSITIVE: Final[str] = "CHILD_POSITIVE"
CHILD_NEGATIVE: Final[str] = "CHILD_NEGATIVE"
CHILD_INVALID_STRUCTURE: Final[str] = "CHILD_INVALID_STRUCTURE"
CHILD_EMPTY_FILE: Final[str] = "CHILD_EMPTY_FILE"
CHILD_HEADER_ONLY: Final[str] = "CHILD_HEADER_ONLY"
CLASS_POSITIVE: Final[str] = "CLASS_POSITIVE"
CLASS_NEGATIVE: Final[str] = "CLASS_NEGATIVE"
CLASS_INVALID_STRUCTURE: Final[str] = "CLASS_INVALID_STRUCTURE"
CLASS_EMPTY_FILE: Final[str] = "CLASS_EMPTY_FILE"
CLASS_HEADER_ONLY: Final[str] = "CLASS_HEADER_ONLY"
18 changes: 11 additions & 7 deletions libs/testdata_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ class testdata_operations:
fo = file_ops.file_operations()
ce = CurrentExecution()

def __init__(self):
self.mapping_df: pd.DataFrame = self.fo.read_csv_to_df(file_path="test_data/file_mapping.csv")

def create_file_from_template(self, template_path: str, file_name_prefix: str) -> str:
_template_text = self.fo.get_file_text(file_path=template_path)
_file_text = []
Expand All @@ -34,7 +37,7 @@ def get_new_nhs_no(self, valid=True) -> str:

def get_expected_errors(self, file_path: str) -> list[str]:
_file_content = self.fo.get_file_text(file_path=file_path)
return _file_content.split("\n") if _file_content is not None else None
return _file_content.split(escape_characters.NEW_LINE) if _file_content is not None else None

def read_spreadsheet(self, file_path: str) -> pd.DataFrame:
_df = self.fo.read_excel_to_df(file_path=file_path)
Expand All @@ -52,10 +55,11 @@ def clean_df(self, df: pd.DataFrame) -> pd.DataFrame:
_df.replace(to_replace="", value=data_values.EMPTY, inplace=True)
return _df

def split_file_paths(self, file_paths: str) -> tuple[str, str]:
file_for = file_paths.split(escape_characters.SEPARATOR_CHAR)[2]
_input_file_path = self.create_file_from_template(
template_path=file_paths.split(escape_characters.SEPARATOR_CHAR)[0], file_name_prefix=file_for
def get_file_paths(self, file_paths: str) -> tuple[str, str]:
_input_template_path: str = self.mapping_df.query("ID==@file_paths")["INPUT_TEMPLATE"].to_string(index=False)
_output_template_path: str = self.mapping_df.query("ID==@file_paths")["OUTPUT_TEMPLATE"].to_string(index=False)
_file_prefix: str = self.mapping_df.query("ID==@file_paths")["FILE_PREFIX"].to_string(index=False)
_input_file_path: str = self.create_file_from_template(
template_path=_input_template_path, file_name_prefix=_file_prefix
)
_output_file_path = file_paths.split(escape_characters.SEPARATOR_CHAR)[1]
return _input_file_path, _output_file_path
return _input_file_path, _output_template_path
2 changes: 1 addition & 1 deletion pages/pg_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def verify_all_expected_links(self):
locator=self.LNK_UNMATCHED_CONSENT_RESPONSES, property=object_properties.VISIBILITY, value=True, exact=True
)
self.po.verify(locator=self.LNK_SCHOOL_MOVES, property=object_properties.VISIBILITY, value=True, exact=True)
self.po.verify(locator=self.LNK_NOTICES, property=object_properties.VISIBILITY, value=True, exact=True)
# self.po.verify(locator=self.LNK_NOTICES, property=object_properties.VISIBILITY, value=True, exact=True) # Superuser only
self.po.verify(locator=self.LNK_ORGANISATION, property=object_properties.VISIBILITY, value=True, exact=True)
self.po.verify(
locator=self.LNK_SERVICE_GUIDANCE, property=object_properties.VISIBILITY, value=True, exact=True
Expand Down
Loading
Loading