test(ST-cmovhvef3): add exhaustive re-grill canTransition test covering PLANNED

Adds a loop test that asserts canTransition(status, 'GRILLING') for all
statuses in GRILL_TRIGGERABLE_FROM that support the transition, explicitly
documenting PLANNED as a valid re-grill entry point.
This commit is contained in:
Scrum4Me Agent 2026-05-07 15:10:17 +02:00
parent b6447f27f1
commit 9a04dc3a31

View file

@ -59,6 +59,14 @@ describe('canTransition', () => {
expect(canTransition('PLANNED', 'DRAFT')).toBe(false)
})
it('canTransition to GRILLING from all statuses that allow re-grill', () => {
// DRAFT, GRILLED, GRILL_FAILED, PLANNED are in GRILL_TRIGGERABLE_FROM and support the transition.
const regrill = ['DRAFT', 'GRILLED', 'GRILL_FAILED', 'PLANNED'] as const
for (const status of regrill) {
expect(canTransition(status, 'GRILLING')).toBe(true)
}
})
it('rejects invalid jumps', () => {
expect(canTransition('DRAFT', 'PLANNED')).toBe(false)
expect(canTransition('DRAFT', 'PLAN_READY')).toBe(false)