chore(e2e): refactor e2e tests to use page object pattern for UI access#8089
Draft
gribnoysup wants to merge 5 commits into
Draft
chore(e2e): refactor e2e tests to use page object pattern for UI access#8089gribnoysup wants to merge 5 commits into
gribnoysup wants to merge 5 commits into
Conversation
Introduces `pages/` directory with `BasePage`, an empty `Pages` interface, and a `buildPages()` factory wired into `Compass`. No page objects yet; slots are added by subsequent migration PRs per the cutover conventions documented in `pages/README.md`.
Adds `helpers/element-commands/` (empty for now), a mapped-type augmentation of `WebdriverIO.Element` driven by `typeof ElementCommands`, and a `browser.addCommand(k, fn, true)` registration loop in `Compass.prepare()`. Ships zero element commands — just the wiring. Generic UI primitives (clickVisible, hover, setValueVisible, …) migrate out of `helpers/commands/` and into element commands as part of the Step 7 WDIO v9 revalidation pass.
Removes the cutover-allowlist step from the page-object migration checklist in pages/README.md to match the decision to skip the PR 0.3 ESLint guard; hard-cutover + TypeScript errors + PR review are sufficient.
….1a) Adds `pages/shared/sidebar/sidebar.page.ts` as the first real page object, folding all connection-list selectors from `helpers/selectors.ts` into the class as private members. Absorbs `sidebar-connection.ts` and `select-connections-menu-item.ts`, wires `browser.pages.sidebar` so helper-command bodies can reach the page object, and migrates every consuming test and command to use `browser.pages.sidebar.*`.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🦨
Attempting to refactor e2e tests to page object pattern we discussed using LLM code-generation tools. Not sure if / when I'll be able to come back to it, but wanted to open a PR if people want to take a look. Some personal learnings from this process: