chore: v0.2.5 — e2e workflow mandated in AGENTS.md, local dev path removed from config
This commit is contained in:
@@ -5,3 +5,8 @@
|
|||||||
2. **Changelog entry** — every such change is listed in `CHANGELOG.md` with date, time and version (format: `## v<version> — YYYY-MM-DD HH:MM`, then bullet points of what changed).
|
2. **Changelog entry** — every such change is listed in `CHANGELOG.md` with date, time and version (format: `## v<version> — YYYY-MM-DD HH:MM`, then bullet points of what changed).
|
||||||
3. **Version bump** — the version is updated in `package.json`.
|
3. **Version bump** — the version is updated in `package.json`.
|
||||||
4. **Commit + tag** — a commit is created for each change, tagged with the version (e.g. `v0.1.0`).
|
4. **Commit + tag** — a commit is created for each change, tagged with the version (e.g. `v0.1.0`).
|
||||||
|
|
||||||
|
## E2E tests (mandatory)
|
||||||
|
1. **Compose instance is the app under test** — e2e always runs against the docker-compose build behind Traefik (`https://flight.dev.kkhost.pl`), never a local `next dev` on :3000 (dev builds don't render for non-loopback clients, and a second instance splits state).
|
||||||
|
2. **Update before testing** — deploy current code first: `docker compose up -d --build`.
|
||||||
|
3. **Remote browsers** — tests run through the shared Playwright server at `192.168.1.4:3000` (Docker image tag must match this repo's @playwright/test version); plain `npx playwright test` handles deploy + readiness + remote connect (see `playwright.config.ts`).
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v0.2.5 — 2026-09-16 21:22
|
||||||
|
- `AGENTS.md`: new "E2E tests (mandatory)" section codifies the e2e workflow — the compose instance behind Traefik (`https://flight.dev.kkhost.pl`) is always the app under test, never a local `next dev` on :3000; deploy current code first with `docker compose up -d --build`; browsers run through the shared remote Playwright server at `192.168.1.4:3000`, and plain `npx playwright test` handles deploy + readiness + remote connect
|
||||||
|
- `playwright.config.ts`: dropped the `E2E_LOCAL=1` local-dev path accordingly — no more local :3000 dev instance for e2e; the default (and only) mode is browsers on the shared remote Playwright server against the prod build behind Traefik, with `webServer` running `docker compose up -d --build`; `E2E_REMOTE=1` and explicit `PW_TEST_CONNECT_WS_ENDPOINT`/`E2E_BASE_URL` overrides are unchanged
|
||||||
|
|
||||||
## v0.2.4 — 2026-09-16 21:06
|
## v0.2.4 — 2026-09-16 21:06
|
||||||
- `playwright.config.ts`: default e2e mode now targets the prod build behind Traefik (`https://flight.dev.kkhost.pl`) — `baseURL` defaults to that URL and `webServer` runs `docker compose up -d --build` (300 s timeout) instead of `npm run dev`, because `next dev` does not render for non-loopback clients: Turbopack's HMR WebSocket fails from the remote browsers, so the page loads blank
|
- `playwright.config.ts`: default e2e mode now targets the prod build behind Traefik (`https://flight.dev.kkhost.pl`) — `baseURL` defaults to that URL and `webServer` runs `docker compose up -d --build` (300 s timeout) instead of `npm run dev`, because `next dev` does not render for non-loopback clients: Turbopack's HMR WebSocket fails from the remote browsers, so the page loads blank
|
||||||
- `E2E_LOCAL=1` keeps the local iteration path (browsers on this box, `webServer` auto-starts `npm run dev`, baseURL `localhost:3000`) as a fallback when the proxy or compose stack is down; `E2E_REMOTE=1` and explicit `PW_TEST_CONNECT_WS_ENDPOINT`/`E2E_BASE_URL` overrides are unchanged
|
- `E2E_LOCAL=1` keeps the local iteration path (browsers on this box, `webServer` auto-starts `npm run dev`, baseURL `localhost:3000`) as a fallback when the proxy or compose stack is down; `E2E_REMOTE=1` and explicit `PW_TEST_CONNECT_WS_ENDPOINT`/`E2E_BASE_URL` overrides are unchanged
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "flight-ops",
|
"name": "flight-ops",
|
||||||
"version": "0.2.4",
|
"version": "0.2.5",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev -p 3000",
|
"dev": "next dev -p 3000",
|
||||||
|
|||||||
+12
-24
@@ -1,17 +1,12 @@
|
|||||||
import { defineConfig } from '@playwright/test';
|
import { defineConfig } from '@playwright/test';
|
||||||
|
|
||||||
// Where browsers run and how the app is addressed:
|
// Browsers run on the shared remote Playwright server (Docker, 192.168.1.4:3000);
|
||||||
// (default) browsers on the shared remote Playwright server (Docker, 192.168.1.4:3000);
|
// the app under test is always the prod build behind Traefik (docker compose).
|
||||||
// app = prod build behind Traefik at https://flight.dev.kkhost.pl (docker compose).
|
// NOTE: never point this at a local `next dev` — Turbopack's HMR WS fails for
|
||||||
// NOTE: don't point this at `next dev` over the LAN — Turbopack's HMR WS fails for
|
// non-loopback clients and the page renders blank; a second instance also splits state.
|
||||||
// non-loopback clients and the page renders blank.
|
|
||||||
// E2E_LOCAL=1 everything local — browsers here, `npm run dev` on localhost:3000
|
|
||||||
// (fast iteration; fallback when remote server or proxy is down).
|
|
||||||
// E2E_REMOTE=1 runner not on this box: skip webServer; pair with E2E_BASE_URL if needed.
|
|
||||||
const local = process.env.E2E_LOCAL === '1';
|
|
||||||
const remoteRunner = process.env.E2E_REMOTE === '1';
|
const remoteRunner = process.env.E2E_REMOTE === '1';
|
||||||
|
|
||||||
if (!local && !process.env.PW_TEST_CONNECT_WS_ENDPOINT) {
|
if (!process.env.PW_TEST_CONNECT_WS_ENDPOINT) {
|
||||||
process.env.PW_TEST_CONNECT_WS_ENDPOINT = 'ws://192.168.1.4:3000/';
|
process.env.PW_TEST_CONNECT_WS_ENDPOINT = 'ws://192.168.1.4:3000/';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -20,22 +15,15 @@ export default defineConfig({
|
|||||||
timeout: 30_000,
|
timeout: 30_000,
|
||||||
retries: 1,
|
retries: 1,
|
||||||
use: {
|
use: {
|
||||||
baseURL: process.env.E2E_BASE_URL ?? (local ? 'http://localhost:3000' : 'https://flight.dev.kkhost.pl'),
|
baseURL: process.env.E2E_BASE_URL ?? 'https://flight.dev.kkhost.pl',
|
||||||
trace: 'on-first-retry',
|
trace: 'on-first-retry',
|
||||||
},
|
},
|
||||||
webServer: remoteRunner
|
webServer: remoteRunner
|
||||||
? undefined
|
? undefined
|
||||||
: local
|
: {
|
||||||
? {
|
command: 'docker compose up -d --build',
|
||||||
command: 'npm run dev',
|
url: 'https://flight.dev.kkhost.pl/api/airports',
|
||||||
url: 'http://localhost:3000/api/airports',
|
reuseExistingServer: true,
|
||||||
reuseExistingServer: true,
|
timeout: 300_000,
|
||||||
timeout: 120_000,
|
},
|
||||||
}
|
|
||||||
: {
|
|
||||||
command: 'docker compose up -d --build',
|
|
||||||
url: 'https://flight.dev.kkhost.pl/api/airports',
|
|
||||||
reuseExistingServer: true,
|
|
||||||
timeout: 300_000,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user