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:
catlog22
2026-02-17 13:06:13 +08:00
parent 8665ea73a4
commit d5c6f65599
25 changed files with 1437 additions and 2338 deletions

View File

@@ -49,7 +49,13 @@ function detectMode() {
Before dispatching, collect workflow preferences via AskUserQuestion:
```javascript
if (mode === 'plan') {
// ★ 统一 auto mode 检测:-y/--yes 从 $ARGUMENTS 或 ccw 传播
const autoYes = /\b(-y|--yes)\b/.test($ARGUMENTS)
if (autoYes) {
// 自动模式:跳过所有询问,使用默认值
workflowPreferences = { autoYes: true, forceExplore: false }
} else if (mode === 'plan') {
const prefResponse = AskUserQuestion({
questions: [
{
@@ -76,7 +82,7 @@ if (mode === 'plan') {
autoYes: prefResponse.autoMode === 'Auto',
forceExplore: prefResponse.exploration === 'Force explore'
}
} else {
} else if (mode !== 'plan') {
// Execute mode (standalone, not in-memory)
const prefResponse = AskUserQuestion({
questions: [