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
25 changed files with 332 additions and 395 deletions
+5 -9
View File
@@ -1,17 +1,13 @@
import { expect, test } from '@playwright/test';
import { apiUtils, dbUtils, webUtils } from 'src/utils';
import { utils } from 'src/utils';
test.describe('Registration', () => {
test.beforeAll(() => {
apiUtils.setup();
utils.setApiEndpoint();
});
test.beforeEach(async () => {
await dbUtils.reset();
});
test.afterAll(async () => {
await dbUtils.teardown();
await utils.resetDatabase();
});
test('admin registration', async ({ page }) => {
@@ -45,8 +41,8 @@ test.describe('Registration', () => {
});
test('user registration', async ({ context, page }) => {
const admin = await apiUtils.adminSetup();
await webUtils.setAuthCookies(context, admin.accessToken);
const admin = await utils.adminSetup();
await utils.setAuthCookies(context, admin.accessToken);
// create user
await page.goto('/admin/user-management');