playwright/examples/components-vue/playwright.config.ts
2022-03-15 14:47:42 -07:00

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;