22 lines
675 B
JavaScript
22 lines
675 B
JavaScript
const { defineConfig } = require('@playwright/test');
|
|
|
|
module.exports = defineConfig({
|
|
testDir: './tests',
|
|
timeout: 30000,
|
|
webServer: {
|
|
command: 'npm run build && node server.js',
|
|
url: 'http://127.0.0.1:8096',
|
|
reuseExistingServer: !process.env.CI,
|
|
env: {
|
|
PORT: '8096',
|
|
CALORIE_AI_WEB_USER: 'admin',
|
|
CALORIE_AI_WEB_PASSWORD: 'test-password',
|
|
CALORIE_AI_SESSION_SECRET: 'test-session-secret',
|
|
CALORIE_AI_DATABASE_URL: process.env.CALORIE_AI_TEST_DATABASE_URL || 'postgresql://calorie_ai@127.0.0.1:55432/calorie_ai',
|
|
CALORIE_AI_DATA_DIR: '.test-data',
|
|
},
|
|
},
|
|
use: {
|
|
baseURL: 'http://127.0.0.1:8096',
|
|
},
|
|
});
|