summaryrefslogtreecommitdiff
path: root/web/test
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-05 19:02:24 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-05 19:02:24 +0000
commit9e790e35708f834abe1a09af52e43742e164cb63 (patch)
tree926f9b323f80dfdd3c030f98b7abebf9f02501d1 /web/test
parentab93297426353d70ec7c877c710a049b664e4fd0 (diff)
web: add Accept/Reject for READY tasks, Start Next button
- READY state task cards show Accept + Reject buttons - Accept POSTs to /api/tasks/{id}/accept (→ COMPLETED) - Reject POSTs to /api/tasks/{id}/reject (→ PENDING) - "Start Next" button in toolbar POSTs to /api/scripts/start-next-task - CSS for .btn-accept and .btn-reject Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'web/test')
-rw-r--r--web/test/task-actions.test.mjs5
1 files changed, 5 insertions, 0 deletions
diff --git a/web/test/task-actions.test.mjs b/web/test/task-actions.test.mjs
index f2c21c4..2df6523 100644
--- a/web/test/task-actions.test.mjs
+++ b/web/test/task-actions.test.mjs
@@ -12,6 +12,7 @@ const RESTART_STATES = new Set(['FAILED', 'TIMED_OUT', 'CANCELLED']);
function getCardAction(state) {
if (state === 'PENDING') return 'run';
if (state === 'RUNNING') return 'cancel';
+ if (state === 'READY') return 'approve';
if (RESTART_STATES.has(state)) return 'restart';
return null;
}
@@ -39,6 +40,10 @@ describe('task card action buttons', () => {
assert.equal(getCardAction('CANCELLED'), 'restart');
});
+ it('shows approve buttons for READY', () => {
+ assert.equal(getCardAction('READY'), 'approve');
+ });
+
it('shows no button for COMPLETED', () => {
assert.equal(getCardAction('COMPLETED'), null);
});