refactor: e2e (#7703)

* refactor: e2e

* fix: submodule check

* chore: extend startup timeout
This commit is contained in:
Jason Rasmussen 2024-03-07 10:14:36 -05:00 committed by GitHub
parent 2dcd0e516f
commit b733a29430
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 332 additions and 395 deletions

View file

@ -1,19 +1,15 @@
import { LoginResponseDto, getAuthDevices, login, signUpAdmin } from '@immich/sdk';
import { loginDto, signupDto, uuidDto } from 'src/fixtures';
import { deviceDto, errorDto, loginResponseDto, signupResponseDto } from 'src/responses';
import { apiUtils, app, asBearerAuth, dbUtils } from 'src/utils';
import { app, asBearerAuth, utils } from 'src/utils';
import request from 'supertest';
import { beforeAll, beforeEach, describe, expect, it } from 'vitest';
import { beforeEach, describe, expect, it } from 'vitest';
const { name, email, password } = signupDto.admin;
describe(`/auth/admin-sign-up`, () => {
beforeAll(() => {
apiUtils.setup();
});
beforeEach(async () => {
await dbUtils.reset();
await utils.resetDatabase();
});
describe('POST /auth/admin-sign-up', () => {
@ -84,7 +80,7 @@ describe('/auth/*', () => {
let admin: LoginResponseDto;
beforeEach(async () => {
await dbUtils.reset();
await utils.resetDatabase();
await signUpAdmin({ signUpDto: signupDto.admin });
admin = await login({ loginCredentialDto: loginDto.admin });
});