mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(server): split api and jobs into separate e2e suites (#6307)
* refactor: domain and infra modules * refactor(server): e2e tests
This commit is contained in:
parent
e5786b200a
commit
bf1dd36fa9
50 changed files with 852 additions and 439 deletions
14
server/e2e/api/client/activity-api.ts
Normal file
14
server/e2e/api/client/activity-api.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { ActivityCreateDto, ActivityResponseDto } from '@app/domain';
|
||||
import request from 'supertest';
|
||||
|
||||
export const activityApi = {
|
||||
create: async (server: any, accessToken: string, dto: ActivityCreateDto) => {
|
||||
const res = await request(server).post('/activity').set('Authorization', `Bearer ${accessToken}`).send(dto);
|
||||
expect(res.status === 200 || res.status === 201).toBe(true);
|
||||
return res.body as ActivityResponseDto;
|
||||
},
|
||||
delete: async (server: any, accessToken: string, id: string) => {
|
||||
const res = await request(server).delete(`/activity/${id}`).set('Authorization', `Bearer ${accessToken}`);
|
||||
expect(res.status).toEqual(204);
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue