feat: 更新UAT测试配置和修复数据库连接问题
refactor(测试): 重构用户数据加载逻辑以支持数组格式 fix(数据库): 修正数据库连接配置和凭证 test: 添加新的导航和用户管理测试场景 docs: 生成UAT测试报告和最终报告 ci: 更新Woodpecker CI配置和测试命令 build: 添加application-test.yml配置文件 chore: 清理旧的测试场景文件
This commit is contained in:
@@ -28,7 +28,11 @@ export class DataLoader {
|
||||
|
||||
static getUserByRole(role: string): any {
|
||||
const data = this.load();
|
||||
return data.users[role] || null;
|
||||
if (Array.isArray(data.users)) {
|
||||
return data.users.find((user: any) => user.role === role || user.username === role) || null;
|
||||
} else {
|
||||
return data.users[role] || null;
|
||||
}
|
||||
}
|
||||
|
||||
static getUsersByScenario(scenarioName: string): any[] {
|
||||
|
||||
Reference in New Issue
Block a user