1
0

fix: loan error surfacing, non-admin export, guarded atomic migration, expanded player controls

This commit is contained in:
2026-09-03 23:50:54 +02:00
parent 9b2bc22d59
commit 3edf7574f9
7 changed files with 99 additions and 35 deletions

View File

@@ -201,4 +201,11 @@ describe('SettingsPage', () => {
await userEvent.click(await screen.findByRole('button', { name: /back up now/i }))
await waitFor(() => expect(screen.getByText(/backup failed/i)).toBeTruthy())
})
it('non-admin sees the Export link but not backups', async () => {
stubAuthFetch({ id: 2, username: 'bob', isAdmin: false })
renderSettings()
expect(await screen.findByRole('link', { name: /export json/i })).toBeTruthy()
expect(screen.queryByRole('button', { name: /back up now/i })).toBeNull()
})
})