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:
@@ -223,6 +223,39 @@ final class AISessionStateTests: XCTestCase {
|
||||
XCTAssertNil(state.selectedReplyVariant)
|
||||
}
|
||||
|
||||
func testSceneReplyVariantsUseLocalRoleOrder() {
|
||||
var state = AISessionState()
|
||||
let utteranceID = UUID()
|
||||
state.enter()
|
||||
state.beginPreparing(utteranceID: utteranceID)
|
||||
state.receiveReplyVariants(
|
||||
[
|
||||
AIReplyVariant(
|
||||
kind: .invitationTentative,
|
||||
emotion: .neutral,
|
||||
text: "我确认一下。"
|
||||
),
|
||||
AIReplyVariant(
|
||||
kind: .invitationDecline,
|
||||
emotion: .grateful,
|
||||
text: "这次先不去了。"
|
||||
),
|
||||
AIReplyVariant(
|
||||
kind: .invitationAccept,
|
||||
emotion: .warm,
|
||||
text: "好呀,到时见。"
|
||||
)
|
||||
],
|
||||
utteranceID: utteranceID
|
||||
)
|
||||
|
||||
XCTAssertTrue(state.canSelectReplyVariant)
|
||||
XCTAssertEqual(
|
||||
state.replyVariants.map(\.kind),
|
||||
AIReplyVariantSet.invitation.kinds
|
||||
)
|
||||
}
|
||||
|
||||
private func makeReplyVariants() -> [AIReplyVariant] {
|
||||
[
|
||||
AIReplyVariant(kind: .ordinary, emotion: .warm, text: "普通回复"),
|
||||
|
||||
Reference in New Issue
Block a user