fix: rename hasEngagedEcology → hasEngagedBoard in onboarding status, clean up stale ecology references

This commit is contained in:
Jennie Robinson Faber 2026-04-14 12:25:24 +01:00
parent 74b2287d48
commit a0f60bcdc0
8 changed files with 24 additions and 24 deletions

View file

@ -38,7 +38,7 @@ describe('GET /api/onboarding/status', () => {
goals: {
hasProfileTags: false,
hasVisitedEvent: false,
hasEngagedEcology: false,
hasEngagedBoard: false,
hasClickedWiki: false,
},
completedAt: null,
@ -87,8 +87,8 @@ describe('GET /api/onboarding/status', () => {
expect(result.goals.hasProfileTags).toBe(false)
})
// 1.5: hasEngagedEcology true when visited AND has tag with engagement state
it('hasEngagedEcology is true when page visited and has engaged topic', async () => {
// 1.5: hasEngagedBoard true when visited AND has tag with engagement state
it('hasEngagedBoard is true when page visited and has engaged topic', async () => {
requireAuth.mockResolvedValue({
_id: 'member-1',
craftTags: [],
@ -106,11 +106,11 @@ describe('GET /api/onboarding/status', () => {
const event = createMockEvent({ method: 'GET', path: '/api/onboarding/status' })
const result = await handler(event)
expect(result.goals.hasEngagedEcology).toBe(true)
expect(result.goals.hasEngagedBoard).toBe(true)
})
// 1.6: hasEngagedEcology false when visited but no engagement state
it('hasEngagedEcology is false when page visited but no topics have engagement state', async () => {
// 1.6: hasEngagedBoard false when visited but no engagement state
it('hasEngagedBoard is false when page visited but no topics have engagement state', async () => {
requireAuth.mockResolvedValue({
_id: 'member-1',
craftTags: [],
@ -126,7 +126,7 @@ describe('GET /api/onboarding/status', () => {
const event = createMockEvent({ method: 'GET', path: '/api/onboarding/status' })
const result = await handler(event)
expect(result.goals.hasEngagedEcology).toBe(false)
expect(result.goals.hasEngagedBoard).toBe(false)
})
// 1.9: Maps stored booleans directly
@ -147,7 +147,7 @@ describe('GET /api/onboarding/status', () => {
const result = await handler(event)
expect(result.goals.hasVisitedEvent).toBe(true)
expect(result.goals.hasEngagedEcology).toBe(false)
expect(result.goals.hasEngagedBoard).toBe(false)
expect(result.goals.hasClickedWiki).toBe(true)
})