Skip to content

Commit 3bd9e1b

Browse files
chore/playwright mode test plan (#778)
* ci: make standalone playwright manual and document e2e gating * docs(test): refine playwright plan with implemented CI strategy --------- Co-authored-by: Stefan Stidl <stefan.stidl@ffg.at>
1 parent 49f54a5 commit 3bd9e1b

3 files changed

Lines changed: 21 additions & 10 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ env:
2424
IMAGE_NAME: ${{ github.repository }}
2525

2626
jobs:
27+
# Keep e2e in this workflow so Docker image build/push is hard-gated by test success.
28+
# Do not move automatic e2e back to playwright.yml, otherwise master pushes run duplicate e2e jobs.
2729
e2e:
2830
runs-on: ubuntu-latest
2931
timeout-minutes: 45

.github/workflows/playwright.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Playwright E2E
22

3+
# Manual-only by design:
4+
# - Automatic e2e runs that gate Docker image builds live in docker-publish.yml.
5+
# - Keeping this workflow manual avoids running the same e2e suite twice on master pushes.
36
on:
4-
push:
5-
branches:
6-
- master
77
workflow_dispatch:
88

99
jobs:

tests/PLAYWRIGHT_MODES_PLAN.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
## Objective
44
Build a deterministic Playwright test suite that validates LibreSpeed behavior across all supported deployment modes and UI design modes, without asserting real network throughput values.
55

6+
## Current Status
7+
- Phase 1 is implemented and passing in Chromium.
8+
- Added regression coverage for the classic standalone "No servers available" issue path.
9+
- Docker image workflow is hard-gated by e2e (`build` depends on `e2e`).
10+
- Standalone Playwright workflow is manual-only to avoid duplicate e2e runs.
11+
612
## Modes to Cover
713

814
### Docker runtime modes
@@ -68,11 +74,12 @@ Expectations:
6874
## Playwright Architecture
6975

7076
### Files
71-
- `playwright.config.ts`
72-
- `tests/e2e/modes.spec.ts` (runtime-mode smoke)
73-
- `tests/e2e/design-switch.spec.ts` (classic/modern/switch overrides)
74-
- `tests/e2e/helpers/env.ts` (base URLs + mode metadata)
75-
- `tests/e2e/helpers/ui.ts` (shared selectors, start/abort helpers)
77+
- `playwright.config.js`
78+
- `tests/e2e/modes.spec.js` (runtime-mode smoke)
79+
- `tests/e2e/design-switch.spec.js` (classic/modern/switch overrides)
80+
- `tests/e2e/classic-standalone-regression.spec.js` (revert regression guard)
81+
- `tests/e2e/helpers/env.js` (base URLs + mode metadata)
82+
- `tests/e2e/helpers/ui.js` (shared selectors, start/abort helpers)
7683

7784
### Environment boot
7885
- `docker compose -f tests/docker-compose-playwright.yml up -d --build`
@@ -108,8 +115,9 @@ Use role/text selectors anchored on stable labels and IDs already in pages; avoi
108115
- Mitigation: maintain per-design helper selectors with minimal coupling.
109116

110117
## CI Proposal
111-
- Trigger on PR + main branch
112-
- Build test image once, run mode services in parallel ports
118+
- Docker workflow runs e2e first, then build/push only if e2e passes
119+
- Standalone Playwright workflow is `workflow_dispatch` only for manual branch runs
120+
- Keep a single automatic e2e path to avoid duplicate runs
113121
- Playwright retries: `1` in CI, `0` locally
114122
- Upload traces/screenshots on failure only
115123
- Browser scope for v1: Chromium only
@@ -118,3 +126,4 @@ Use role/text selectors anchored on stable labels and IDs already in pages; avoi
118126
1. Browser scope for v1: Chromium only.
119127
2. Telemetry checks are deferred to Phase 3.
120128
3. `backend` mode tests assert backend endpoint contracts only.
129+
4. Automatic e2e gating lives in Docker workflow; standalone Playwright workflow is manual.

0 commit comments

Comments
 (0)