新增完整 UI Test 回归套件,并完善启动隔离逻辑。

按模块拆分 XCUITest 用例与 Support 基础设施,UI Test 运行时跳过推送与排队 WebSocket,并将 Podfile 最低版本对齐 iOS 16。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-26 10:45:00 +08:00
parent 703078352c
commit 0c01ee26c3
39 changed files with 1533 additions and 231 deletions

View File

@ -146,7 +146,7 @@ struct RootView: View {
toastCenter: toastCenter
)
}
if appSession.isLoggedIn {
if appSession.isLoggedIn, !AppUITestLaunchState.isRunningUITests {
PushNotificationManager.shared.requestAuthorizationAndRegister()
}
}
@ -161,6 +161,7 @@ struct RootView: View {
)
}
.onChange(of: scenePhase) { newPhase in
guard !AppUITestLaunchState.isRunningUITests else { return }
if appSession.isLoggedIn {
scenicQueueRuntime.update(
api: scenicQueueAPI,
@ -173,6 +174,7 @@ struct RootView: View {
}
}
.onChange(of: accountContext.currentScenic?.id) { _ in
guard !AppUITestLaunchState.isRunningUITests else { return }
if appSession.isLoggedIn {
scenicQueueRuntime.update(
api: scenicQueueAPI,
@ -185,7 +187,9 @@ struct RootView: View {
.onChange(of: appSession.phase) { phase in
switch phase {
case .loggedIn:
PushNotificationManager.shared.requestAuthorizationAndRegister()
if !AppUITestLaunchState.isRunningUITests {
PushNotificationManager.shared.requestAuthorizationAndRegister()
}
case .loggedOut:
accountContext.reset()
permissionContext.reset()