增加 后端,后台管理系统,uniapp会员端的自动化测试。

This commit is contained in:
2026-07-21 18:09:29 +08:00
parent df0e68469b
commit 6b60b3b4da
64 changed files with 13095 additions and 376 deletions
+31
View File
@@ -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 || ''
}
};