5.9 KiB
Browser Gherkin runtime
BrowserCucumberTest starts the browser acceptance bindings with WJ-041: an unsupported browser language falls back to English. It uses the pinned Playwright Java version, an actual headless Chromium process and the real Spring/Vaadin application. The scenario selects French as the browser locale, signs in through the HTML forms using a captured email code, checks the rendered dashboard and settings language, and verifies the stored account language.
Each scenario owns a temporary H2 file, loopback server, browser and clean context. A primary test-only LoginMail captures codes; the production sendmail service is not called. Push delivery is explicitly disabled. No production URL, database or existing browser profile is used. Failure screenshots contain only the generated test account and are written beneath build/reports/browser.
Install the pinned local browsers once, then run the suite:
JAVA_HOME=/path/to/jdk25 ./gradlew --no-daemon installBrowsers
JAVA_HOME=/path/to/jdk25 ./gradlew --no-daemon test --tests '*BrowserCucumberTest' -Pproduction=true
The Gradle test task disables automatic browser downloads. Missing browsers or runtime dependencies fail the test rather than silently skipping it. The Cucumber report is build/reports/cucumber/browser.json.
The Werkdock recipe installs matching Chromium and Firefox binaries and their Debian system dependencies during image creation. packaging/playwright.properties pins the driver version and SHA-256 checksums of the driver and bundled Node archives. Keep its version aligned with gradle/libs.versions.toml when upgrading. The recipe hash includes this properties file. The exported rootfs needs PLAYWRIGHT_BROWSERS_PATH=/opt/playwright-browsers in Werkator because Docker image environment metadata is not part of a filesystem export.
The initial runtime bound WJ-041; WJ-038 and WJ-039 now also cover language persistence and per-device appearance (see browser-preferences.md). WJ-042 verifies draft removal on account switching (see browser-draft-owner.md). WJ-058 verifies separate two-tab drafts and explicit conflict resolution (see browser-tab-conflict.md). WJ-059 covers explicit recovery after closing a tab (see browser-closed-draft.md). WJ-001 and WJ-005 cover advisory habit limits (see browser-habit-limits.md). WJ-006 covers complete weeks across calendar months (see browser-habit-month.md). WJ-007 covers work on a day off and visible totals (see browser-work-dayoff.md). WJ-008 covers work tracker deactivation and retained export data (see browser-disable-work.md). Both WJ-040 examples cover private period exports (see browser-private-export.md). WJ-054 covers confirmed work deletion (see browser-work-delete.md). WJ-048 covers explicit customer creation (see browser-customer-create.md). WJ-051 covers separate-device edit conflicts (see browser-work-conflict.md). Other browser scenarios, Firefox execution, Android installation and real background push delivery remain open. Installing Firefox in the image is preparation, not Firefox acceptance.
Implementation references: Playwright Java installation and browser installation and dependencies.
Build image prepared and uploaded: werkjournal-buildenv-bookworm-jdk25-4f1c81297a73.tar.zst, SHA-256 77a96212b7be329fbceeb3f490e2c878d5cd265558855d7e84b66ee08513ca6e. The checksum was verified on the Werkator host before publishing the final archive name. Chromium 151.0.7922.34 and Firefox 153.0 version checks passed inside the Debian image. The image is approximately 737 MiB compressed; the previous image is retained.
Focused local validation: WJ-041 passed with all steps, including login and the rendered dashboard/settings. The initial Kotlin compilation needed an explicit non-null check for Spring's WebServer accessor; no production change was necessary.
Full local CI passed for 0.1.33-SNAPSHOT: 174 executed JVM cases (194 reported, 20 skipped pending browser/harness cases), zero failures/errors, 68 operations tests, 17 frontend tests and production/admin-recovery smoke checks.
First Werkator run: the machine override .git/werkator/.werkator.yml still pinned the previous absolute rootfs path, which takes precedence over the committed file. The only imported image was consequently the old one, without browsers. The host rootfs pin has now been updated to the verified archive above; all other machine settings were preserved, and the prior private configuration is retained alongside it as .werkator.yml.before-browser-rootfs. Future image upgrades must update this host pin as well as the committed configuration. The subsequent run below verifies the corrected machine pin.
Werkdock acceptance completed: commit d0e97b6 passed the full CI/CD run (reported duration 380 seconds, including queue/preparation). The retained reports/cucumber/browser.json records all three WJ-041 steps as passed. Production and admin-recovery smoke checks passed for 0.1.34-SNAPSHOT, and the public /api/v1/info endpoint confirmed that version after deployment. The runtime node is complete; the other browser scenarios and Firefox/Android acceptance remain open.
WJ-015 additionally verifies global session revocation and draft cleanup on reachable and reconnecting devices; see browser-logout-all.md.
WJ-037 verifies the production service-worker offline fallback and retained unsaved input after reconnection; see browser-offline.md.
WJ-036 verifies draft retention across a real application stop/restart behind a local maintenance gateway; see browser-deployment-draft.md. All canonical UX scenarios are now bound and passed.
Firefox follow-up: all 19 current browser examples now pass in Chromium and Firefox, including narrow desktop layouts. The Firefox task is mandatory in CI; see firefox-acceptance.md for corrections and evidence. Physical Android installation and background push remain open.