📦 Upgrade packages
This commit is contained in:
@ -1,35 +1,22 @@
|
||||
import { devices, PlaywrightTestConfig } from '@playwright/test'
|
||||
import { PlaywrightTestConfig } from '@playwright/test'
|
||||
import path from 'path'
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
require('dotenv').config({
|
||||
path: path.join(__dirname, 'playwright/.env'),
|
||||
})
|
||||
import { playwrightBaseConfig } from 'configs/playwright'
|
||||
|
||||
const config: PlaywrightTestConfig = {
|
||||
globalSetup: require.resolve(path.join(__dirname, 'playwright/global-setup')),
|
||||
...playwrightBaseConfig,
|
||||
testDir: path.join(__dirname, 'playwright/tests'),
|
||||
retries: process.env.NO_RETRIES ? 0 : 2,
|
||||
workers: process.env.CI ? 1 : 3,
|
||||
reporter: 'html',
|
||||
maxFailures: process.env.CI ? 10 : undefined,
|
||||
webServer: process.env.CI
|
||||
? {
|
||||
...(playwrightBaseConfig.webServer as { command: string }),
|
||||
port: 3000,
|
||||
}
|
||||
: undefined,
|
||||
use: {
|
||||
actionTimeout: 0,
|
||||
baseURL: process.env.PLAYWRIGHT_BUILDER_TEST_BASE_URL,
|
||||
trace: 'on-first-retry',
|
||||
...playwrightBaseConfig.use,
|
||||
baseURL: process.env.NEXTAUTH_URL,
|
||||
storageState: path.join(__dirname, 'playwright/firstUser.json'),
|
||||
video: 'retain-on-failure',
|
||||
locale: 'en-US',
|
||||
},
|
||||
outputDir: path.join(__dirname, 'playwright/test-results/'),
|
||||
projects: [
|
||||
{
|
||||
name: 'Chrome',
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
viewport: { width: 1400, height: 1000 },
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
export default config
|
||||
|
Reference in New Issue
Block a user