-
Notifications
You must be signed in to change notification settings - Fork 15
feat: add --quiet flag for wtp add #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
3600d4d
91625f1
97c828d
b2f2fa4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,6 +1,8 @@ | ||||||||||||||||||||||||||
| package e2e | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| import ( | ||||||||||||||||||||||||||
| "path/filepath" | ||||||||||||||||||||||||||
| "strings" | ||||||||||||||||||||||||||
| "testing" | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| "github.com/satococoa/wtp/v2/test/e2e/framework" | ||||||||||||||||||||||||||
|
|
@@ -66,6 +68,35 @@ func TestUserCreatesWorktree_WithNewBranchFlag_ShouldCreateBranchAndWorktree(t * | |||||||||||||||||||||||||
| framework.AssertWorktreeExists(t, repo, "feature/payment") | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
| // TestUserCreatesWorktree_WithQuietFlag_ShouldOutputPathOnly tests | |
| // script integration with machine-readable output from quiet mode. | |
| // | |
| // User Story: As a developer integrating wtp with automation tools, I want | |
| // quiet mode to output only the worktree path so scripts can reliably parse | |
| // and consume it without additional text processing. | |
| // | |
| // Business Value: Enables robust integration with external tools like CI/CD | |
| // pipelines, editor extensions, and other automation that depend on stable, | |
| // machine-readable output from wtp commands. |
Copilot
AI
Feb 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E2E tests in this codebase use Given-When-Then comments to structure the test narrative. The test should include:
- Given: Initial conditions (User wants machine-readable output, User is in a git repository)
- When: User action (User runs "wtp add --branch feature/quiet --quiet")
- Then: Expected outcome assertions (Output should contain only the absolute path)
This pattern is consistently followed in all other E2E tests in this file and is documented as a requirement.
Uh oh!
There was an error while loading. Please reload this page.