fix(e2e): align add-and-run test with completed-status task lifecycle

This commit is contained in:
nrslib 2026-02-15 12:58:07 +09:00
parent b9e66a1166
commit 1a05f31a03
2 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,7 @@ E2Eテストを追加・変更した場合は、このドキュメントも更
- `.takt/tasks.yaml` にタスクを作成(`piece``e2e/fixtures/pieces/simple.yaml` を指定)。
- `takt run` を実行する。
- `README.md` に行が追加されることを確認する。
- 実行後にタスクが `tasks.yaml` から消えることを確認する。
- 実行後にタスクが `tasks.yaml` `completed` ステータスになることを確認する。
- Worktree/Clone isolation`e2e/specs/worktree.e2e.ts`
- 目的: `--create-worktree yes` 指定で隔離環境に実行されることを確認。
- LLM: 条件付き(`TAKT_E2E_PROVIDER``claude` / `codex` の場合に呼び出す)

View File

@ -74,10 +74,10 @@ describe('E2E: Add task and run (takt add → takt run)', () => {
const readme = readFileSync(readmePath, 'utf-8');
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 parsed = parseYaml(tasksRaw) as { tasks?: Array<{ name?: string; status?: string }> };
const executed = parsed.tasks?.find((task) => task.name === 'e2e-test-task');
expect(executed).toBeUndefined();
expect(executed?.status).toBe('completed');
}, 240_000);
});