make new account + orientation work

This commit is contained in:
Devin Zuczek
2026-06-16 01:29:48 -04:00
parent 335b4d68ce
commit 1fa841f955
7 changed files with 72 additions and 73 deletions
@@ -66,12 +66,13 @@ describe('playersettings endpoints', () => {
const settings = (await res.json()) as Array<{ PlayerId: number; Key: string; Value: string }>
expect(settings.length).toBeGreaterThan(0)
expect(settings.every((s) => s.PlayerId === 100)).toBe(true)
expect(settings.find((s) => s.Key === 'Recroom.OOBE')?.Value).toBe('77')
expect(settings.find((s) => s.Key === 'PlayerSessionCount')?.Value).toBe('13')
// Fresh-player onboarding defaults so the new-user Orientation flow runs.
expect(settings.find((s) => s.Key === 'Recroom.OOBE')?.Value).toBe('0')
expect(settings.find((s) => s.Key === 'TUTORIAL_COMPLETE_MASK')?.Value).toBe('0')
// Defaults were persisted to KV.
const stored = await env.PLAYER_SETTINGS.get<Record<string, string>>('player:100', 'json')
expect(stored?.['Recroom.OOBE']).toBe('77')
expect(stored?.['Recroom.OOBE']).toBe('0')
})
it('GET /playersettings reflects a value written by PUT', async () => {