mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-01-09 22:28:25 -05:00
ci/cd: fix .auth path of e2e tests
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
@@ -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']
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user