diff options
Diffstat (limited to 'web/test')
| -rw-r--r-- | web/test/task-actions.test.mjs | 5 |
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); }); |
