mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-09 14:52:57 +03:00
tests: use proper async calls for cleanupBackend function (#846)
This commit is contained in:
@@ -4,7 +4,7 @@ import authUtil from '../utils/auth.util';
|
||||
import { cleanupBackend } from '../utils/cleanup.util';
|
||||
import passkeyUtil from '../utils/passkey.util';
|
||||
|
||||
test.beforeEach(() => cleanupBackend());
|
||||
test.beforeEach(async () => await cleanupBackend());
|
||||
|
||||
test('Update account details', async ({ page }) => {
|
||||
await page.goto('/settings/account');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import test, { expect } from '@playwright/test';
|
||||
import { cleanupBackend } from '../utils/cleanup.util';
|
||||
|
||||
test.beforeEach(() => cleanupBackend());
|
||||
test.beforeEach(async () => await cleanupBackend());
|
||||
|
||||
test('Update general configuration', async ({ page }) => {
|
||||
await page.goto('/settings/admin/application-configuration');
|
||||
|
||||
@@ -3,7 +3,7 @@ import authUtil from 'utils/auth.util';
|
||||
import { oidcClients } from '../data';
|
||||
import { cleanupBackend } from '../utils/cleanup.util';
|
||||
|
||||
test.beforeEach(() => cleanupBackend());
|
||||
test.beforeEach(async () => await cleanupBackend());
|
||||
|
||||
test('Dashboard shows all clients in the correct order', async ({ page }) => {
|
||||
const client1 = oidcClients.tailscale;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import test, { expect } from '@playwright/test';
|
||||
import { cleanupBackend } from '../utils/cleanup.util';
|
||||
|
||||
test.beforeEach(() => cleanupBackend());
|
||||
test.beforeEach(async () => await cleanupBackend());
|
||||
|
||||
test.describe('LDAP Integration', () => {
|
||||
test.skip(
|
||||
|
||||
@@ -2,7 +2,7 @@ import test, { expect } from '@playwright/test';
|
||||
import { oidcClients } from '../data';
|
||||
import { cleanupBackend } from '../utils/cleanup.util';
|
||||
|
||||
test.beforeEach(() => cleanupBackend());
|
||||
test.beforeEach(async () => await cleanupBackend());
|
||||
|
||||
test('Create OIDC client', async ({ page }) => {
|
||||
await page.goto('/settings/admin/oidc-clients');
|
||||
|
||||
@@ -5,7 +5,7 @@ import { generateIdToken, generateOauthAccessToken } from '../utils/jwt.util';
|
||||
import * as oidcUtil from '../utils/oidc.util';
|
||||
import passkeyUtil from '../utils/passkey.util';
|
||||
|
||||
test.beforeEach(() => cleanupBackend());
|
||||
test.beforeEach(async () => await cleanupBackend());
|
||||
|
||||
test('Authorize existing client', async ({ page }) => {
|
||||
const oidcClient = oidcClients.nextcloud;
|
||||
|
||||
@@ -2,7 +2,7 @@ import test, { expect } from '@playwright/test';
|
||||
import { oneTimeAccessTokens } from '../data';
|
||||
import { cleanupBackend } from '../utils/cleanup.util';
|
||||
|
||||
test.beforeEach(() => cleanupBackend());
|
||||
test.beforeEach(async () => await cleanupBackend());
|
||||
|
||||
// Disable authentication for these tests
|
||||
test.use({ storageState: { cookies: [], origins: [] } });
|
||||
|
||||
@@ -2,7 +2,7 @@ import test, { expect } from '@playwright/test';
|
||||
import { userGroups, users } from '../data';
|
||||
import { cleanupBackend } from '../utils/cleanup.util';
|
||||
|
||||
test.beforeEach(() => cleanupBackend());
|
||||
test.beforeEach(async () => await cleanupBackend());
|
||||
|
||||
test('Create user group', async ({ page }) => {
|
||||
await page.goto('/settings/admin/user-groups');
|
||||
|
||||
@@ -2,7 +2,7 @@ import test, { expect } from '@playwright/test';
|
||||
import { userGroups, users } from '../data';
|
||||
import { cleanupBackend } from '../utils/cleanup.util';
|
||||
|
||||
test.beforeEach(() => cleanupBackend());
|
||||
test.beforeEach(async () => await cleanupBackend());
|
||||
|
||||
test('Create user', async ({ page }) => {
|
||||
const user = users.steve;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { signupTokens, users } from 'data';
|
||||
import { cleanupBackend } from '../utils/cleanup.util';
|
||||
import passkeyUtil from '../utils/passkey.util';
|
||||
|
||||
test.beforeEach(() => cleanupBackend());
|
||||
test.beforeEach(async () => await cleanupBackend());
|
||||
|
||||
test.describe('User Signup', () => {
|
||||
async function setSignupMode(page: any, mode: 'Disabled' | 'Signup with token' | 'Open Signup') {
|
||||
|
||||
Reference in New Issue
Block a user