Skip to content

Add: browser tests for the dashboard - #51

Merged
SandObserver merged 2 commits into
mainfrom
chore/dashboard-e2e-specs
Aug 12, 2026
Merged

SandObserver merged 2 commits into
mainfrom
chore/dashboard-e2e-specs

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Add e2e/dashboard.spec.js covering tile rendering with label, href and rel=noopener; badge painting and replacement on the next poll; a failed item keeping its last value with the stale marking; search opening on a printable keypress, filtering, and closing on Escape; and a clock widget drawing inside its iframe.
  • Stub /api/badges and /api/health per spec so nothing waits on example.invalid, and force the follow-up poll through the visibility handler rather than the twenty-second interval.
  • Fail the widget spec on any console message about a refused resource, so the page's Content-Security-Policy is part of what is asserted.
  • Reuse the existing seedConfig and app helpers; no new helpers.
  • Update the playwright.config.js header, which described the suite as admin-only.

Testing
Unit suites, lint, format and typechecks all green. The specs themselves run in the e2e check on this pull request: Playwright's browsers cannot run on the machine this was written on, so CI is their first execution. Both seeded fixtures were validated against a real API instance first, so a rejected seed cannot be the reason for a failure.

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.
  • CHANGELOG.md updated under Unreleased if the change is user-visible.

The end-to-end suite drove Admin only, so nothing opened the dashboard
in a browser. Cover the four things only a browser proves: items become
tiles with their label and link, a badge value paints and is replaced on
the next poll, a failed item keeps its value marked stale, search opens
on a keypress and filters, and a widget renders inside its frame under
the page's Content-Security-Policy.
@SandObserver SandObserver added the javascript Pull requests that update javascript code label Aug 12, 2026
The prompt covers the dashboard and the tiles are never built behind
it, so every dashboard spec found no tiles.
@SandObserver
SandObserver merged commit a443fc4 into main Aug 12, 2026
4 checks passed
@SandObserver
SandObserver deleted the chore/dashboard-e2e-specs branch August 12, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant