forked from nhs-england-tools/playwright-python-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 2
Feature/bcss 20478 c6 pom handover into symptomatic care page #65
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 6 commits into
main
from
feature/BCSS-20478-c6-pom-handover-into-symptomatic-care-page
May 14, 2025
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1f91908
Adding code changes for Handover into symptomatic care page.
vidhya-chandra1 7596eea
Merge branch 'main' of https://github.com/NHSDigital/bcss-playwright …
vidhya-chandra1 bf4ac09
Added POM code for handover into symptomatic care page.
vidhya-chandra1 a682caa
As per PR comments, Code is Refactored & all changes are Updated.
vidhya-chandra1 741111b
As per PR#65 review comments, code change is implemented.
vidhya-chandra1 2e71c28
Merge branch 'main' of github.com:NHSDigital/bcss-playwright into fea…
adrianoaru-nhs 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
33 changes: 33 additions & 0 deletions
33
pages/screening_subject_search/handover_into_symptomatic_care_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,33 @@ | ||
| from playwright.sync_api import Page | ||
| from datetime import datetime | ||
|
|
||
| class HandoverIntoSymptomaticCarePage: | ||
| def __init__(self, page: Page): | ||
| self.page = page | ||
| self.referral_dropdown = self.page.get_by_label("Referral") | ||
| self.calendar_button = self.page.get_by_role("button", name="Calendar") | ||
| self.consultant_link = self.page.locator("#UI_NS_CONSULTANT_PIO_SELECT_LINK") | ||
| self.consultant_option = lambda value: self.page.locator(f'[value="{value}"]:visible') | ||
| self.notes_textbox = self.page.get_by_role("textbox", name="Notes") | ||
| self.save_button = self.page.get_by_role("button", name="Save") | ||
|
|
||
| def select_referral_dropdown_option(self, value: str): | ||
| self.referral_dropdown.select_option(value) | ||
vidhya-chandra1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| def click_calendar_button(self) -> None: | ||
| self.click(self.calendar_button) | ||
|
|
||
| def select_consultant(self, value: str): | ||
| self.consultant_link.click() | ||
| option = self.consultant_option(value) | ||
| option.wait_for(state="visible") | ||
| option.click() | ||
vidhya-chandra1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| def fill_notes(self, notes: str): | ||
| self.notes_textbox.click() | ||
| self.notes_textbox.fill(notes) | ||
|
|
||
| def click_save_button(self): | ||
| self.page.once("dialog", lambda dialog: dialog.accept()) | ||
| self.click(self.save_button) | ||
vidhya-chandra1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
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.