Skip to content

Better interactive mode tests#112

Merged
lukidoescode merged 8 commits into
mainfrom
lwagner/108-better-interactive-mode-tests
May 2, 2026
Merged

Better interactive mode tests#112
lukidoescode merged 8 commits into
mainfrom
lwagner/108-better-interactive-mode-tests

Conversation

@lukidoescode
Copy link
Copy Markdown
Owner

@lukidoescode lukidoescode commented May 2, 2026

…ive tests

Add toggle_item() for MultiSelect prompts that sends space instead of enter.
Unlike select_item() which targets Select prompts (cursor starts hidden),
toggle_item() accounts for MultiSelect's cursor starting at item 0.

Rewrite the add command interactive test module with assert_screen() validation,
semantic interaction methods, and cancellation tests at every interactive state.
…ackages commands

- Rewrite add command interactive tests with assert_screen at every step
- Add cancellation tests using ESC (for Select prompts) and Ctrl+C (for text inputs)
- Add interactive tests for additional-packages add/remove/edit commands
- Add toggle_item() and ctrl_c() methods to TerminalSession
- Reduce KEY_DELAY from 50ms to 10ms (dialoguer handles keystrokes fast enough)
Cover all interactive flows with full assert_screen validation at every
prompt: action menu rendering, cancellation at each state, add/remove
operations, prerelease graduation, and empty-state messaging.
…mand tests

Increase virtual terminal to 1200x400 with no scrollback so all output
is visible without scrolling. Replace all assert_screen_starts_with and
assert_screen_ends_with usages with assert_screen, embedding dynamic
temp dir paths via canonicalize() + format!(). Remove the now-unused
partial assertion methods from TerminalSession.
ESC at any prompt during `cargo changeset init` now aborts the entire
operation instead of silently skipping the current section and continuing
to the next prompt. This fixes 7 interactive tests that were timing out
at 30 seconds because the process blocked on subsequent prompts after
ESC was treated as "skip".
The terminal_session module is incompatible with Windows. Imports for
TerminalSession, PathBuf, and indoc were at file top level causing
compilation failure on Windows CI. Moved them into the cfg-gated
modules that actually use them, matching the pattern in add_command.rs.
@lukidoescode lukidoescode merged commit 409a289 into main May 2, 2026
14 checks passed
@lukidoescode lukidoescode deleted the lwagner/108-better-interactive-mode-tests branch May 2, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve interactive mode E2E test coverage across commands

1 participant