mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-16 15:52:24 +03:00
41 lines
863 B
TypeScript
41 lines
863 B
TypeScript
import { PlaywrightTestConfig, devices } from '@playwright/test';
|
|
|
|
const config: PlaywrightTestConfig = {
|
|
testDir: 'src',
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
reporter: process.env.CI ? [
|
|
['html', { open: 'never' }],
|
|
] : [
|
|
['html', { open: 'on-failure' }]
|
|
],
|
|
webServer: {
|
|
url: 'http://localhost:3000/tests.html',
|
|
command: 'npm run dev',
|
|
reuseExistingServer: !process.env.CI,
|
|
},
|
|
use: {
|
|
baseURL: 'http://localhost:3000/tests.html',
|
|
trace: 'on-first-retry',
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: {
|
|
channel: 'chrome',
|
|
...devices['Desktop Chrome']
|
|
},
|
|
},
|
|
{
|
|
name: 'firefox',
|
|
use: { ...devices['Desktop Firefox'] },
|
|
},
|
|
{
|
|
name: 'webkit',
|
|
use: { ...devices['Desktop Safari'] },
|
|
},
|
|
],
|
|
};
|
|
|
|
export default config;
|