playwright/examples/components-vue/playwright.config.ts

41 lines
863 B
TypeScript
Raw Normal View History

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;