test(goals): align goal-status tests with manual-step completion semantics
All checks were successful
Demo images / Build & push demo images (push) Successful in 2m47s
All checks were successful
Demo images / Build & push demo images (push) Successful in 2m47s
3aebbcbb made goal completion require walking the manual steps (running apps alone no longer finish a goal) but left the store tests asserting the old auto-complete behavior. Tests now walk the manual step and also pin the new running-but-not-walked => in-progress case. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
7eaf99873e
commit
49b366fbe4
@ -169,11 +169,16 @@ describe('useGoalStore', () => {
|
|||||||
expect(store.getGoalStatus('accept-payments')).toBe('not-started')
|
expect(store.getGoalStatus('accept-payments')).toBe('not-started')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('returns completed when all required apps are running', () => {
|
it('returns completed when all required apps run AND manual steps are done', () => {
|
||||||
mockPackages['bitcoin-knots'] = { state: 'running' }
|
mockPackages['bitcoin-knots'] = { state: 'running' }
|
||||||
mockPackages['lnd'] = { state: 'running' }
|
mockPackages['lnd'] = { state: 'running' }
|
||||||
|
|
||||||
const store = useGoalStore()
|
const store = useGoalStore()
|
||||||
|
// Running apps alone no longer finish a goal — manual steps must be walked
|
||||||
|
expect(store.getGoalStatus('accept-payments')).toBe('in-progress')
|
||||||
|
|
||||||
|
store.startGoal('accept-payments')
|
||||||
|
store.completeStep('accept-payments', 'open-channel')
|
||||||
expect(store.getGoalStatus('accept-payments')).toBe('completed')
|
expect(store.getGoalStatus('accept-payments')).toBe('completed')
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -198,6 +203,8 @@ describe('useGoalStore', () => {
|
|||||||
mockPackages['immich-server'] = { state: 'running' }
|
mockPackages['immich-server'] = { state: 'running' }
|
||||||
|
|
||||||
const store = useGoalStore()
|
const store = useGoalStore()
|
||||||
|
store.startGoal('store-photos')
|
||||||
|
store.completeStep('store-photos', 'configure-immich')
|
||||||
expect(store.getGoalStatus('store-photos')).toBe('completed')
|
expect(store.getGoalStatus('store-photos')).toBe('completed')
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -218,6 +225,8 @@ describe('useGoalStore', () => {
|
|||||||
mockPackages['lnd'] = { state: 'running' }
|
mockPackages['lnd'] = { state: 'running' }
|
||||||
|
|
||||||
const store = useGoalStore()
|
const store = useGoalStore()
|
||||||
|
store.startGoal('accept-payments')
|
||||||
|
store.completeStep('accept-payments', 'open-channel')
|
||||||
const statuses = store.goalStatuses
|
const statuses = store.goalStatuses
|
||||||
|
|
||||||
expect(statuses['accept-payments']).toBe('completed')
|
expect(statuses['accept-payments']).toBe('completed')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user