新增完整 UI Test 回归套件,并完善启动隔离逻辑。
按模块拆分 XCUITest 用例与 Support 基础设施,UI Test 运行时跳过推送与排队 WebSocket,并将 Podfile 最低版本对齐 iOS 16。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
24
suixinkanUITests/Support/UITestAuthenticatedSession.swift
Normal file
24
suixinkanUITests/Support/UITestAuthenticatedSession.swift
Normal file
@ -0,0 +1,24 @@
|
||||
//
|
||||
// UITestAuthenticatedSession.swift
|
||||
// suixinkanUITests
|
||||
//
|
||||
// Created by Codex on 2026/6/26.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
/// 已登录会话启动器,供需要主界面的 UI Test 复用。
|
||||
enum UITestAuthenticatedSession {
|
||||
/// 启动 App 并完成登录,返回配置好的应用包装器。
|
||||
static func launchLoggedIn(
|
||||
resetState: Bool = false,
|
||||
file: StaticString = #filePath,
|
||||
line: UInt = #line
|
||||
) throws -> SuixinkanApp {
|
||||
let credentials = try UITestLaunchConfiguration.requireCredentials(file: file, line: line)
|
||||
let app = SuixinkanApp(resetState: resetState).launch()
|
||||
app.waitForInitialScreen()
|
||||
LoginFlow.loginIfNeeded(app: app, credentials: credentials, file: file, line: line)
|
||||
return app
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user