Repository navigation
test(layout): a wrapped map title is checked where its names wrap - #3046
Conversation
a_wrapped_map_title_is_sized_for_its_drawn_lines (opengeos#2972) picks names that wrap in the Linux interface fonts. On macOS and Windows a narrower font fits the classic title on one line, so the test failed there and on main's push runs. Linux still requires each title to wrap; elsewhere a title that fits on one line has no lines to size and is skipped.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
| if cfg!(target_os = "linux") { | ||
| assert!(wraps(&s, li, "Title"), "{style}"); | ||
| } else if !wraps(&s, li, "Title") { | ||
| continue; | ||
| } |
There was a problem hiding this comment.
On macOS and Windows, if none of the four names wraps, every iteration hits continue and the test passes with zero assertions. The PR's Windows green run therefore doesn't show the sizing was checked there. Suggest counting the cases that were actually checked and asserting at least one ran, e.g. let mut checked = 0; before the loop, checked += 1; after the continue guard, and assert!(checked > 0, "no title wrapped on this platform"); after the loop. Alternatively, lengthen the names so they wrap everywhere and keep the Linux-only skip out of the test entirely.
I could not run the tests here, so whether the names fit on macOS or Windows is unverified.
Category: quality
There was a problem hiding this comment.
Left for the release quality pass: asserting at least one case ran needs knowing which names wrap in the macOS and Windows fonts, which this PR's runs will show.
Code reviewBugs: None found. The change is test-only and the Security: None found. Performance: None found. Quality:
AGENTS.md: No breaches found. The test-hygiene rules are met: there are no timer waits, and no Checked and left alone: No earlier review threads existed on this PR, so nothing was already raised. I read the helpers Change sizeCompared with main (merge base d120c6e to PR head a673fca), covering the whole PR.
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the |
Summary
a_wrapped_map_title_is_sized_for_its_drawn_lines(from #2972) fails on macOS and Windows. Since #2972 merged it failsmain's push runs, and every pull request labelledci:macos,ci:windowsorci:full.The test picks map names that wrap in the Linux interface fonts. The macOS and Windows fonts are narrower, so the classic title fits on one line and
assert!(wraps(...))fails before the test reaches the sizing it is about.On Linux the test still requires each title to wrap, so it keeps covering what it was written for. On macOS and Windows, a title that fits on one line has no lines to size and is skipped; one that wraps is still checked. Test-only change.
Testing
ci:macosso the check runs here.UI evidence
No visible UI change.
Related issue
Follow-up to #2972.
Summary by CodeRabbit