ci/cd: fix .auth path of e2e tests

This commit is contained in:
Elias Schneider
2025-05-22 22:40:45 +02:00
parent ebcf861aa6
commit ca5e754aea
3 changed files with 6 additions and 6 deletions

View File

@@ -7,8 +7,8 @@ node_modules
/frontend/build /frontend/build
/backend/bin /backend/bin
/backend/frontend/dist /backend/frontend/dist
/frontend/tests/.auth /tests/.auth
/frontend/tests/.report /tests/.report
# Env # Env

View File

@@ -2,7 +2,7 @@ import { test as setup } from '@playwright/test';
import authUtil from './utils/auth.util'; import authUtil from './utils/auth.util';
import { cleanupBackend } from './utils/cleanup.util'; import { cleanupBackend } from './utils/cleanup.util';
const authFile = 'tests/.auth/user.json'; const authFile = '.auth/user.json';
setup('authenticate', async ({ page }) => { setup('authenticate', async ({ page }) => {
await cleanupBackend(); await cleanupBackend();

View File

@@ -12,8 +12,8 @@ export default defineConfig({
retries: process.env.CI ? 1 : 0, retries: process.env.CI ? 1 : 0,
workers: 1, workers: 1,
reporter: process.env.CI reporter: process.env.CI
? [['html', { outputFolder: './.report' }], ['github']] ? [['html', { outputFolder: '.report' }], ['github']]
: [['line'], ['html', { open: 'never', outputFolder: './.report' }]], : [['line'], ['html', { open: 'never', outputFolder: '.report' }]],
use: { use: {
baseURL: process.env.APP_URL ?? 'http://localhost:1411', baseURL: process.env.APP_URL ?? 'http://localhost:1411',
video: 'retain-on-failure', video: 'retain-on-failure',
@@ -23,7 +23,7 @@ export default defineConfig({
{ name: 'setup', testMatch: /.*\.setup\.ts/ }, { name: 'setup', testMatch: /.*\.setup\.ts/ },
{ {
name: 'chromium', name: 'chromium',
use: { ...devices['Desktop Chrome'], storageState: './.auth/user.json' }, use: { ...devices['Desktop Chrome'], storageState: '.auth/user.json' },
dependencies: ['setup'] dependencies: ['setup']
} }
] ]