Repository navigation
test(tui): scope two whole-screen scans to what they assert - #1556
Merged
Merged
Conversation
- test_file_activity_scroll_reproduces_trailing_ghost_after_native_scroll_like_mutation uses 'Z' as its ghost marker but searched the whole screen, whose status line and header show the cwd and the random session name. A checkout path or session name containing 'Z' failed the pre-injection check and made the post-scroll check vacuous. Both checks now read the injected row only. - widgets_render_detail_layer_without_repeating_status_line_facts treats every rounded box as widget text, including the Updates box, which lists the build's latest commit subjects; a subject containing "main" (or another status-line fact) failed it. Pin the Updates box empty for the draw with set_unseen_changelog_entries_override_for_tests, as other UI tests do. Closes 1jehuang#1555 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
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.
Closes #1555.
Problem
Two
jcode-tuilib tests search the whole rendered screen, so text they do not control changes their result:test_file_activity_scroll_reproduces_trailing_ghost_after_native_scroll_like_mutationinjectsZZZZas a ghost marker and checks!clean.contains('Z')/scrolled.contains('Z')over the full screen. The status line and header render the cwd and the random session name. AZin either fails the pre-injection check, and makes the post-scroll check pass whether or not the injected cells survived.widgets_render_detail_layer_without_repeating_status_line_factstreats every rounded box as widget text. That includes the Updates box, which lists the latest commit subjects embedded at build time. A subject containingmain,OpenAIor another status-line fact fails the test.Change
Test-only:
target_line(the file-activity row the marker is injected into). The post-scroll check reads the same row of the repainted screen.set_unseen_changelog_entries_override_for_tests, then reset.onboarding_golden.rsandframe_flicker.rsalready use the same override.Verification (rustc 1.98.1, macOS arm64,
COLORTERM=truecolor,--test-threads=1as in CI)(1) Before,
masterlib test binary run from a directory whose path containsZ:The same binary from a directory without
Z:test result: ok. 1 passed.After, from both directories:
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 2437 filtered out.(2) Before, on
masterwith the Updates box holding one subjectci: keep main green(set temporarily via the override to stand in for a real build changelog):After:
cargo fmt -p jcode-tui --checkreports no diff in the changed lines. The file-level diffs it does report are already onmaster.🤖 Generated with Claude Code