fix(mobile): list desktop and web devices instead of failing the screen
normalizeRegisteredDevice accepted only android/ios, so one desktop row made the whole Devices screen fail. Accept the server platform list and show the platform on each card.
This commit is contained in:
parent
0a4f5aee64
commit
53fcdf6305
3 changed files with 20 additions and 3 deletions
|
|
@ -27,6 +27,12 @@ describe('device response contract', () => {
|
|||
})
|
||||
})
|
||||
|
||||
it('accepts desktop and web devices registered to the same account', () => {
|
||||
for (const platform of ['windows', 'macos', 'web', 'ios'] as const) {
|
||||
expect(normalizeRegisteredDevice({ ...row, platform }).platform).toBe(platform)
|
||||
}
|
||||
})
|
||||
|
||||
it('rejects missing timestamps and unsupported platforms', () => {
|
||||
expect(() => normalizeRegisteredDevice({ ...row, last_seen_at: 'bad' }))
|
||||
.toThrow(DeviceServiceError)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue