Skip to content

Harden the suite: cross-browser CI, parallel runs, typed data, selector + flake fixes - #1

Merged
larelgit merged 12 commits into
mainfrom
improvements
Jun 17, 2026
Merged

larelgit merged 12 commits into
mainfrom
improvements

Conversation

@larelgit

Copy link
Copy Markdown
Owner

Changes
- ci: cross-browser matrix (chromium/firefox/webkit), parallel -n 4,
runs on every push and pull request
- fix(cart): Proceed-To-Checkout is an with no href → no ARIA link role.
Switched to the stable a.check_out class (also survives i18n)
- fix(ci): expose base_url fixture so xdist workers can navigate
(pytest-base-url doesn't propagate the ini value to -n workers); block the
fundingchoices consent overlay that intercepted clicks
- refactor: typed test data with TypedDict (User, PaymentCard), propagated
through page-object signatures so pyright catches bad fields before the form
- refactor(tests): extract register_via_ui flow, kill duplicate signup steps
- build: pin dependency versions for reproducible CI
- test: stop hardcoding --browser in pytest.ini so the CLI override works
- docs/chore: README + .gitignore

Verification
- pyright: 0 errors, 0 warnings
- chromium: 12 passed (-n 4 --reruns 2)
- firefox: 12 passed (-n 4 --reruns 2)

larelgit added 9 commits June 17, 2026 14:56
The Proceed To Checkout button is an <a> without href, so it has no
ARIA link role; matching on display text also breaks under i18n.
Propagate the types through page-object signatures so pyright catches a
missing or misspelled field before it ever reaches the form.
Adds the pull_request trigger so the full cross-browser matrix runs as
required status checks on each PR, not just on push.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the Playwright+pytest E2E suite for more deterministic, scalable CI execution by adding cross-browser coverage, parallelism support, and stronger typing around generated test data and page-object APIs.

Changes:

  • Add cross-browser GitHub Actions matrix (chromium/firefox/webkit) and run the suite in parallel via pytest-xdist.
  • Introduce typed test data (TypedDict) for users and payment cards, and propagate types through tests and page objects.
  • Refactor repeated signup steps into a reusable register_via_ui flow; improve selector stability and update docs/config accordingly.

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
utils/data_generator.py Adds TypedDict-based shapes for generated user and payment card data.
tests/test_checkout.py Uses typed User fixture and the shared register_via_ui flow for the purchase journey.
tests/test_auth.py Refactors signup test to use shared flow; annotates fixtures as User.
requirements.txt Pins Python test dependencies and adds pytest-xdist for parallel execution.
README.md Updates stack + local run instructions for cross-browser and parallel runs.
pytest.ini Removes hardcoded --browser so CLI/CI matrix can override.
pages/signup_page.py Types fill_account_details to accept User.
pages/flows.py Adds shared cross-page register_via_ui flow to deduplicate tests.
pages/checkout_page.py Types payment flow input as PaymentCard.
pages/cart_page.py Switches checkout selector to stable CSS class (a.check_out).
conftest.py Exposes base_url for xdist workers; expands ad/consent host blocking; types helper signature.
.gitignore Tweaks ignored artifacts and virtualenv entries.
.github/workflows/tests.yml Runs suite on push/PR via cross-browser matrix; installs target browser and runs -n 4.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread conftest.py Outdated
Comment thread README.md
larelgit and others added 2 commits June 17, 2026 15:11
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Repo-specific guidance: layout, run commands, selector/POM/typing
conventions, and what to flag in review (sleep, XPath, text selectors,
loosened pins, order-dependent tests).
@larelgit larelgit self-assigned this Jun 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 14 changed files in this pull request and generated no new comments.

@larelgit
larelgit merged commit 9d42b04 into main Jun 17, 2026
6 checks passed
@larelgit
larelgit deleted the improvements branch June 17, 2026 13:18
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