Files
my-protfolio/playwright.config.ts
Amirhossein Khalili 24cd86ede7
Some checks failed
Test and deploy / Verify production build (push) Has been cancelled
Test and deploy / Deploy production (push) Has been cancelled
feat: add route-backed project case studies
2026-09-09 22:00:57 +03:30

33 lines
948 B
TypeScript

import { defineConfig, devices } from '@playwright/test';
const port = Number(process.env.PLAYWRIGHT_PORT ?? 43119);
export default defineConfig({
testDir: './e2e',
fullyParallel: false,
workers: 1,
timeout: 90_000,
forbidOnly: Boolean(process.env.CI),
retries: process.env.CI ? 2 : 0,
reporter: 'line',
expect: { timeout: 30_000 },
use: {
baseURL: `http://127.0.0.1:${port}`,
actionTimeout: 15_000,
navigationTimeout: 60_000,
trace: 'retain-on-failure',
},
projects: [
{ name: 'desktop-chromium', use: { ...devices['Desktop Chrome'], channel: 'chrome' } },
{ name: 'mobile-chromium', use: { ...devices['Pixel 7'], channel: 'chrome' } },
],
webServer: {
command: 'node server.js',
cwd: '.next/standalone',
env: { ...process.env, HOSTNAME: '127.0.0.1', PORT: String(port) },
url: `http://127.0.0.1:${port}`,
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
});