chore: v0.2.2 — e2e config supports remote runner (E2E_REMOTE/E2E_BASE_URL)

This commit is contained in:
2026-09-16 20:06:42 +00:00
parent abdeca2a6a
commit 185e914db2
3 changed files with 15 additions and 8 deletions
+3
View File
@@ -1,5 +1,8 @@
# Changelog
## v0.2.2 — 2026-09-16 20:05
- `playwright.config.ts`: e2e suite can now run on a different machine than the app — with `E2E_REMOTE=1` the local `webServer` block is skipped entirely and `baseURL` defaults to `http://flight.dev.kkhost.pl`; `E2E_BASE_URL` overrides `baseURL` in both modes; with no env vars set behavior is unchanged (local `webServer` auto-starts `npm run dev`)
## v0.2.1 — 2026-09-16 19:49
- Clamp map zoom to the useful gameplay range: `minZoom: 3` / `maxZoom: 14` on the MapLibre options in `components/Map.tsx` (exported as `MIN_ZOOM`/`MAX_ZOOM`) — wheel travel from the Europe overview is now ~10 levels instead of ~16, and street-level zoom past the z12 pitch transition no longer exists
- e2e: new test that wheels well past both limits via `page.mouse.wheel` (basemap tile fetches blocked for speed/determinism; clamping is pure camera behavior) and asserts via `expect.poll` on the map instance that `getZoom()` settles at 14 / 3, i.e. clamped within [3, 14]
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "flight-ops",
"version": "0.2.1",
"version": "0.2.2",
"private": true,
"scripts": {
"dev": "next dev -p 3000",
+11 -7
View File
@@ -1,17 +1,21 @@
import { defineConfig } from '@playwright/test';
const remote = !!process.env.E2E_REMOTE;
export default defineConfig({
testDir: './e2e',
timeout: 30_000,
retries: 1,
use: {
baseURL: 'http://localhost:3000',
baseURL: process.env.E2E_BASE_URL ?? (remote ? 'http://flight.dev.kkhost.pl' : 'http://localhost:3000'),
trace: 'on-first-retry',
},
webServer: {
command: 'npm run dev',
url: 'http://localhost:3000/api/airports',
reuseExistingServer: true,
timeout: 120_000,
},
webServer: remote
? undefined
: {
command: 'npm run dev',
url: 'http://localhost:3000/api/airports',
reuseExistingServer: true,
timeout: 120_000,
},
});