Skip to content

feat(e2e): playwright golden-path smoke (sub-PR 7 of 2026.5)#1072

Open
danh91 wants to merge 4 commits into
feat/2026.5from
feat/2026.5-e2e-smoke
Open

feat(e2e): playwright golden-path smoke (sub-PR 7 of 2026.5)#1072
danh91 wants to merge 4 commits into
feat/2026.5from
feat/2026.5-e2e-smoke

Conversation

@danh91

@danh91 danh91 commented Apr 19, 2026

Copy link
Copy Markdown
Member

Summary

Adds a Playwright golden-path smoke suite wired into CI as a new e2e job so the 2026.5 platform upgrade has an executable browser-level safety net. 14 specs cover auth / shipments / tracking / orders / settings against a stubbed carrier, running in a dedicated Docker compose stack.

Part of the 2026.5 umbrella release (#1065), sub-PR 7.

Decisions

Question Resolution
Test home (e2e/ vs packages/e2e/) packages/e2e/ — already landed as a workspace package from the shipping-platform sync; expanded rather than parallel-created.
Carrier stub wiremock/wiremock:3.9.1 with canned JSON mappings in packages/e2e/fixtures/wiremock/ — zero live carrier credentials in CI.
Package manager npm — matches the repo (root package.json pins npm@10.8.2); task mentioned pnpm but the monorepo is npm-based.
PRD reference PRDs/RELEASE_2026_5_PLATFORM_UPGRADE.md was not present in this worktree; implementation followed the sub-PR 7 scope described in the task brief.

Changes

Feat

  • packages/e2e/playwright.config.ts — Chromium + Firefox projects, retries: 2 on CI, trace: "on-first-retry", video: "retain-on-failure", GitHub + HTML reporters.
  • packages/e2e/fixtures/auth.ts — extended Playwright test with an authenticated KarrioApi fixture.
  • packages/e2e/helpers/api.ts — REST client wrapping Playwright's request; JWT bearer auth via /api/token.
  • packages/e2e/helpers/selectors.ts — shared role-based locators (no CSS class dependencies).
  • packages/e2e/helpers/env.ts, helpers/wait-for-stack.ts — env resolution + health-poll helper.
  • packages/e2e/specs/ — 14 smoke specs:
    Suite Count Coverage
    auth.spec.ts 3 authenticated home, session reload, guest redirect
    shipment.spec.ts 4 REST seeding, list view, create entry, API round-trip
    tracking.spec.ts 2 trackers list, public tracking page
    order.spec.ts 2 orders list, draft-order entry point
    settings.spec.ts 3 api keys, connections, organization profile
  • packages/e2e/scripts/seed.ts — idempotent REST-based data seed.
  • docker-compose.e2e.yml — minimised CI stack: Postgres (tmpfs) + API + dashboard + WireMock carrier stub; no Redis.
  • packages/e2e/fixtures/wiremock/ — canned rate / shipment / tracking JSON.
  • .github/workflows/tests.yml — new e2e job: boots compose, installs browsers, seeds tenant, runs specs, uploads HTML report + traces + videos as artifacts on failure.

Why

Goal G6 of the 2026.5 release: browser-level smoke coverage before any release tag is cut. Edge case E5 (regression slipping through despite green unit tests) is mitigated by the required e2e gate on refs/tags/2026.* pushes.

Verification

Item Status
14 specs authored Confirmed (specs/*.spec.ts)
Playwright config: Chromium + Firefox, retries=2 on CI, trace/video Confirmed (playwright.config.ts)
Carrier calls stubbed via WireMock Confirmed (fixtures/wiremock/*.json)
CI job added with artifact upload Confirmed (.github/workflows/tests.yml e2e job)
docker compose -f docker-compose.e2e.yml up -d --wait Not verified locally — no Docker runtime available in the worktree environment. Healthchecks are authored per compose best-practice; first CI run will be the real smoke.
npm --prefix packages/e2e test Not verified locally — requires the compose stack.

Follow-ups

  • Branch protection: to make e2e a required check on refs/tags/2026.*, the repo-settings rule needs to be updated manually (the workflow itself does not enforce this).
  • If flakes recur in the first few runs, file an issue per spec — do not bypass retries: 2.
  • The legacy tests/rate-sheet-editor.spec.ts remains untouched; the new specs/ directory is the smoke home.

danh91 and others added 4 commits April 19, 2026 04:02
…core) (#1068)

Exported from jtlshipping/shipping-platform main via
./bin/export-karrio-patches --force per PRDs/SUBTREE_SYNC_WORKFLOW.md.

1445 files across modules/connectors (579), modules/core (198),
apps/api (160), modules/manager (113), modules/pricing (75),
modules/sdk (55), modules/events (46), modules/orders (39),
modules/data (36), modules/documents (28), modules/graph (25),
modules/admin (24) + packages, plugins, scripts, and PRDs.

Major functional additions from shipping-platform:
- rate sheet Excel/CSV import/export (apps/, packages/, modules/data/)
- Playwright e2e package scaffold (packages/e2e/)
- dhl_parcel_de improvements (optional dims, reference fallback)
- carrier i18n translation expansions (dhl_parcel_de, asendia)
- ruff-format reflow across the tree from SP's linter config

54 three-way conflicts resolved per SUBTREE_SYNC_WORKFLOW.md matrix
(see PR body for per-file decisions). Smartkargo, FedEx signature
defaults, rate-sheet UX variants, and graph archive/unarchive kept
at upstream (ours); carrier i18n dicts merged; e2e fixtures and
de locale compiled catalog copied directly from SP.

Pre-excluded from apply: 10 phantom-deletions of SP-experimental
credential/secret modules that never reached upstream, and 5
binary-new files that needed direct copy (xlsx fixtures, django.mo).
No JTL-proprietary modules in diff.
- Chromium + Firefox projects with retries/trace/video on CI.
- KarrioApi REST helper (JWT bearer auth) for fast seeding.
- Shared role-based selectors, env resolution, stack-health poller.
- Playwright test fixture extending with an authenticated api client.

refs #1065
14 golden-path specs covering the dashboard smoke surface:
- auth (3): authenticated home, session reload, guest redirect.
- shipment (4): REST seeding, list view, create entry point, API round-trip.
- tracking (2): trackers list, public tracking lookup.
- order (2): orders list, draft-order entry point.
- settings (3): api keys, carrier connections, organization profile.

Specs use the KarrioApi REST helper for data seeding and role-based
locators for assertions — no CSS class dependencies.

refs #1065
- docker-compose.e2e.yml: db + api + dashboard + wiremock carrier stub,
  tmpfs postgres, no redis (worker runs in-process), healthchecks drive
  `docker compose up --wait`.
- WireMock mappings for rate/shipment/tracking — no live carrier calls.
- scripts/seed.ts: idempotent REST-based seed (address + parcel).
- New `e2e` GitHub Actions job: boots the stack, installs browsers,
  seeds, runs specs/, uploads report + traces + videos on failure.
- README refresh covering layout, env vars, local vs CI invocation.

refs #1065
@vercel

vercel Bot commented Apr 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
karrio-web Ready Ready Preview, Comment Apr 19, 2026 0:27am

Request Review

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.

1 participant