Skip to content

Commit c7cc1ec

Browse files
committed
test(tui): align sidebar width gate boundary
Update the focused sidebar render-state test to assert the 64-column boundary introduced by the sidebar visibility threshold change. Follow-up to PR #3371 by @donglovejava. Verification: - cargo fmt --all -- --check - git diff --check - cargo test -p codewhale-tui --bin codewhale-tui --locked sidebar_width_gate_uses_sixty_four_column_boundary
1 parent 4257832 commit c7cc1ec

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

crates/tui/src/tui/ui/tests.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3795,18 +3795,22 @@ fn hidden_sidebar_focus_suppresses_sidebar_split_even_when_wide() {
37953795
}
37963796

37973797
#[test]
3798-
fn sidebar_width_gate_suppresses_visible_focus_when_narrow() {
3798+
fn sidebar_width_gate_uses_sixty_four_column_boundary() {
37993799
let mut app = create_test_app();
38003800
app.sidebar_focus = SidebarFocus::Pinned;
3801-
app.last_sidebar_host_width = Some(80);
3801+
app.last_sidebar_host_width = Some(SIDEBAR_VISIBLE_MIN_WIDTH - 1);
38023802

38033803
assert_eq!(
38043804
sidebar_render_state(&mut app),
38053805
SidebarRenderState::SuppressedByWidth {
3806-
available_width: 80,
3806+
available_width: SIDEBAR_VISIBLE_MIN_WIDTH - 1,
38073807
min_width: SIDEBAR_VISIBLE_MIN_WIDTH,
38083808
}
38093809
);
3810+
3811+
app.last_sidebar_host_width = Some(SIDEBAR_VISIBLE_MIN_WIDTH);
3812+
3813+
assert_eq!(sidebar_render_state(&mut app), SidebarRenderState::Visible);
38103814
}
38113815

38123816
#[test]

0 commit comments

Comments
 (0)