Skip to content

Commit b22704d

Browse files
committed
Fixed failing FIT KIT page tests
1 parent ca82ec9 commit b22704d

7 files changed

+32
-6
lines changed

pages/fit_test_kits/fit_test_kits_page.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ def __init__(self, page: Page):
3636
self.fit_device_id = self.page.get_by_role("textbox", name="FIT Device ID")
3737
self.fit_test_kits_title = self.page.locator("#ntshPageTitle")
3838

39+
self.sc_fit_configuration_page_screening_centre_dropdown = page.locator(
40+
"#screeningCentres"
41+
)
42+
3943
def verify_fit_test_kits_title(self) -> None:
4044
expect(self.fit_test_kits_title).to_contain_text("FIT Test Kits")
4145

pages/fit_test_kits/maintain_analysers_page.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ def __init__(self, page: Page):
1010
self.maintain_analysers_title = self.page.locator("#ntshPageTitle")
1111

1212
def verify_maintain_analysers_title(self) -> None:
13-
expect(self.maintain_analysers_title).to_contain_text("FIT QC Products")
13+
expect(self.maintain_analysers_title).to_contain_text("Maintain Analysers")

pages/fit_test_kits/screening_incidents_list_page.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ def __init__(self, page: Page):
1111

1212
def verify_screening_incidents_list_title(self) -> None:
1313
expect(self.screening_incidents_list_title).to_contain_text(
14-
"Select Screening Centre"
14+
"Screening Incidents List"
1515
)

pages/fit_test_kits/view_screening_centre_fit_configuration_page.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ def __init__(self, page: Page):
88
self.page = page
99
# View Screening Centre FIT Configuration - page locators
1010
self.view_screening_centre_body = self.page.locator("body")
11+
self.screening_centre_fit_title = self.page.get_by_role(
12+
"heading", name="View Screening Centre FIT"
13+
)
1114

1215
def verify_view_screening_centre_body(self) -> None:
1316
expect(self.view_screening_centre_body).to_contain_text("Maintain Analysers")
17+
18+
def verify_view_screening_centre_fit_title(self) -> None:
19+
expect(self.screening_centre_fit_title).to_contain_text(
20+
"View Screening Centre FIT Configuration"
21+
)

tests/test_bcss_19181_users_permit_list.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def before_test(page: Page):
2929

3030
# @pytest.mark.smoke
3131
def test_only_users_on_approved_can_login_to_bcss(page: Page) -> None:
32+
#NOTE: You must be connected to the non prod vpn to connect to oracle DB and run this test
3233
# Add bcss401 user to approved users list table
3334
OracleDB().populate_ui_approved_users_table("BCSS401")
3435
# BCSS401 user successfully logs in to BCSS whilst on the approved list

tests/test_call_and_recall_page.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
from pages.call_and_recall.invitations_monitoring_page import InvitationsMonitoring
66
from pages.call_and_recall.generate_invitations_page import GenerateInvitations
77
from pages.call_and_recall.non_invitations_days_page import NonInvitationDays
8-
from pages.call_and_recall.age_extension_rollout_plans_page import AgeExtensionRolloutPlans
8+
from pages.call_and_recall.age_extension_rollout_plans_page import (
9+
AgeExtensionRolloutPlans,
10+
)
911
from pages.call_and_recall.invitations_plans_page import InvitationsPlans
1012
from pages.call_and_recall.create_a_plan_page import CreateAPlan
1113
from utils.user_tools import UserTools

tests/test_fit_test_kits_page.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
from pages.fit_test_kits.manage_qc_products_page import ManageQCProducts
1616
from pages.fit_test_kits.maintain_analysers_page import MaintainAnalysers
1717
from utils.user_tools import UserTools
18+
from utils.load_properties_file import PropertiesFile
19+
20+
21+
@pytest.fixture
22+
def general_properties() -> dict:
23+
return PropertiesFile().get_general_properties()
1824

1925

2026
@pytest.fixture(scope="function", autouse=True)
@@ -30,8 +36,9 @@ def before_each(page: Page):
3036
BasePage(page).go_to_fit_test_kits_page()
3137

3238

39+
@pytest.mark.only
3340
@pytest.mark.smoke
34-
def test_fit_test_kits_page_navigation(page: Page) -> None:
41+
def test_fit_test_kits_page_navigation(page: Page, general_properties: dict) -> None:
3542
"""
3643
Confirms all menu items are displayed on the fit test kits page, and that the relevant pages
3744
are loaded when the links are clicked
@@ -68,8 +75,12 @@ def test_fit_test_kits_page_navigation(page: Page) -> None:
6875

6976
# Verify View Screening Centre FIT page opens as expected
7077
FITTestKits(page).go_to_view_screening_centre_fit()
71-
ViewScreeningCentreFITConfiguration(page).verify_view_screening_centre_body()
72-
BasePage(page).click_back_button()
78+
FITTestKits(page).sc_fit_configuration_page_screening_centre_dropdown.select_option(
79+
general_properties["coventry_and_warwickshire_bcs_centre"]
80+
)
81+
ViewScreeningCentreFITConfiguration(page).verify_view_screening_centre_fit_title()
82+
BasePage(page).click_back_button() # Go back to the Select Screening Centre page
83+
BasePage(page).click_back_button() # Go back to the FIT Test Kits page
7384

7485
# Verify Screening Incidents List page opens as expected
7586
FITTestKits(page).go_to_screening_incidents_list()

0 commit comments

Comments
 (0)