Assert the menu as text, not only as a photograph #10
No reviewers
Labels
No labels
⏳in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grey.ooo/someones.computer_tray!10
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/assert-the-menu"
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?
First half of #627.
The captures prove what a person would see — and have to be looked at by one.
cmd/menudumpprints the same tree the running binary exported over DBus, andcheck.shdiffs it againstmenu.golden:Labels, order, nesting, and which rows are disabled or hidden — so a row moving fails the build instead of waiting to be noticed in a PNG diff. That is the difference between a screenshot suite and a test suite. Verified both ways: the check exits 1 on a changed menu and 0 when it matches.
Two things this had to get right
(ia{sv}av), which godbus hands back as[]interface{}rather than as the typed struct it decodes the outermost reply into. Getting that wrong is silent: it produced an empty golden file that would have asserted nothing for ever. An empty dump is a hard error now, because the menu has fixed rows before it has any data.The status row's timestamp is normalised rather than dropped — its presence and position are exactly what a golden file should hold, and only the clock in it is noise.
Still to come on #627
A scene per state (signed out, unreachable, empty, refused activation, mid-flight, gone), and the manual generated from the same run. This is the machinery both need: one scene, asserted.