mirror of
https://github.com/kremalicious/blog.git
synced 2024-11-22 09:56:51 +01:00
57 lines
1.3 KiB
TypeScript
57 lines
1.3 KiB
TypeScript
|
import { defineConfig, devices } from '@playwright/test'
|
||
|
|
||
|
/**
|
||
|
* See https://playwright.dev/docs/test-configuration.
|
||
|
*/
|
||
|
export default defineConfig({
|
||
|
testDir: './e2e',
|
||
|
fullyParallel: true,
|
||
|
forbidOnly: !!process.env.CI,
|
||
|
retries: process.env.CI ? 2 : 0,
|
||
|
workers: process.env.CI ? 1 : undefined,
|
||
|
/* https://playwright.dev/docs/test-reporters */
|
||
|
reporter: process.env.CI ? 'github' : 'list',
|
||
|
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
||
|
use: {
|
||
|
baseURL: 'http://localhost:4321',
|
||
|
trace: 'on-first-retry'
|
||
|
},
|
||
|
|
||
|
projects: [
|
||
|
{
|
||
|
name: 'chromium',
|
||
|
use: { ...devices['Desktop Chrome'] }
|
||
|
},
|
||
|
{
|
||
|
name: 'firefox',
|
||
|
use: { ...devices['Desktop Firefox'] }
|
||
|
},
|
||
|
{
|
||
|
name: 'webkit',
|
||
|
use: { ...devices['Desktop Safari'] }
|
||
|
},
|
||
|
{
|
||
|
name: 'Mobile Chrome',
|
||
|
use: { ...devices['Pixel 5'] }
|
||
|
},
|
||
|
{
|
||
|
name: 'Mobile Safari',
|
||
|
use: { ...devices['iPhone 12'] }
|
||
|
}
|
||
|
// {
|
||
|
// name: 'Microsoft Edge',
|
||
|
// use: { ...devices['Desktop Edge'], channel: 'msedge' }
|
||
|
// },
|
||
|
// {
|
||
|
// name: 'Google Chrome',
|
||
|
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
||
|
// },
|
||
|
],
|
||
|
|
||
|
webServer: {
|
||
|
command: 'npm start',
|
||
|
url: 'http://localhost:4321',
|
||
|
reuseExistingServer: !process.env.CI
|
||
|
}
|
||
|
})
|