Skip to content

test: check the trace caption against the ruler's font instead of a 12px floor - #5204

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-5159
Nov 3, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-5159

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

test_trace_overview_shows_every_row_and_preserves_page_scrolling failed because it still asserted a 12px floor that #4859 removed on purpose. That PR moved the trace's small text from max(12px, var(--t-6)) to --font-small and said so in its "What changes on screen" list ("its small text loses the 12px floor and takes --font-small"). At reading density --t-6 is 0.71875rem (11.5px), so the caption came out at 11.5px and failed >= 12.

This PR keeps #4859's intent and changes only the test. The two >= 12 checks become one assertion: the ruler labels and the caption share a font size, family and color. That keeps the old color pairing and adds size and family. Nothing changes on screen.

The test failed locally on main with the reported assertion and passes with this change. It compares longhand properties rather than the font shorthand, because Chrome can return an empty shorthand when font-variant-numeric is set, and an empty-equals-empty comparison would pass without checking anything.

Closes #5159 — automated triage

#4859 removed the trace's 12px floor on its small text and set it in
--font-small (11.5px at reading density, 10.5px at working), but the
overview test still required both the caption and the ruler labels to be
at least 12px. The test now asserts what the trace's small text keeps:
the ruler labels and the caption share one size, family and ink. Whether
a package's words use a named font is held by test_interface_fonts.py.

Closes #5159

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description says the test "no longer checks that package text uses a named font," but the diff removes no such check: the only lines it drops are the two >= 12 size floors and the old color comparison, which the new assertion folds in. The description becomes main's commit message, so I'm dropping that sentence from it. The test change itself is fine, and it passes locally at this head.

@leaf-agent
leaf-agent merged commit 5e11f05 into main Nov 3, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-5159 branch November 3, 2026 10:16
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.

Trace overview caption is smaller than its assertion permits

1 participant