test: align native note action menu contracts

This commit is contained in:
tianma-if committed 2026-08-23 00:50:47 +08:00
1 parent 47b8f86c1d
commit 8db4ef4203
2 files changed
+4 -2

No files matched your search

+2 -1
View File
@@ -64,7 +64,8 @@ describe("native mobile AI note assistant", () => {
});
test("keeps the assistant reachable from each native note action menu", () => {
expect(androidDetailSource).toContain('label="AI 笔记助手"');
expect(androidDetailSource).toContain('label={resolvedLocale === "en-US" ? "AI note assistant" : "AI 笔记助手"}');
expect(androidDetailSource).toContain("setAiAssistantOpen(true)");
expect(androidDetailSource).toContain("<MobileAiAssistantModal");
expect(iosDetailSource).toContain('env.preferences.t("AI 笔记助手", en: "AI note assistant")');
expect(iosDetailSource).toContain("AiAssistantSheet(memo: memo)");
+2 -1
View File
@@ -24,7 +24,8 @@ describe("copy current note ID", () => {
test("copies the raw memo ID from both native mobile clients", () => {
expect(androidDetailSource).toContain("Clipboard.setStringAsync(memo.id)");
expect(androidDetailSource).toContain('label={canCopyMemoId ? "复制笔记 ID"');
expect(androidDetailSource).toContain('resolvedLocale === "en-US" ? "Copy note ID" : "复制笔记 ID"');
expect(androidDetailSource).toContain("disabled={!canCopyMemoId}");
expect(iosDetailSource).toContain("UIPasteboard.general.string = memo.id");
expect(iosDetailSource).toContain('env.preferences.t("复制笔记 ID", en: "Copy note ID")');
});