新增完整 UI Test 回归套件,并完善启动隔离逻辑。
按模块拆分 XCUITest 用例与 Support 基础设施,UI Test 运行时跳过推送与排队 WebSocket,并将 Podfile 最低版本对齐 iOS 16。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
33
suixinkanUITests/Home/HomeRoutesUITests.swift
Normal file
33
suixinkanUITests/Home/HomeRoutesUITests.swift
Normal file
@ -0,0 +1,33 @@
|
||||
//
|
||||
// HomeRoutesUITests.swift
|
||||
// suixinkanUITests
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
final class HomeRoutesUITests: AuthenticatedUITestCase {
|
||||
/// 参数化遍历首页调试菜单,覆盖去重后的全部 Home 路由目标页。
|
||||
func testAllHomeRoutesFromDebugMenu() {
|
||||
for entry in UITestHomeMenuCatalog.entries {
|
||||
XCTContext.runActivity(named: entry.menuTitle) { _ in
|
||||
DebugMenuNavigator.open(app: app)
|
||||
DebugMenuNavigator.tapMenu(title: entry.menuTitle, app: app)
|
||||
UITestExpectationVerifier.verify(entry.expectation, app: app)
|
||||
restoreAfterRoute(entry.expectation)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// 根据打开结果恢复到调试菜单,便于继续下一项。
|
||||
private func restoreAfterRoute(_ expectation: UITestHomeMenuCatalog.Expectation) {
|
||||
switch expectation {
|
||||
case .tab:
|
||||
DebugMenuNavigator.open(app: app)
|
||||
case .staticText:
|
||||
BackNavigator.dismissCustomTopBarIfNeeded(app: app)
|
||||
DebugMenuNavigator.returnToMenu(app: app)
|
||||
default:
|
||||
DebugMenuNavigator.returnToMenu(app: app)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user