增加 后端,后台管理系统,uniapp会员端的自动化测试。
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
const path = require('path');
|
||||
|
||||
/** @type {import('jest').Config} */
|
||||
module.exports = {
|
||||
testEnvironment: 'node',
|
||||
rootDir: path.resolve(__dirname, '..'),
|
||||
// 按顺序执行:smoke → profile-journey → booking-journey
|
||||
// booking 最后运行因为其最后一个测试会进入非 tabbar 页面
|
||||
testMatch: [
|
||||
'<rootDir>/e2e/smoke/**/*.spec.js',
|
||||
'<rootDir>/e2e/journeys/profile-journey.spec.js',
|
||||
'<rootDir>/e2e/journeys/booking-journey.spec.js'
|
||||
],
|
||||
testTimeout: 120000,
|
||||
verbose: true,
|
||||
// 顺序运行,避免多个套件同时操作同一实例
|
||||
maxWorkers: 1,
|
||||
globalSetup: '<rootDir>/e2e/globalSetup.js',
|
||||
globalTeardown: '<rootDir>/e2e/globalTeardown.js',
|
||||
setupFiles: ['<rootDir>/e2e/setup.js'],
|
||||
globals: {
|
||||
// 微信开发者工具 CLI 路径
|
||||
CLI_PATH: process.env.WECHAT_DEVTOOLS_CLI || 'D:\\微信web开发者工具\\cli.bat',
|
||||
// UniApp 编译输出路径
|
||||
PROJECT_PATH: process.env.UNIAPP_OUTPUT || path.resolve(__dirname, '../unpackage/dist/dev/mp-weixin'),
|
||||
// 微信开发者工具服务端口
|
||||
DEVTOOLS_PORT: parseInt(process.env.WECHAT_DEVTOOLS_PORT || '63956', 10),
|
||||
// 小程序 AppID(测试用)
|
||||
APP_ID: process.env.MP_APP_ID || ''
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user