tests: use proper async calls for cleanupBackend function (#846)

This commit is contained in:
Kyle Mendell
2025-08-20 03:38:03 -05:00
committed by GitHub
parent d28bfac81f
commit f5b5b1bd85
10 changed files with 10 additions and 10 deletions

View File

@@ -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');

View File

@@ -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');

View File

@@ -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;

View File

@@ -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(

View File

@@ -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');

View File

@@ -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;

View File

@@ -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: [] } });

View File

@@ -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');

View File

@@ -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;

View File

@@ -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') {