Skip to content

test(e2e): run the suite under chromium, firefox and webkit, add CI - #24

Merged
gmaclennan merged 5 commits into
feat/app-uifrom
test/e2e-and-ci
Sep 17, 2026
Merged

gmaclennan merged 5 commits into
feat/app-uifrom
test/e2e-and-ci

Conversation

@gmaclennan

@gmaclennan gmaclennan commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Runs the e2e suite under all three engines with a shared test body, adds a raster tile fixture set so tile-template input is covered, and adds the GitHub Actions workflow (typecheck, unit tests, build, chromium + webkit e2e).

No cross-browser bug turned up in app or library code. The workarounds are all test-harness ones, each explained in a one-line comment: Playwright's WebKit does not intercept requests served through a service worker, and Playwright's Firefox does not report downloads whose body errors, so the two failed-download assertions are skipped there.

Stack created with GitHub Stacks CLI • Give Feedback 💬

21 solid-colour tiles, one distinct colour each, so an export through a
{z}/{x}/{y} template can be checked against a known palette without a
network. Generated once by make-tiles.ts and committed.
Each test file's body now runs once per engine through describeEngines in
e2e/browsers.ts, which owns the launch options, the shared page and the
download directory. Firefox is skipped when CI is set, as CI installs only
chromium and webkit.

Three things had to change for the other two engines:

Playwright's WebKit does not route requests that pass through a controlling
service worker, so the cancel test's page.route delay never applied and the
export finished before Cancel was clicked. The fixture server now honours
?delay=<ms> instead, which every engine sees.

Playwright's Firefox never raises a download event for a response whose body
errors, and stops reporting downloads at all once one has. The two tests that
assert a failed download skip Firefox, and the cancel test runs last.

Filling the style field clears the resolved style and re-resolves it after a
debounce, so waiting only for Export to become enabled could match the render
before the change landed and click through to a no-op. Tests that change the
style now wait for Export to drop out first.

Also adds an app test that exports through the raster tile fixtures and
asserts every flat patch of the output is one of the tile colours.
Mirrors map-downloader's workflow: Node 22, a Playwright browser cache keyed
on the Playwright version, chromium and webkit only, e2e under xvfb-run.
The debounced style resolve only restarts on a style or token change, so
the three fills between the style keystroke and waitForStyle could outlast
it and the wait would miss Export going disabled.
@gmaclennan
gmaclennan added this pull request to stack #26 September 17, 2026 02:12
@gmaclennan gmaclennan changed the title test/e2e and ci test(e2e): run the suite under chromium, firefox and webkit, add CI Sep 17, 2026
…st byte

Linux WebKit reports no download at all when the service-worker response is
errored before any body byte arrives, so the 404-style test timed out in CI.
@gmaclennan
gmaclennan merged commit 7f6242e into master Sep 17, 2026
3 of 7 checks passed
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