mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat: people infinite scroll (#11326)
* feat: people infinite scroll * add infinite scroll to show & hide modal * update unit tests * show total people count instead of currently loaded * update personsearchdto
This commit is contained in:
parent
152421e288
commit
8e6bc13540
17 changed files with 276 additions and 67 deletions
|
|
@ -65,6 +65,7 @@ describe('/people', () => {
|
|||
|
||||
expect(status).toBe(200);
|
||||
expect(body).toEqual({
|
||||
hasNextPage: false,
|
||||
total: 3,
|
||||
hidden: 1,
|
||||
people: [
|
||||
|
|
@ -80,6 +81,7 @@ describe('/people', () => {
|
|||
|
||||
expect(status).toBe(200);
|
||||
expect(body).toEqual({
|
||||
hasNextPage: false,
|
||||
total: 3,
|
||||
hidden: 1,
|
||||
people: [
|
||||
|
|
@ -88,6 +90,21 @@ describe('/people', () => {
|
|||
],
|
||||
});
|
||||
});
|
||||
|
||||
it('should support pagination', async () => {
|
||||
const { status, body } = await request(app)
|
||||
.get('/people')
|
||||
.set('Authorization', `Bearer ${admin.accessToken}`)
|
||||
.query({ withHidden: true, page: 2, size: 1 });
|
||||
|
||||
expect(status).toBe(200);
|
||||
expect(body).toEqual({
|
||||
hasNextPage: true,
|
||||
total: 3,
|
||||
hidden: 1,
|
||||
people: [expect.objectContaining({ name: 'visible_person' })],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('GET /people/:id', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue