Repository navigation
test: check the trace caption against the ruler's font instead of a 12px floor - #5204
Merged
Merged
Conversation
#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
commented
Nov 3, 2026
leaf-agent
left a comment
Collaborator
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test_trace_overview_shows_every_row_and_preserves_page_scrollingfailed because it still asserted a 12px floor that #4859 removed on purpose. That PR moved the trace's small text frommax(12px, var(--t-6))to--font-smalland said so in its "What changes on screen" list ("its small text loses the 12px floor and takes--font-small"). At reading density--t-6is 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
>= 12checks 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
mainwith the reported assertion and passes with this change. It compares longhand properties rather than thefontshorthand, because Chrome can return an empty shorthand whenfont-variant-numericis set, and an empty-equals-empty comparison would pass without checking anything.Closes #5159 — automated triage