2
0

perf(e2e): ️ Migrate to Playwright

This commit is contained in:
Baptiste Arnaud
2022-01-28 09:42:31 +01:00
parent c5aaa323d1
commit 73f277fce7
145 changed files with 3104 additions and 2346 deletions

View File

@ -0,0 +1,31 @@
import { devices, PlaywrightTestConfig } from '@playwright/test'
import path from 'path'
const config: PlaywrightTestConfig = {
globalSetup: require.resolve(path.join(__dirname, 'playwright/global-setup')),
testDir: path.join(__dirname, 'playwright/tests'),
timeout: 10 * 1000,
expect: {
timeout: 5000,
},
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: 'html',
use: {
actionTimeout: 0,
baseURL: process.env.NEXTAUTH_URL,
trace: 'on-first-retry',
storageState: path.join(__dirname, 'playwright/authenticatedState.json'),
video: 'retain-on-failure',
},
outputDir: path.join(__dirname, 'playwright/test-results/'),
projects: [
{
name: 'Chrome',
use: {
...devices['Desktop Chrome'],
},
},
],
}
export default config