diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-03-09 01:17:05 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-03-09 01:17:05 +0000 |
| commit | 13846ea4ce4bacfadda6f86c5e48e5e76e13db07 (patch) | |
| tree | 20838cbcbc343e8cd8b8f6bb0f8ad347c3fa52b3 /web/test | |
| parent | f9d2056f4d10fe7dde71f5d17d8e8c473b3a611f (diff) | |
feat: delete templates feature and allow requeueing BUDGET_EXCEEDED tasks
Removed all template-related code from frontend (tabs, modals, logic) and backend (routes, files, DB table). Updated BUDGET_EXCEEDED tasks to be requeueable with a Restart button. Fixed ReferenceError in isUserEditing for Node.js tests.
Diffstat (limited to 'web/test')
| -rw-r--r-- | web/test/task-actions.test.mjs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/web/test/task-actions.test.mjs b/web/test/task-actions.test.mjs index 36c0e8b..c7d666b 100644 --- a/web/test/task-actions.test.mjs +++ b/web/test/task-actions.test.mjs @@ -7,7 +7,7 @@ import assert from 'node:assert/strict'; // ── Logic under test ────────────────────────────────────────────────────────── -const RESTART_STATES = new Set(['FAILED', 'CANCELLED']); +const RESTART_STATES = new Set(['FAILED', 'CANCELLED', 'BUDGET_EXCEEDED']); function getCardAction(state) { if (state === 'PENDING') return 'run'; @@ -47,6 +47,10 @@ describe('task card action buttons', () => { assert.equal(getCardAction('CANCELLED'), 'restart'); }); + it('shows Restart button for BUDGET_EXCEEDED', () => { + assert.equal(getCardAction('BUDGET_EXCEEDED'), 'restart'); + }); + it('shows approve buttons for READY', () => { assert.equal(getCardAction('READY'), 'approve'); }); @@ -58,10 +62,6 @@ describe('task card action buttons', () => { it('shows no button for QUEUED', () => { assert.equal(getCardAction('QUEUED'), null); }); - - it('shows no button for BUDGET_EXCEEDED', () => { - assert.equal(getCardAction('BUDGET_EXCEEDED'), null); - }); }); describe('task action API endpoints', () => { @@ -76,4 +76,8 @@ describe('task action API endpoints', () => { it('CANCELLED uses /run endpoint', () => { assert.equal(getApiEndpoint('CANCELLED'), '/run'); }); + + it('BUDGET_EXCEEDED uses /run endpoint', () => { + assert.equal(getApiEndpoint('BUDGET_EXCEEDED'), '/run'); + }); }); |
