- Updated package dependencies to their latest versions. - Modified `next.config.ts` to dynamically set allowed development origins from environment variables. - Enhanced `package.json` scripts for development and testing, adding new test commands for proxy tests. - Adjusted Playwright configuration to use the updated server command for testing. #3
29 lines
662 B
TypeScript
29 lines
662 B
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
import dotenv from 'dotenv';
|
|
import path from 'path';
|
|
|
|
dotenv.config({ path: path.resolve(__dirname, '.env.local') });
|
|
|
|
export default defineConfig({
|
|
testDir: './tests',
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: 1,
|
|
reporter: 'html',
|
|
use: {
|
|
baseURL: 'http://localhost:3000',
|
|
trace: 'on-first-retry',
|
|
},
|
|
webServer: {
|
|
command: 'cross-env NODE_ENV=test tsx src/server.ts',
|
|
url: 'http://localhost:3000',
|
|
reuseExistingServer: !process.env.CI,
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
});
|