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'
|
2023-03-15 08:35:16 +01:00
|
|
|
import { playwrightBaseConfig } from '@typebot.io/lib/playwright/baseConfig'
|
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-11-15 09:35:48 +01:00
|
|
|
storageState: path.join(__dirname, 'src/test/storageState.json'),
|
2022-01-28 09:42:31 +01:00
|
|
|
},
|
|
|
|
}
|
2022-11-02 19:45:46 +01:00
|
|
|
|
2022-01-28 09:42:31 +01:00
|
|
|
export default config
|