chore(e2e): optimize variable and timeout
This commit is contained in:
parent
3b2ad2fa9f
commit
6449e2fdb8
6
.github/workflows/nocobase-test-e2e.yml
vendored
6
.github/workflows/nocobase-test-e2e.yml
vendored
@ -56,11 +56,15 @@ jobs:
|
|||||||
${{ runner.os }}-yarn-
|
${{ runner.os }}-yarn-
|
||||||
|
|
||||||
- run: yarn install
|
- run: yarn install
|
||||||
- run: yarn build
|
- name: yarn build
|
||||||
|
run: yarn build
|
||||||
|
env:
|
||||||
|
__E2E__: true
|
||||||
- run: npx playwright install --with-deps
|
- run: npx playwright install --with-deps
|
||||||
- name: Test with postgres
|
- name: Test with postgres
|
||||||
run: yarn test:e2e
|
run: yarn test:e2e
|
||||||
env:
|
env:
|
||||||
|
__E2E__: true
|
||||||
LOGGER_LEVEL: error
|
LOGGER_LEVEL: error
|
||||||
DB_DIALECT: postgres
|
DB_DIALECT: postgres
|
||||||
DB_HOST: postgres
|
DB_HOST: postgres
|
||||||
|
@ -36,7 +36,7 @@ export function buildEsm(cwd: string, userConfig: UserConfig, sourcemap: boolean
|
|||||||
define: {
|
define: {
|
||||||
'process.env.NODE_ENV': JSON.stringify('production'),
|
'process.env.NODE_ENV': JSON.stringify('production'),
|
||||||
'process.env.__TEST__': false,
|
'process.env.__TEST__': false,
|
||||||
'process.env.__E2E__': false,
|
'process.env.__E2E__': process.env.__E2E__ ? true : false,
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
minify: false,
|
minify: false,
|
||||||
|
@ -304,7 +304,7 @@ export async function buildPluginClient(cwd: string, userConfig: UserConfig, sou
|
|||||||
define: {
|
define: {
|
||||||
'process.env.NODE_ENV': JSON.stringify('production'),
|
'process.env.NODE_ENV': JSON.stringify('production'),
|
||||||
'process.env.__TEST__': false,
|
'process.env.__TEST__': false,
|
||||||
'process.env.__E2E__': false,
|
'process.env.__E2E__': process.env.__E2E__ ? true : false,
|
||||||
},
|
},
|
||||||
logLevel: 'warn',
|
logLevel: 'warn',
|
||||||
build: {
|
build: {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { defineConfig, devices } from '@playwright/test';
|
import { defineConfig, devices } from '@playwright/test';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
timeout: process.env.CI ? 5 * 60 * 1000 : 60 * 1000,
|
timeout: process.env.CI ? 60 * 1000 : 30 * 1000,
|
||||||
|
|
||||||
// Look for test files in the "tests" directory, relative to this configuration file.
|
// Look for test files in the "tests" directory, relative to this configuration file.
|
||||||
testDir: 'packages',
|
testDir: 'packages',
|
||||||
|
Loading…
Reference in New Issue
Block a user