Skip to content

Commit 6db2c7f

Browse files
authored
Feature/bcss 21320 fobtregressiontests scenario 17 (#151)
<!-- markdownlint-disable-next-line first-line-heading --> ## Description Adding scenario 17 from FOBTRegressionTests feature file ## Context Adding scenario 17 from FOBTRegressionTests feature file ## Type of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply. --> - [x ] Refactoring (non-breaking change) - [x ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would change existing functionality) - [ ] Bug fix (non-breaking change which fixes an issue) ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [x ] I am familiar with the [contributing guidelines](https://github.com/nhs-england-tools/playwright-python-blueprint/blob/main/CONTRIBUTING.md) - [ x] I have followed the code style of the project - [x ] I have added tests to cover my changes (where appropriate) - [x ] I have updated the documentation accordingly - [ ] This PR is a result of pair or mob programming --- ## Sensitive Information Declaration To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including [PII (Personal Identifiable Information) / PID (Personal Identifiable Data)](https://digital.nhs.uk/data-and-information/keeping-data-safe-and-benefitting-the-public) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter. - [x ] I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.
1 parent 0b615da commit 6db2c7f

File tree

2 files changed

+759
-1
lines changed

2 files changed

+759
-1
lines changed

pages/screening_subject_search/handover_into_symptomatic_care_page.py

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
from playwright.sync_api import Page
22
from pages.base_page import BasePage
3-
from datetime import datetime
3+
44

55
class HandoverIntoSymptomaticCarePage(BasePage):
66
"""
77
HandoverIntoSymptomaticCarePage class for interacting with the 'Handover Into Symptomatic Care' page elements.
88
"""
9+
910
def __init__(self, page: Page):
1011
self.page = page
1112
self.referral_dropdown = self.page.get_by_label("Referral")
1213
self.calendar_button = self.page.get_by_role("button", name="Calendar")
1314
self.consultant_link = self.page.locator("#UI_NS_CONSULTANT_PIO_SELECT_LINK")
15+
self.practitioner_dropdown = self.page.locator("#UI_SCREENING_PRACTITIONER")
1416
self.notes_textbox = self.page.get_by_role("textbox", name="Notes")
1517
self.save_button = self.page.get_by_role("button", name="Save")
18+
self.cease_from_program_dropdown = self.page.locator(
19+
"#UI_CEASE_FROM_PROGRAM_ID"
20+
)
1621

1722
def select_referral_dropdown_option(self, value: str) -> None:
1823
"""
@@ -23,6 +28,14 @@ def select_referral_dropdown_option(self, value: str) -> None:
2328
"""
2429
self.referral_dropdown.select_option(value)
2530

31+
def select_practitioner_from_index(self, practitioner_index: int) -> None:
32+
"""
33+
Select the first option from the Practitioner dropdown.
34+
Args:
35+
practitioner_index (int): The index of the practitioner to select.
36+
"""
37+
self.practitioner_dropdown.select_option(index=practitioner_index)
38+
2639
def click_calendar_button(self) -> None:
2740
"""Click the calendar button to open the calendar picker."""
2841
self.click(self.calendar_button)
@@ -52,3 +65,13 @@ def fill_notes(self, notes: str) -> None:
5265
def click_save_button(self) -> None:
5366
"""Click the save button to save the changes."""
5467
self.safe_accept_dialog(self.save_button)
68+
69+
def select_cease_from_program(self, cease: bool) -> None:
70+
"""
71+
Select an option from the Cease from Program dropdown.
72+
73+
Args:
74+
cease (bool): True to cease from program, False otherwise
75+
"""
76+
value = "Yes" if cease else "No"
77+
self.cease_from_program_dropdown.select_option(value)

0 commit comments

Comments
 (0)