mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore: cleanup e2e (#5051)
This commit is contained in:
parent
6127fd4c5c
commit
4b722517f0
15 changed files with 77 additions and 171 deletions
|
|
@ -1,17 +1,10 @@
|
|||
import { LoginResponseDto } from '@app/domain';
|
||||
import { SystemConfigController } from '@app/immich';
|
||||
import { api } from '@test/api';
|
||||
import { db } from '@test/db';
|
||||
import { errorStub } from '@test/fixtures';
|
||||
import { errorStub, userDto } from '@test/fixtures';
|
||||
import { testApp } from '@test/test-utils';
|
||||
import request from 'supertest';
|
||||
|
||||
const user1Dto = {
|
||||
email: 'user1@immich.app',
|
||||
password: 'Password123',
|
||||
name: 'User 1',
|
||||
};
|
||||
|
||||
describe(`${SystemConfigController.name} (e2e)`, () => {
|
||||
let server: any;
|
||||
let admin: LoginResponseDto;
|
||||
|
|
@ -20,11 +13,11 @@ describe(`${SystemConfigController.name} (e2e)`, () => {
|
|||
beforeAll(async () => {
|
||||
[server] = await testApp.create();
|
||||
|
||||
await db.reset();
|
||||
await testApp.reset();
|
||||
await api.authApi.adminSignUp(server);
|
||||
admin = await api.authApi.adminLogin(server);
|
||||
await api.userApi.create(server, admin.accessToken, user1Dto);
|
||||
nonAdmin = await api.authApi.login(server, user1Dto);
|
||||
await api.userApi.create(server, admin.accessToken, userDto.user1);
|
||||
nonAdmin = await api.authApi.login(server, userDto.user1);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue