Skip to content

[Web] Add Playwright harness and checkout happy path - #855

Merged
kiftio merged 5 commits into
mainfrom
web-e2e-harness
Oct 2, 2026
Merged

kiftio merged 5 commits into
mainfrom
web-e2e-harness

Conversation

@kiftio

@kiftio kiftio commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

What changes are you making?

Web tests currently run in a simulated DOM. Add a Playwright harness that loads the built web package in Chromium and exercises a real popup and cross-origin protocol exchange. The first happy-path test checks presentation, the ready handshake, public start/complete events and checkout snapshots, and host-driven closing.

The synthetic checkout needs no storefront configuration. Telemetry is disabled and unexpected external requests are blocked and fail the test. The private test package lives in platforms/web/test/e2e and shares the existing web workspace and lockfile, following the React Native integration-harness pattern.

Run the suite through dev web e2e or dev web check. Web CI runs it and retains reports and failure traces. The existing web path filter covers the harness. dev up provisions Chromium using Playwright’s idempotent installer; dev web e2e install remains available for targeted setup or recovery.

For this initial increment, the browser suite shares the Web CI job to reuse dependency setup and the SDK build. The latest PR run spent about 24 seconds installing Chromium and 1.7 seconds running Playwright; the full Web job took about 55 seconds. dev web build and dev web test remain independent of browser tests. As coverage grows, especially with multiple browsers or real checkout flows, a separate required Web E2E job would allow independent execution and retries, following the native E2E pattern.

Builds on Mark Murray’s harness and ideas in #418, with a focused initial test for the current lifecycle API. Error cases, further presentation coverage, origin validation, and Firefox/WebKit coverage are follow-up work.

How to test

dev up
dev web e2e

Validated locally with shadowenv exec --:

  • dev web check: lint, 304 unit tests, E2E typecheck, Chromium happy path, package build and verification, and sample build.
  • Frozen-lockfile workspace installation and packed-files snapshot.
  • Chromium provisioning command from the new harness path. Full dev up also passed before the directory move.
  • Changed-file filter and native E2E run-plan tests: 69 tests passed.
  • git diff --check.

Setup and harness documentation: platforms/web/test/e2e/README.md.

The normal PR CI run after publishing passed on the current commit, including the Linux Web job, Chromium happy path, report upload, and CI Required.

Stack

@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Sep 30, 2026
@kiftio
kiftio marked this pull request as ready for review September 30, 2026 22:07
@kiftio
kiftio requested a review from a team as a code owner September 30, 2026 22:07
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Web — Coverage Report

Lines Statements Branches Functions
Coverage: 96%
95.16% (374/393) 84.32% (199/236) 97.08% (100/103)

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Package Size

Platform Artifact Base Head Delta
Web npm tarball 89.4 KiB 89.4 KiB +21 B
Web file breakdown
File Base Head Delta
dist/index.js.map 249.1 KiB 249.1 KiB 0 B
dist/index.d.ts 47.9 KiB 47.9 KiB 0 B
dist/custom-elements.json 47.5 KiB 47.5 KiB 0 B
dist/index.js 33.3 KiB 33.3 KiB 0 B
README.md 20.1 KiB 20.1 KiB 0 B
package.json 3.1 KiB 3.2 KiB +126 B
LICENSE 1.1 KiB 1.1 KiB 0 B

Measured from the PR base SHA and PR head SHA. The file breakdown shows uncompressed sizes within each package artifact, so individual files do not sum to the compressed artifact total. This comment reports package artifact sizes only; it is not a final app binary-size report.

Comment thread platforms/web/test/e2e/README.md Outdated
@kiftio
kiftio merged commit f245de7 into main Oct 2, 2026
26 checks passed
@kiftio
kiftio deleted the web-e2e-harness branch October 2, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50662 Rebase Checkout Kit on UCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants