Skip to content

Commit 4062f22

Browse files
Docstring is newly added for POM - ContactWithPatientPage. (#68)
<!-- markdownlint-disable-next-line first-line-heading --> ## Description BCSS - Playwright - Compartment 5 - Docstring creation - POM for 'Contact with Patient' page ## Context BCSS - Playwright - Compartment 5 - Docstring creation - POM for 'Contact with Patient' page ## Type of changes Docstring is Newly created for POM for 'Contact with Patient' page - [x] Refactoring (non-breaking change) - [ ] 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 - [ ] 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 7f5f78a commit 4062f22

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

pages/screening_subject_search/contact_with_patient_page.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,63 @@ def __init__(self, page: Page):
2424
self.save_button = self.page.get_by_role("button", name="Save")
2525

2626
def select_direction_dropdown_option(self, direction: str) -> None:
27+
"""
28+
Select an option from the 'Direction' dropdown by its label.
29+
30+
Args:
31+
direction (str): The label of the direction option to select.
32+
"""
2733
self.contact_direction_dropdown.select_option(label=direction)
2834

2935
def select_caller_id_dropdown_index_option(self, index_value: int) -> None:
36+
"""
37+
Select an option from the 'Caller ID' dropdown by its index.
38+
39+
Args:
40+
index_value (int): The index of the caller ID option to select.
41+
"""
3042
self.contact_made_between_patient_and_dropdown.select_option(index=index_value)
3143

3244
def click_calendar_button(self) -> None:
45+
"""Click the 'Calendar' button to open the calendar picker."""
3346
self.click(self.calendar_button)
3447

3548
def enter_start_time(self, start_time: str) -> None:
49+
"""
50+
Enter a value into the 'Start Time' field.
51+
52+
Args:
53+
start_time (str): The start time to enter into the field.
54+
"""
3655
self.start_time_field.fill(start_time)
3756

3857
def enter_end_time(self, end_time: str) -> None:
58+
"""
59+
Enter a value into the 'End Time' field.
60+
61+
Args:
62+
end_time (str): The end time to enter into the field.
63+
"""
3964
self.end_time_field.fill(end_time)
4065

4166
def enter_discussion_record_text(self, value: str) -> None:
67+
"""
68+
Enter text into the 'Discussion Record' field.
69+
70+
Args:
71+
value (str): The text to enter into the discussion record field.
72+
"""
4273
self.discussion_record_text_field.fill(value)
4374

4475
def select_outcome_dropdown_option(self, outcome: str) -> None:
76+
"""
77+
Select an option from the 'Outcome' dropdown by its label.
78+
79+
Args:
80+
outcome (str): The label of the outcome option to select.
81+
"""
4582
self.outcome_dropdown.select_option(label=outcome)
4683

4784
def click_save_button(self) -> None:
85+
"""Click the 'Save' button to save the contact with patient form."""
4886
self.click(self.save_button)

0 commit comments

Comments
 (0)