test(ai): expand AI flow and clipboard semantic coverage
- Cover reply-variant decision paths, scene-detector abstention, and the merged reply center stance catalog. - Lock in clipboard semantic analyzer thresholds, complaint-only suppression, and existing-skill routing. - Add durable session, refresh, and managed-gateway reliability tests for the Apple account path. - Verify personal-style prompt derivation, low-confidence ASR tendencies, and Polish style learning against real corpus evidence. - Exercise the assistant keyboard and Polish styles UI flows in end-to-end UI tests.
This commit is contained in:
@@ -177,12 +177,31 @@ final class FlowReliabilityTests: XCTestCase {
|
||||
}
|
||||
XCTFail("Expected timeout")
|
||||
} catch {
|
||||
XCTAssertTrue(error is CancellationError)
|
||||
XCTAssertEqual(error as? HardTimeoutError, .timedOut)
|
||||
}
|
||||
|
||||
XCTAssertLessThan(Date().timeIntervalSince(started), 0.2)
|
||||
}
|
||||
|
||||
func testHardTimeoutPreservesCallerCancellation() async {
|
||||
let task = Task {
|
||||
try await HardTimeout.run(seconds: 5) {
|
||||
try await Task.sleep(nanoseconds: 5_000_000_000)
|
||||
return "late"
|
||||
}
|
||||
}
|
||||
await Task.yield()
|
||||
task.cancel()
|
||||
|
||||
do {
|
||||
_ = try await task.value
|
||||
XCTFail("Expected caller cancellation")
|
||||
} catch {
|
||||
XCTAssertTrue(error is CancellationError, "Unexpected error: \(error)")
|
||||
XCTAssertNil(error as? HardTimeoutError)
|
||||
}
|
||||
}
|
||||
|
||||
func testAudioRoutePolicyRebuildsHFPTransitions() {
|
||||
XCTAssertTrue(
|
||||
FlowAudioRouteRecoveryPolicy.shouldRebuild(
|
||||
|
||||
Reference in New Issue
Block a user