Skip to content

Commit 8464e0e

Browse files
committed
updated the locator and test run end to end
1 parent 675e2d1 commit 8464e0e

File tree

2 files changed

+6
-23
lines changed

2 files changed

+6
-23
lines changed

pages/screening_subject_search/diagnostic_test_outcome_page.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,19 @@ def __init__(self, page: Page):
1010
super().__init__(page)
1111
self.page = page
1212
# Diagnostic Test Outcome- page locators
13-
self.test_outcome_result = self.page.get_by_role(
14-
"cell", name="outcome_name"
15-
).nth(1)
1613
self.test_outcome_dropdown = self.page.get_by_label(
1714
"Outcome of Diagnostic Test"
1815
)
1916
self.save_button = self.page.get_by_role("button", name="Save")
2017

21-
def get_test_outcome_locator(self, outcome_name: str) -> Locator:
22-
"""
23-
Get the locator for the test outcome dynamically.
24-
25-
Args:
26-
outcome_name (str): The accessible name or visible text of the test outcome cell.
27-
28-
Returns:
29-
Locator: A Playwright Locator object for the specified test outcome cell.
30-
"""
31-
return self.page.get_by_role("cell", name=outcome_name).nth(1)
32-
3318
def verify_diagnostic_test_outcome(self, outcome_name: str) -> None:
3419
"""
3520
Verify that the diagnostic test outcome is visible.
3621
3722
Args:
3823
outcome_name (str): The accessible name or visible text of the test outcome cell to verify.
3924
"""
40-
41-
test_outcome_locator = self.get_test_outcome_locator(outcome_name)
42-
expect(test_outcome_locator).to_be_visible()
25+
expect(self.page.get_by_role("cell", name=outcome_name).nth(1)).to_be_visible()
4326

4427
def select_test_outcome_option(self, option: str) -> None:
4528
"""Select an option from the Outcome of Diagnostic Test dropdown."""

tests/smokescreen/test_compartment_6.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
286286

287287
# This needs to be repeated for two subjects, one old and one not - High Risk Result
288288
# Older patient
289-
nhs_no = "9408053060"
289+
nhs_no = "9772286785"
290290
go_to_investigation_datasets_page(page, nhs_no)
291291

292292
# The following code is on the investigation datasets page
@@ -301,7 +301,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
301301
handover_subject_to_symptomatic_care(page)
302302

303303
# Younger patient
304-
nhs_no = "9867151259"
304+
nhs_no = "9802397318"
305305
go_to_investigation_datasets_page(page, nhs_no)
306306

307307
# The following code is on the investigation datasets page
@@ -331,7 +331,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
331331

332332
# This needs to be repeated for two subjects, one old and one not - LNPCP Result
333333
# Older patient
334-
nhs_no = "9546869694"
334+
nhs_no = "9359523194"
335335
go_to_investigation_datasets_page(page, nhs_no)
336336

337337
# The following code is on the investigation datasets page
@@ -346,7 +346,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
346346
handover_subject_to_symptomatic_care(page)
347347

348348
# Younger patient
349-
nhs_no = "9546692670"
349+
nhs_no = "9828941813"
350350
go_to_investigation_datasets_page(page, nhs_no)
351351

352352
# The following code is on the investigation datasets page
@@ -374,7 +374,7 @@ def test_compartment_6(page: Page, smokescreen_properties: dict) -> None:
374374
)
375375

376376
# This needs to be repeated for 1 subject, age does not matter - Normal Result
377-
nhs_no_normal = "9692517950"
377+
nhs_no_normal = "9852356488"
378378
go_to_investigation_datasets_page(page, nhs_no_normal)
379379

380380
# The following code is on the investigation datasets page

0 commit comments

Comments
 (0)