Skip to content

test: add headless e2e test that runs the Jasmine frontend suite - #45

Merged
dimiro1 merged 3 commits into
mainfrom
dimiro1/jasmine-e2e-test
Jun 4, 2026
Merged

test: add headless e2e test that runs the Jasmine frontend suite#45
dimiro1 merged 3 commits into
mainfrom
dimiro1/jasmine-e2e-test

Conversation

@dimiro1

@dimiro1 dimiro1 commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Adds an e2e test (e2e/jasmine) that drives frontend/test/SpecRunner.html in headless Chrome and fails if any Jasmine spec fails, automating the verdict that was previously only eyeballed via cmd/testserver. A small custom reporter in SpecRunner.html publishes the result on window.__jasmineResults, since Jasmine's built-in jsApiReporter is deprecated and not wired up. The test lives under e2e/ so it is gated behind the e2e task and excluded from unit tests, with a dedicated test-frontend-headless mise task. It also fixes a stale utils.spec.js that still expected 5 function tabs after a sixth (data) tab was added. Verified: 472 specs, 0 failures.

dimiro1 added 3 commits June 4, 2026 09:29
Drive frontend/test/SpecRunner.html in headless Chrome (chromedp) and
fail if any spec fails, automating the verdict that was previously only
eyeballed via cmd/testserver. A small custom reporter publishes the
result on window.__jasmineResults since Jasmine's jsApiReporter is
deprecated and unwired. Lives in e2e/jasmine so it is gated behind the
e2e task and excluded from unit tests; add a test-frontend-headless
mise task. Also fix a stale utils spec that still expected 5 function
tabs after a sixth (data) tab was added.
The E2E job failed because headless Chrome crashed on startup: the new
Jasmine test reported "websocket url timeout reached" (Chrome never
printed its DevTools endpoint) and the first godog scenario hit a cold
context deadline. CI containers expose a ~64MB /dev/shm, which headless
Chrome exhausts; routing shared memory to /tmp via --disable-dev-shm-usage
keeps the browser stable. Add the flag to both the godog allocator and the
Jasmine test's allocator.
The real cause of the E2E job failure: `go test ./e2e/...` builds two
Chrome-driving binaries (./e2e godog and ./e2e/jasmine) and Go runs
different packages' binaries in parallel by default. Their two headless
Chromes contend for the runner, so the Jasmine Chrome can't start within
chromedp's 20s window ("websocket url timeout reached") and the godog
cold-start scenario blows its deadline. -p 1 serializes the binaries, the
way the godog suite already runs its own scenarios with Concurrency: 1.
(The earlier --disable-dev-shm-usage flag is kept as CI hardening.)
@dimiro1
dimiro1 merged commit 65ec3b6 into main Jun 4, 2026
2 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