The offline code is untested where it clears for a new account, queues a position and trims pictures #391
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found listing the tests for #389: nothing checks that another account signing in on the device clears what was kept (offlineOwner), that a playback position saved offline waits and is sent, or that kept pictures are trimmed to the 200 MB budget, oldest first. The fixture JPEGs (tests/ui/fixtures/art.jpg, art2.jpg) are also a few bytes no browser can draw, so no test could ever have seen a picture shown.
Done in
b509ea4: tests/ui/offline.spec.ts (TypeScript) checks that another account signing in clears what was kept, that a position saved offline is answered 204, waits and is saved once back, and that pictures past the budget go oldest first; the offline tests stand alone and passed 48 of 48 in eight repeats. The fixture JPEGs are real now, and the artwork test checks the one iPX serves draws (96 px wide). Deployed in ipx-web: keepPictures takes its budget and trims whether or not anything new came.