feat(media): pagination

This commit is contained in:
Florian Sylvain committed 2026-10-13 19:54:59 +02:00
1 parent 04dc151ed7
commit 63c1e7076e
65 files changed
+2960 -365

No files matched your search

+20 -3
View File
@@ -261,16 +261,33 @@ describe('The selection follows the query', () => {
expect(bulkBar()).toBeNull()
})
it('clears when the sort changes and stays when the view changes', async () => {
it('clears when the view changes', async () => {
await mountPage()
await select('north-wall.jpg', 'kitchen-after.webp')
await router.replace({ query: { view: 'list' } })
await settle()
expect(textOf(bulkBar())).toContain('2 selected')
await router.replace({ query: { view: 'list', sort: 'oldest' } })
expect(bulkBar()).toBeNull()
})
it('clears when the sort changes', async () => {
await mountPage()
await select('north-wall.jpg', 'kitchen-after.webp')
await router.replace({ query: { sort: 'oldest' } })
await settle()
expect(bulkBar()).toBeNull()
})
it('clears when the page changes', async () => {
await mountPage()
await select('north-wall.jpg')
await router.push({ query: { page: '2' } })
await settle()
expect(bulkBar()).toBeNull()
})