fix(e2e): align add-and-run test with completed-status task lifecycle
This commit is contained in:
parent
b9e66a1166
commit
1a05f31a03
@ -43,7 +43,7 @@ E2Eテストを追加・変更した場合は、このドキュメントも更
|
|||||||
- `.takt/tasks.yaml` にタスクを作成(`piece` は `e2e/fixtures/pieces/simple.yaml` を指定)。
|
- `.takt/tasks.yaml` にタスクを作成(`piece` は `e2e/fixtures/pieces/simple.yaml` を指定)。
|
||||||
- `takt run` を実行する。
|
- `takt run` を実行する。
|
||||||
- `README.md` に行が追加されることを確認する。
|
- `README.md` に行が追加されることを確認する。
|
||||||
- 実行後にタスクが `tasks.yaml` から消えることを確認する。
|
- 実行後にタスクが `tasks.yaml` で `completed` ステータスになることを確認する。
|
||||||
- Worktree/Clone isolation(`e2e/specs/worktree.e2e.ts`)
|
- Worktree/Clone isolation(`e2e/specs/worktree.e2e.ts`)
|
||||||
- 目的: `--create-worktree yes` 指定で隔離環境に実行されることを確認。
|
- 目的: `--create-worktree yes` 指定で隔離環境に実行されることを確認。
|
||||||
- LLM: 条件付き(`TAKT_E2E_PROVIDER` が `claude` / `codex` の場合に呼び出す)
|
- LLM: 条件付き(`TAKT_E2E_PROVIDER` が `claude` / `codex` の場合に呼び出す)
|
||||||
|
|||||||
@ -74,10 +74,10 @@ describe('E2E: Add task and run (takt add → takt run)', () => {
|
|||||||
const readme = readFileSync(readmePath, 'utf-8');
|
const readme = readFileSync(readmePath, 'utf-8');
|
||||||
expect(readme).toContain('E2E test passed');
|
expect(readme).toContain('E2E test passed');
|
||||||
|
|
||||||
// Verify completed task was removed from tasks.yaml
|
// Verify completed task is marked as completed in tasks.yaml
|
||||||
const tasksRaw = readFileSync(tasksFile, 'utf-8');
|
const tasksRaw = readFileSync(tasksFile, 'utf-8');
|
||||||
const parsed = parseYaml(tasksRaw) as { tasks?: Array<{ name?: string; status?: string }> };
|
const parsed = parseYaml(tasksRaw) as { tasks?: Array<{ name?: string; status?: string }> };
|
||||||
const executed = parsed.tasks?.find((task) => task.name === 'e2e-test-task');
|
const executed = parsed.tasks?.find((task) => task.name === 'e2e-test-task');
|
||||||
expect(executed).toBeUndefined();
|
expect(executed?.status).toBe('completed');
|
||||||
}, 240_000);
|
}, 240_000);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user