Skip to content

Conversation

@jf-x-dev
Copy link
Collaborator

This is a very large PR which splits the massive SessionsPage into the subpages:

  • SessionsChildrenPage
  • SessionsConsentPage
  • SessionsEditPage
  • SessionsOverviewPage
  • SessionsPatientPage
  • SessionsPatientSessionActivityPage
  • SessionsPsdPage
  • SessionsRecordVaccinationsPage
  • SessionsRegisterPage
  • SessionsSearchPage
  • SessionsTriagePage
  • SessionsVaccinationWizardPage

This makes the file sessions.py easier to read, understand and work on. It also makes our code adhere more strictly to the Playwright POM. Some other things happened unintentionally during this refactor which would be pretty annoying to split into other commits / PRs:

  • Some unused functions/locators were removed
  • The "cleanup" step, where all session dates are deleted at the end of a test run, was removed. This is because you can no longer delete all session dates at a session. The tests still work as they currently only schedule session dates if necessary.

There are some less positive effects that this PR has:

  • sessions.py is still very large
  • Tests get longer as many utility functions were split up
  • Some of our tests now have a very large number of parameters, due to each page having its own fixture.

These will be addressed in future PRs.

Due to AI usage etc, the split was done all at once which makes it very hard to review. At the very least, it would be worth checking that the new page objects have appropriate names.

@jf-x-dev jf-x-dev requested a review from a team as a code owner November 20, 2025 11:24
@jf-x-dev jf-x-dev merged commit 05d98a6 into main Nov 20, 2025
5 checks passed
@jf-x-dev jf-x-dev deleted the refactor-sessions-page branch November 20, 2025 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants