Browser tests: draw every page in a bundled DejaVu Sans, locally as on CI #717
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#717
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Measured from Forgejo's task API and job logs, runs 561–710 (24 Sep – 4 Oct 2026): wall time per push about 52–55 min, up from about 15; the browser suite grew from 149 to 645 tests in five days and runs serially (29 min); the runner takes two jobs at a time, in the order the workflow file lists them, so the browser job starts 19–22 min after the push; and Forgejo cancels the older push run when a newer push lands, which stopped 18 of 56 browser jobs before they gave a verdict.
Four of the six CI browser failures in the window were the font: CI draws in DejaVu Sans, a Windows desktop in Segoe UI, which is narrower (runs 569 and 612, text spacing; 596, the footer's rows, #212; 602, the Greek agenda at 320 pixels, #316). Each passed locally and failed on CI.
POSTULO_E2E_FONT="DejaVu Sans"(tests/e2e/conftest.py:133) draws a local run the way CI does, but only when somebody remembers it, and only where the font is installed: its rule is!importantwith no fallback, so a machine without DejaVu draws the whole suite in Times.Proposal
tests/e2e/fonts/(their licence allows it).@font-facerules appended to the application's stylesheet by the same patched static handler, on CI and locally alike. The content security policy already allows fonts from the site.document.fonts.checksays the font did not load.Rasterising still differs a little between platforms, but advance widths come from the font, so a line that wraps on CI wraps locally.
Done when
uv run pytest -m e2eon Windows draws in DejaVu Sans, and so does CI.Follow-up
e8f050a57: run 723 failed the masthead test under the text spacing override on three pages, deterministically, with the bundled font, though it passed locally with the same files (and with Debian's copies). Chromium on Linux renders a web font differently from the same font installed. Each@font-facenow names the installed DejaVu first (local()), so CI draws exactly what it drew before; the bundled files, now Debian'sfonts-dejavu-core2.37-6 byte for byte, serve a machine with no DejaVu.