Select Smart Approvals in session-configured popup tests

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Ahmed Ibrahim
2026-03-14 03:55:32 +00:00
parent 1b6e21ccc7
commit fc98d21ad8
2 changed files with 7 additions and 7 deletions

View File

@@ -46,9 +46,9 @@ Older failures also appeared on Linux, but the repeated cross-PR signal is stron
## Current Fix In Progress
- Harden the remaining permissions-history snapshot tests in `codex-rs/tui/src/chatwidget/tests.rs`.
- Assert that the popup starts on the current preset, then assert that navigation lands on the intended preset (`Full Access` or `Default`) before confirming.
- Rationale: these snapshot tests were still inferring cursor position from arrow-key count instead of proving which row was selected, which is the same brittle pattern already fixed in the neighboring Smart Approvals tests.
- Harden the `SessionConfigured` Smart Approvals popup tests in `codex-rs/tui/src/chatwidget/tests.rs`.
- Assert that `Smart Approvals (current)` is the selected row, not merely present somewhere in the popup body.
- Rationale: the same popup cluster was already showing selection-state brittleness on Windows CI. These two tests were still only checking rendered text and would miss a cursor-placement regression.
## Constraints

View File

@@ -8579,8 +8579,8 @@ async fn permissions_selection_marks_smart_approvals_current_after_session_confi
let popup = render_bottom_popup(&chat, 120);
assert!(
popup.contains("Smart Approvals (current)"),
"expected Smart Approvals to be current after SessionConfigured sync: {popup}"
selected_popup_line(&popup).contains("Smart Approvals (current)"),
"expected SessionConfigured sync to select Smart Approvals in the popup: {popup}"
);
}
@@ -8633,8 +8633,8 @@ async fn permissions_selection_marks_smart_approvals_current_with_custom_workspa
let popup = render_bottom_popup(&chat, 120);
assert!(
popup.contains("Smart Approvals (current)"),
"expected Smart Approvals to be current even with custom workspace-write details: {popup}"
selected_popup_line(&popup).contains("Smart Approvals (current)"),
"expected custom workspace-write details to keep Smart Approvals selected: {popup}"
);
}