forked from nhs-england-tools/playwright-python-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 2
https://nhsd-jira.digital.nhs.uk/browse/BCSS-20365 - BCSS - Playwrig… #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
vidhya-chandra1
merged 13 commits into
main
from
feature/BCSS-20365-compartment-5-pom-for-contact-with-patient-page
May 2, 2025
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
4caba62
https://nhsd-jira.digital.nhs.uk/browse/BCSS-20365 - BCSS - Playwrig…
vidhya-chandra1 50a9930
As per PR 42 comments, Pushing the changes.
vidhya-chandra1 b412498
As per PR 42 comments, pushing latest changes.
vidhya-chandra1 e25d735
01/05 - As per PR 42 comments, Pushing the Latest code changes.
vidhya-chandra1 634da6e
Merge remote-tracking branch 'origin' into feature/BCSS-20365-compart…
vidhya-chandra1 7a4a10f
Merge remote-tracking branch 'origin' into feature/BCSS-20365-compart…
Andyg79 8a1701b
Added imports and formatted with Black Formatter
Andyg79 6b8bc1c
Resolving imports issue
Andyg79 0e75436
As per PR 42 comments, Code Refactoring & formatting using Black Form…
vidhya-chandra1 50f90c8
AttendDiagnosticTest pages related lines have modified
mepr1 9612ef1
Modified POM and refactor compartment5 to work it end to end
mepr1 e5de396
Removing Trailing whitespace and unwanted imports
mepr1 22ef26f
Addressing the review comment
mepr1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
pages/screening_subject_search/contact_with_patient_page.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| from playwright.sync_api import Page | ||
| from pages.base_page import BasePage | ||
|
|
||
|
|
||
| class ContactWithPatientPage(BasePage): | ||
| """ | ||
| ContactWithPatientPage class for interacting with 'Contact With Patient' page elements. | ||
| """ | ||
|
|
||
| def __init__(self, page: Page): | ||
| super().__init__(page) | ||
| self.page = page | ||
|
|
||
| # Contact With Patient - Page Locators | ||
| self.contact_direction_dropdown = self.page.locator("#UI_DIRECTION") | ||
| self.contact_made_between_patient_and_dropdown = self.page.locator( | ||
| "#UI_CALLER_ID" | ||
| ) | ||
| self.calendar_button = self.page.get_by_role("button", name="Calendar") | ||
| self.start_time_field = self.page.locator("#UI_START_TIME") | ||
| self.end_time_field = self.page.locator("#UI_END_TIME") | ||
| self.discussion_record_text_field = self.page.locator("#UI_COMMENT_ID") | ||
| self.outcome_dropdown = self.page.locator("#UI_OUTCOME") | ||
| self.save_button = self.page.get_by_role("button", name="Save") | ||
|
|
||
| def select_direction_dropdown_option(self, direction: str) -> None: | ||
| self.contact_direction_dropdown.select_option(label=direction) | ||
|
|
||
| def select_caller_id_dropdown_index_option(self, index_value: int) -> None: | ||
| self.contact_made_between_patient_and_dropdown.select_option(index=index_value) | ||
|
|
||
| def click_calendar_button(self) -> None: | ||
| self.click(self.calendar_button) | ||
|
|
||
| def enter_start_time(self, start_time: str) -> None: | ||
| self.start_time_field.fill(start_time) | ||
|
|
||
| def enter_end_time(self, end_time: str) -> None: | ||
| self.end_time_field.fill(end_time) | ||
|
|
||
| def enter_discussion_record_text(self, value: str) -> None: | ||
| self.discussion_record_text_field.fill(value) | ||
|
|
||
| def select_outcome_dropdown_option(self, outcome: str) -> None: | ||
| self.outcome_dropdown.select_option(label=outcome) | ||
|
|
||
| def click_save_button(self) -> None: | ||
| self.click(self.save_button) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.