diff --git a/tests/mobile-ai-assistant.test.ts b/tests/mobile-ai-assistant.test.ts index ed4a60c2..d1fbd8ea 100644 --- a/tests/mobile-ai-assistant.test.ts +++ b/tests/mobile-ai-assistant.test.ts @@ -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(" { 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")'); });