移除 Splash 固定 1.5 秒等待,并补充启动流程分析文档。

未登录冷启动可立即进入登录页;已登录仍等待 bootstrap 接口完成,但不再叠加人为延迟。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 15:27:18 +08:00
parent 3dcfb99254
commit d9f897038d
5 changed files with 362 additions and 11 deletions

View File

@ -9,8 +9,21 @@ import XCTest
@testable import suixinkan
@MainActor
/// bootstrap UI Test
/// bootstrap UI Test
final class SplashCoordinatorTests: XCTestCase {
/// bootstrap Splash
func testStartFinishesImmediatelyWithDefaultMinimumDuration() async {
let coordinator = SplashCoordinator(skipsMinimumDuration: true)
let startedAt = Date()
await coordinator.start {
try? await Task.sleep(nanoseconds: 10_000_000)
}
XCTAssertTrue(coordinator.isFinished)
XCTAssertLessThan(Date().timeIntervalSince(startedAt), 0.15)
}
/// bootstrap
func testStartWaitsForMinimumDisplayDuration() async {
let coordinator = SplashCoordinator(minimumDisplayDuration: 0.2, skipsMinimumDuration: false)