Skip to content

test: migrate golden tests to golden_matrix and cover all custom widgets#1

Open
Autocrab wants to merge 2 commits into
point-source:mainfrom
Autocrab:feature/better-golden-tests
Open

test: migrate golden tests to golden_matrix and cover all custom widgets#1
Autocrab wants to merge 2 commits into
point-source:mainfrom
Autocrab:feature/better-golden-tests

Conversation

@Autocrab

@Autocrab Autocrab commented Jun 23, 2026

Copy link
Copy Markdown

What this PR does

It rewrites the golden tests for the Auris custom widgets. Now the tests use the golden_matrix package, cover both light and dark themes, and include all 14 widgets.

Added

  • golden_matrix: 1.1.1 as a dev dependency (pinned to the exact version, no ^).
  • Golden coverage for 5 widgets that had none before: AurisDataRow, AurisNotification, AurisHexOrnament, AurisScanBracket, AurisTerminal.
  • Extra states for widgets that already had tests, for example AurisPanel (accent / plain), AurisProgressBar (mid / full) and AurisStatCard (positive / negative delta).

Changed

  • Goldens now live in their own folder, test/golden/goldens/, split by widget and scenario (for example aurisbadge/variants/dark_en_ltr_1x.png). This keeps them separate from the unit tests and their files.
  • Every scenario is captured in both AurisTheme.dark() and AurisTheme.light(). This closes the gap where light was never tested. In total there are now 40 baseline images (20 scenarios × 2 themes).

Removed

  • The old test/auris_golden_test.dart file.
  • The old flat baselines in test/goldens/ (9 PNG files). They are replaced by the new folder layout.

@Autocrab

Copy link
Copy Markdown
Author

Comment: Goldens generated on MacOS, so if you work on Ubuntu\Windows then u should regenerate them locally. AFAIK there are no golden tests checks on CI

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.

2 participants