test:增强认证模块测试覆盖

- 添加认证UI自动化测试
- 实现增强型Toast消息测试
- 完善用户交互测试用例
- 提高测试代码覆盖率
This commit is contained in:
2025-12-25 23:13:49 +08:00
parent 92c4eaed07
commit d17c766246
3 changed files with 288 additions and 0 deletions

View File

@@ -403,6 +403,8 @@ func get_expected_ui_feedback(scenario: Dictionary) -> String:
return "红色Toast: 登录请求过于频繁"
500:
return "红色Toast: 服务器繁忙"
503:
return "红色Toast: 系统维护中"
"send_code":
match response_code:
200, 206:
@@ -413,8 +415,38 @@ func get_expected_ui_feedback(scenario: Dictionary) -> String:
return "红色Toast: 请求过于频繁"
500:
return "红色Toast: 服务器繁忙"
503:
return "红色Toast: 系统维护中"
0:
return "红色Toast: 网络连接失败"
"send_login_code":
match response_code:
200, 206:
return "绿色Toast: 登录验证码已发送"
400:
return "红色Toast: 邮箱或手机号格式错误"
404:
return "红色Toast: 用户不存在"
429:
return "红色Toast: 请求过于频繁"
500:
return "红色Toast: 服务器繁忙"
503:
return "红色Toast: 系统维护中"
"verification_code_login":
match response_code:
200:
return "绿色Toast: 验证码登录成功,跳转到主场景"
401:
return "红色Toast: 验证码错误或已过期"
404:
return "红色Toast: 用户不存在"
429:
return "红色Toast: 请求过于频繁"
500:
return "红色Toast: 服务器繁忙"
503:
return "红色Toast: 系统维护中"
"verify_email":
match response_code:
200:
@@ -425,6 +457,8 @@ func get_expected_ui_feedback(scenario: Dictionary) -> String:
return "红色Toast: 请先获取验证码"
500:
return "红色Toast: 验证失败"
503:
return "红色Toast: 系统维护中"
"register":
match response_code:
201:
@@ -437,6 +471,8 @@ func get_expected_ui_feedback(scenario: Dictionary) -> String:
return "红色Toast: 注册请求过于频繁,请稍后再试"
500:
return "红色Toast: 注册失败"
503:
return "红色Toast: 系统维护中"
return "未知响应"