mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 07:57:20 +00:00
chore: optimize timeout for e2e (#4276)
* chore: reduce timeout-minutes to 180 * chore: optimize timeout value in defineConfig * chore: optimize * chore: update retries and trace in defineConfig function * chore: update retries and trace options in defineConfig function
This commit is contained in:
parent
893f27fead
commit
b54de2419d
2
.github/workflows/nocobase-test-e2e.yml
vendored
2
.github/workflows/nocobase-test-e2e.yml
vendored
@ -90,4 +90,4 @@ jobs:
|
|||||||
DB_PASSWORD: password
|
DB_PASSWORD: password
|
||||||
DB_DATABASE: nocobase
|
DB_DATABASE: nocobase
|
||||||
APPEND_PRESET_LOCAL_PLUGINS: ${{ steps.vars.outputs.var2 }}
|
APPEND_PRESET_LOCAL_PLUGINS: ${{ steps.vars.outputs.var2 }}
|
||||||
timeout-minutes: 240
|
timeout-minutes: 180
|
||||||
|
@ -11,7 +11,7 @@ import { devices, defineConfig as playwrightDefineConfig, type PlaywrightTestCon
|
|||||||
|
|
||||||
export const defineConfig = (config?: PlaywrightTestConfig) => {
|
export const defineConfig = (config?: PlaywrightTestConfig) => {
|
||||||
return playwrightDefineConfig({
|
return playwrightDefineConfig({
|
||||||
timeout: 5 * 60 * 1000,
|
timeout: process.env.CI ? 60 * 1000 : 30 * 1000,
|
||||||
|
|
||||||
expect: {
|
expect: {
|
||||||
timeout: 10 * 1000,
|
timeout: 10 * 1000,
|
||||||
@ -29,7 +29,7 @@ export const defineConfig = (config?: PlaywrightTestConfig) => {
|
|||||||
// Fail the build on CI if you accidentally left test.only in the source code.
|
// Fail the build on CI if you accidentally left test.only in the source code.
|
||||||
forbidOnly: !!process.env.CI,
|
forbidOnly: !!process.env.CI,
|
||||||
|
|
||||||
retries: 2,
|
retries: process.env.CI ? 2 : 0,
|
||||||
|
|
||||||
// Opt out of parallel tests on CI.
|
// Opt out of parallel tests on CI.
|
||||||
// workers: process.env.CI ? 1 : undefined,
|
// workers: process.env.CI ? 1 : undefined,
|
||||||
@ -48,7 +48,6 @@ export const defineConfig = (config?: PlaywrightTestConfig) => {
|
|||||||
// Base URL to use in actions like `await page.goto('/')`.
|
// Base URL to use in actions like `await page.goto('/')`.
|
||||||
baseURL: process.env.APP_BASE_URL || `http://localhost:${process.env.APP_PORT || 20000}`,
|
baseURL: process.env.APP_BASE_URL || `http://localhost:${process.env.APP_PORT || 20000}`,
|
||||||
|
|
||||||
// Collect trace when retrying the failed test.
|
|
||||||
trace: 'on-first-retry',
|
trace: 'on-first-retry',
|
||||||
},
|
},
|
||||||
// Configure projects for major browsers.
|
// Configure projects for major browsers.
|
||||||
|
Loading…
Reference in New Issue
Block a user