同步 Android 启动页到 iOS,并在冷启动期间静默恢复登录态。

新增 SplashView、SplashCoordinator 与 Launch Screen 资源,移除冷启动 Lottie;LoginView 加载 App 配置。同时将 token 存储迁移至 UserDefaults,并更新相关测试与文档。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 14:59:44 +08:00
parent 08492df6ce
commit 5bdf4a7dbf
29 changed files with 501 additions and 91 deletions

View File

@ -43,12 +43,23 @@ final class SuixinkanApp {
hasLaunched = true
}
dismissSystemAlertsIfNeeded()
waitForSplashToDisappearIfNeeded()
if waitForLoading {
waitForGlobalLoadingToDisappear()
}
return self
}
///
func waitForSplashToDisappearIfNeeded(timeout: TimeInterval = 5) {
let splash = application.otherElements["splash.root"]
guard splash.waitForExistence(timeout: 2) else { return }
let predicate = NSPredicate(format: "exists == false")
let expectation = XCTNSPredicateExpectation(predicate: predicate, object: splash)
_ = XCTWaiter.wait(for: [expectation], timeout: timeout)
}
/// Loading
func waitForGlobalLoadingToDisappear(timeout: TimeInterval = 45) {
let loading = application.staticTexts["加载中"]

View File

@ -25,7 +25,7 @@ enum UITestSession {
return launched
}
/// App Keychain
/// App UserDefaults
@discardableResult
static func relaunch(
openMenu menuTitle: String,
@ -44,7 +44,7 @@ enum UITestSession {
return relaunched
}
/// App Keychain
/// App UserDefaults
@discardableResult
static func relaunch(
openProfile route: String,