Add CLI E2E coverage for WithTerminal attach flow#18077
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 18077Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 18077" |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…pping The new Hex1b alpha version fixes Ctrl+A-Z dispatch on Unix (ControlCharToKeyEvent was dropping all control chars except Enter/Tab/Backspace/DEL). Adding nuget.org as a scoped source for Hex1b packages until the dnceng mirror picks it up. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… as separate key events with a short delay to better match\ninteractive usage in nested terminal attach sessions.\n\nAlso revert temporary Hex1b package/source changes so this PR remains focused\non terminal E2E behavior.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use a single Ctrl+B then D detach attempt with an explicit 1s chord pause, matching interactive usage and removing retry loop complexity. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adds a new CLI end-to-end test that validates the interactive WithTerminal attach/detach workflow for the TypeScript Express/React starter template. It exercises the full terminal lifecycle from the CLI perspective.
Changes:
- Adds
TerminalCommandTests.cswith a single test that scaffolds a TypeScript Express/React project, modifiesapphost.mtsto add.withTerminal()on the frontend resource, waits for terminal availability viaaspire terminal ps, attaches to the frontend terminal, triggers Vite help, and detaches cleanly.
Show a summary per file
| File | Description |
|---|---|
tests/Aspire.Cli.EndToEnd.Tests/TerminalCommandTests.cs |
New E2E test covering the terminal attach/detach workflow with Vite help interaction verification |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
|
Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
|
|
❓ CLI E2E Tests unknown — 111 passed, 0 failed, 3 unknown (commit View all recordings
📹 Recordings uploaded automatically from CI run #27328924715 |
Description
Adds a CLI end-to-end test that exercises
WithTerminalfor the TypeScript Express/React starter flow.The test now validates the full terminal scenario users rely on:
apphost.mtssofrontenduses.withTerminal(),aspire terminal ps(text output),aspire terminal attach frontend,h+ Enter and assert the help menu appears,Ctrl+BthenD, then stop the app host.This adds coverage for the interactive attach/detach workflow and terminal availability checks from the CLI perspective.
Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?