feat(media): pagination
This commit is contained in:
1 parent
04dc151ed7
commit
63c1e7076e
65 files changed
+2960
-365
No files matched your search
@@ -256,7 +256,9 @@ describe('Nuxt UI shell foundation and router guards', () => {
|
||||
const getMe = vi.fn().mockResolvedValue({ verified: true })
|
||||
const request = vi.fn().mockResolvedValue({
|
||||
items: [],
|
||||
next_cursor: null,
|
||||
total: 0,
|
||||
page: 1,
|
||||
size: 25,
|
||||
counts: { all: 0, unused: 0, duplicates: 0 },
|
||||
})
|
||||
vi.mocked(useApi).mockReturnValue({ getMe, request })
|
||||
@@ -268,7 +270,7 @@ describe('Nuxt UI shell foundation and router guards', () => {
|
||||
|
||||
expect(app.find('nav[aria-label="breadcrumb"]').text()).toBe('Media')
|
||||
expect(app.find('a[href="/media"][aria-current="page"]').exists()).toBe(true)
|
||||
expect(request).toHaveBeenCalledWith('/v1/media/?filter=all&sort=newest&limit=100')
|
||||
expect(request).toHaveBeenCalledWith('/v1/media/?filter=all&sort=newest&page=1&size=25')
|
||||
})
|
||||
|
||||
it('An unverified session on /media is sent to /register/pending', async () => {
|
||||
|
||||
Reference in new issue
Block a user