A browser smoke test of the critical path in CI, with Playwright #36
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Postulo/postulo#36
Loading…
Add table
Add a link
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?
Why
CI (
.forgejo/workflows/ci.yml) runs lint, a missing-migrations check, the test suite with coverage on three Python versions, the production deployment check and the stylesheet freshness check. It never opens a browser. The 0.2.0 milestone rewrites the header (#10), adds a settings area (#22), a new stage in the workflow (#25), table behaviour driven by htmx (#20) and a theme switch in JavaScript (#9): exactly the changes that unit tests pass through and a person notices in ten seconds.Playwright is already an optional dependency (
chromiumextra, for the PDF fallback), andpytest-djangoprovideslive_server.Shape
tests/e2e/, markede2e, excluded from the default run (-m "not e2e") souv run pyteststays fast; run with-m e2elocally afterplaywright install chromium.live_serverwith the test settings: sign in → capture by pasting a page's HTML → review → the application appears → change its status on the board → record what was sent (a WeasyPrint render) → download the export archive and check its manifest. Assertions on visible text and roles, not on CSS classes, so a restyle does not fail it.e2eon one Python version, in the samenode:22-bookwormcontainer, withplaywright install --with-deps chromium(Debian bookworm is a supported target). About two minutes. On failure it uploads the screenshot and the Playwright trace — withactions/upload-artifact@v3, which works on Forgejo Actions; v4 depends on GitHub's own backend and does not.axe-playwright-python) on the dashboard, the table, the board and the settings pages, failing on serious violations. The interface is server-rendered and already careful about focus and labels; a check keeps it that way when nobody is looking.seed_demogives the test a populated instance for the board and table steps instead of a dozen fixtures.Classification
Enhancement, to the test suite. Not breaking.
Open questions
mainand every pull request; two minutes is cheap next to a broken header on the demo instance.