fixes and refactor
This commit is contained in:
34
playwright.config.js
Normal file
34
playwright.config.js
Normal file
@@ -0,0 +1,34 @@
|
||||
// @ts-check
|
||||
const { defineConfig } = require('@playwright/test');
|
||||
const path = require('path');
|
||||
const DB_ABS_PATH = path.resolve(__dirname, '.e2e-db.sqlite');
|
||||
|
||||
module.exports = defineConfig({
|
||||
testDir: './e2e',
|
||||
fullyParallel: true,
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
workers: process.env.CI ? 2 : undefined,
|
||||
use: {
|
||||
baseURL: process.env.PW_BASE_URL || 'http://127.0.0.1:6123',
|
||||
trace: 'on-first-retry',
|
||||
},
|
||||
globalSetup: require.resolve('./e2e/global-setup.js'),
|
||||
webServer: {
|
||||
command: 'uvicorn app.main:app --host 127.0.0.1 --port 6123',
|
||||
env: {
|
||||
SECRET_KEY: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
|
||||
DATABASE_URL: `sqlite:////${DB_ABS_PATH}`,
|
||||
LOG_LEVEL: 'WARNING',
|
||||
DISABLE_LOG_ENQUEUE: '1',
|
||||
LOG_TO_FILE: 'False',
|
||||
ADMIN_EMAIL: 'admin@example.com',
|
||||
ADMIN_USERNAME: 'admin',
|
||||
ADMIN_PASSWORD: process.env.ADMIN_PASSWORD || 'admin123',
|
||||
},
|
||||
url: 'http://127.0.0.1:6123/health',
|
||||
reuseExistingServer: !process.env.CI,
|
||||
timeout: 60 * 1000,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user