♻️ Remove @typebot.io/schemas from @typebot.io/lib
This commit is contained in:
@@ -1,20 +1,43 @@
|
||||
import { PlaywrightTestConfig } from '@playwright/test'
|
||||
import path from 'path'
|
||||
import { playwrightBaseConfig } from '@typebot.io/lib/playwright/baseConfig'
|
||||
import { defineConfig, devices } from '@playwright/test'
|
||||
|
||||
const config: PlaywrightTestConfig = {
|
||||
...playwrightBaseConfig,
|
||||
testDir: path.join(__dirname, 'src'),
|
||||
process.env.SKIP_ENV_CHECK = 'true'
|
||||
|
||||
export default defineConfig({
|
||||
timeout: process.env.CI ? 50 * 1000 : 40 * 1000,
|
||||
expect: {
|
||||
timeout: process.env.CI ? 10 * 1000 : 5 * 1000,
|
||||
},
|
||||
forbidOnly: !!process.env.CI,
|
||||
workers: process.env.CI ? 1 : 3,
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
reporter: [
|
||||
[process.env.CI ? 'github' : 'list'],
|
||||
['html', { outputFolder: 'src/test/reporters' }],
|
||||
],
|
||||
maxFailures: process.env.CI ? 10 : undefined,
|
||||
webServer: process.env.CI
|
||||
? {
|
||||
...(playwrightBaseConfig.webServer as { command: string }),
|
||||
command: 'pnpm run start',
|
||||
timeout: 60_000,
|
||||
reuseExistingServer: true,
|
||||
port: 3001,
|
||||
}
|
||||
: undefined,
|
||||
outputDir: './src/test/results',
|
||||
use: {
|
||||
...playwrightBaseConfig.use,
|
||||
trace: 'on-first-retry',
|
||||
locale: 'en-US',
|
||||
baseURL: process.env.NEXT_PUBLIC_VIEWER_URL,
|
||||
},
|
||||
}
|
||||
|
||||
export default config
|
||||
projects: [
|
||||
{
|
||||
name: 'setup db',
|
||||
testMatch: /global\.setup\.ts/,
|
||||
},
|
||||
{
|
||||
name: 'chromium',
|
||||
use: { ...devices['Desktop Chrome'] },
|
||||
dependencies: ['setup db'],
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user