mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
test(settings): cover fill-crop preference sync payload
Guard against the display preference mismatch reported in #1290 by checking author fields in cover-mode saves and verifying server acceptance of the complete payload. Ref #1290
This commit is contained in:
@@ -150,9 +150,18 @@ describe('useDisplaySettingsSync', () => {
|
||||
'/api/v1/user-preferences/display',
|
||||
expect.objectContaining({
|
||||
method: 'PUT',
|
||||
body: expect.stringContaining('"bookCoverDisplayMode":"fill-crop"'),
|
||||
body: expect.any(String),
|
||||
}),
|
||||
)
|
||||
|
||||
const request = apiMock.mock.calls[0]?.[1] as RequestInit
|
||||
expect(JSON.parse(request.body as string)).toMatchObject({
|
||||
settings: {
|
||||
authorRowDensity: 'comfortable',
|
||||
authorCoverFallback: false,
|
||||
bookCoverDisplayMode: 'fill-crop',
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
it('cancels a pending debounced save', async () => {
|
||||
|
||||
Reference in New Issue
Block a user