mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 08:21:39 -06:00
fix(kobo): trust a confirmed replacement for positions and annotations
A replacement stayed ambiguous after the user confirmed it, so every position the Kobo sent was discarded and annotation pulls failed with 409. Confirming now makes it the device's copy and moves the stored bookmark onto it. It still cannot drag saved progress backwards, and that is judged by position, since its percentages run on a different scale. Ref #1786
This commit is contained in:
@@ -550,7 +550,8 @@ describe('Read-aloud delivery contracts (e2e)', { timeout: 180_000 }, () => {
|
||||
where: and(eq(schema.koboDeviceReadingStates.deviceId, device.id), eq(schema.koboDeviceReadingStates.bookId, book.bookId)),
|
||||
});
|
||||
expect(raw?.currentBookmark).toMatchObject({ ProgressPercent: 0 });
|
||||
expect(raw?.deliveryId).not.toBe(replacement.id);
|
||||
if (stage === 'user_confirmed') expect(raw?.deliveryId).toBe(replacement.id);
|
||||
else expect(raw?.deliveryId).not.toBe(replacement.id);
|
||||
const pulled = await (await http('GET', devicePath(device, `library/${book.bookId}/state`), undefined, false)).json();
|
||||
expect(pulled[0].CurrentBookmark.ProgressPercent).toBe(61);
|
||||
expect(pulled[0].StatusInfo.Status).toBe('Reading');
|
||||
|
||||
Reference in New Issue
Block a user