Fix skill migration test regressions
Use an explicit remote clipboard card after removing local clipboard hints and assert the complete set of newly migrated default skills.
This commit is contained in:
@@ -65,8 +65,15 @@ final class AIClipboardPromptTests: XCTestCase {
|
||||
}
|
||||
|
||||
func testClipboardCardFailsClosedAfterEligibilityWindow() {
|
||||
let card = AIHintLocalCatalog.cards(locale: "zh")
|
||||
.first { $0.requiresClipboard30s }!
|
||||
let card = AIHintCard(
|
||||
id: "remote-clipboard-reply",
|
||||
displayText: "回复剪贴板",
|
||||
prompt: "请回复剪贴板内容",
|
||||
category: "clipboard",
|
||||
source: "remote",
|
||||
locale: "zh",
|
||||
conditions: ["clipboard_30s"]
|
||||
)
|
||||
XCTAssertEqual(
|
||||
AIHintPool.resolvePrompt(for: card, clipboardText: nil),
|
||||
.materialUnavailable
|
||||
|
||||
@@ -130,7 +130,14 @@ final class OfficialSkillCatalogTests: XCTestCase {
|
||||
|
||||
XCTAssertEqual(
|
||||
migrated.enabledIDs,
|
||||
[AIClipboardSkillCatalog.replyID, "official.rewrite"]
|
||||
[
|
||||
AIClipboardSkillCatalog.replyID,
|
||||
AIClipboardSkillCatalog.openLinkID,
|
||||
AIClipboardSkillCatalog.summarizeWebPageID,
|
||||
AIClipboardSkillCatalog.callPhoneID,
|
||||
AIClipboardSkillCatalog.createContactID,
|
||||
"official.rewrite"
|
||||
]
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user