2022-11-02 19:45:46 +01:00
|
|
|
import { PlaywrightTestConfig } from '@playwright/test'
|
2022-01-28 09:42:31 +01:00
|
|
|
import path from 'path'
|
2022-11-02 19:45:46 +01:00
|
|
|
import { playwrightBaseConfig } from 'configs/playwright'
|
2022-02-24 11:13:19 +01:00
|
|
|
|
2022-01-28 09:42:31 +01:00
|
|
|
const config: PlaywrightTestConfig = {
|
2022-11-02 19:45:46 +01:00
|
|
|
...playwrightBaseConfig,
|
|
|
|
webServer: process.env.CI
|
|
|
|
? {
|
|
|
|
...(playwrightBaseConfig.webServer as { command: string }),
|
|
|
|
port: 3000,
|
|
|
|
}
|
|
|
|
: undefined,
|
2022-01-28 09:42:31 +01:00
|
|
|
use: {
|
2022-11-02 19:45:46 +01:00
|
|
|
...playwrightBaseConfig.use,
|
|
|
|
baseURL: process.env.NEXTAUTH_URL,
|
2022-09-17 16:37:33 +02:00
|
|
|
storageState: path.join(__dirname, 'playwright/firstUser.json'),
|
2022-01-28 09:42:31 +01:00
|
|
|
},
|
|
|
|
outputDir: path.join(__dirname, 'playwright/test-results/'),
|
|
|
|
}
|
2022-11-02 19:45:46 +01:00
|
|
|
|
2022-01-28 09:42:31 +01:00
|
|
|
export default config
|