forked from nhs-england-tools/playwright-python-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 2
Added new POMs to support compartment 4 test #24
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
Closed
victor-soares-ibm
wants to merge
6
commits into
main
from
feature/BCSS-20229-playwright-compartment4-page-object-models
Closed
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
dc1942a
Added new POMs to support compartment 4 test
victor-soares-ibm b9e6dc2
Removed trailing white spaces
victor-soares-ibm b4dca66
Updates post PR comments
victor-soares-ibm 2fff76f
Updated log out method post code review
victor-soares-ibm 5f49aac
Added further POM and locators to support Compartment 4 test
victor-soares-ibm 3b9e90c
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
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
22 changes: 22 additions & 0 deletions
22
pages/screening_practitioner_appointments/practitioner_availability_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,22 @@ | ||
| from playwright.sync_api import Page | ||
| from pages.base_page import BasePage | ||
| from utils.table_util import TableUtils | ||
|
|
||
|
|
||
| class PractitionerAvailabilityPage(BasePage): | ||
| def __init__(self, page: Page): | ||
| super().__init__(page) | ||
| self.page = page | ||
| # Practitioner Availability - page locators | ||
| self.site_id_dropdown = page.locator("#UI_SITE_ID") | ||
| self.screening_practitioner_dropdown = page.locator("#UI_PRACTITIONER_ID") | ||
| self.calendar_button = page.get_by_role("button", name="Calendar") | ||
|
|
||
| def select_site_dropdown_option(self, site_to_use: str) -> None: | ||
| self.site_id_dropdown.select_option(label=site_to_use) | ||
|
|
||
| def select_practitioner_dropdown_option(self, practitioner: str) -> None: | ||
| self.screening_practitioner_dropdown.select_option(label=practitioner) | ||
|
|
||
| def click_calendar_button(self) -> None: | ||
| self.click(self.calendar_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
15 changes: 15 additions & 0 deletions
15
pages/screening_practitioner_appointments/set_availability_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,15 @@ | ||
| from playwright.sync_api import Page | ||
| from pages.base_page import BasePage | ||
|
|
||
|
|
||
| class SetAvailabilityPage(BasePage): | ||
| def __init__(self, page: Page): | ||
| super().__init__(page) | ||
| self.page = page | ||
| # Set Availability - page locators | ||
| self.practitioner_availability_link = page.get_by_role( | ||
| "link", name="Practitioner Availability -" | ||
| ) | ||
|
|
||
| def go_to_practitioner_availability_page(self) -> None: | ||
| self.click(self.practitioner_availability_link) |
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
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.