mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-28 09:23:08 +08:00
feat(tests): enhance test coverage with integration and utility tests
- Updated QueueCard tests to use getAllByText for better resilience against multiple occurrences. - Modified useCodexLens tests to check for error existence instead of specific message. - Added mock for ResizeObserver in test setup to support components using it. - Introduced integration tests for appStore and hooks interactions, covering locale and theme flows. - Created layout-utils tests to validate pane manipulation functions. - Added queryKeys tests to ensure correct key generation for workspace queries. - Implemented utils tests for class name merging and memory metadata parsing.
This commit is contained in:
@@ -52,22 +52,30 @@ Unified TDD workflow skill combining TDD planning (Red-Green-Refactor task chain
|
||||
Before dispatching to phase execution, collect workflow preferences via AskUserQuestion:
|
||||
|
||||
```javascript
|
||||
const prefResponse = AskUserQuestion({
|
||||
questions: [
|
||||
{
|
||||
question: "是否跳过所有确认步骤(自动模式)?",
|
||||
header: "Auto Mode",
|
||||
multiSelect: false,
|
||||
options: [
|
||||
{ label: "Interactive (Recommended)", description: "交互模式,包含确认步骤" },
|
||||
{ label: "Auto", description: "跳过所有确认,自动执行" }
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
// ★ 统一 auto mode 检测:-y/--yes 从 $ARGUMENTS 或 ccw 传播
|
||||
const autoYes = /\b(-y|--yes)\b/.test($ARGUMENTS)
|
||||
|
||||
workflowPreferences = {
|
||||
autoYes: prefResponse.autoMode === 'Auto'
|
||||
if (autoYes) {
|
||||
// 自动模式:跳过所有询问,使用默认值
|
||||
workflowPreferences = { autoYes: true }
|
||||
} else {
|
||||
const prefResponse = AskUserQuestion({
|
||||
questions: [
|
||||
{
|
||||
question: "是否跳过所有确认步骤(自动模式)?",
|
||||
header: "Auto Mode",
|
||||
multiSelect: false,
|
||||
options: [
|
||||
{ label: "Interactive (Recommended)", description: "交互模式,包含确认步骤" },
|
||||
{ label: "Auto", description: "跳过所有确认,自动执行" }
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
workflowPreferences = {
|
||||
autoYes: prefResponse.autoMode === 'Auto'
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user