Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
test(promoted-attributes): cover phone chips links (#12312)
Kevin Leutzinger088e38059b5b
diff --git a/apps/client/src/widgets/attribute_widgets/values_input.spec.tsx b/apps/client/src/widgets/attribute_widgets/values_input.spec.tsxindex bd33f19937..bf9816541a 100644--- a/apps/client/src/widgets/attribute_widgets/values_input.spec.tsx+++ b/apps/client/src/widgets/attribute_widgets/values_input.spec.tsx@@ -82,6 +82,9 @@ describe("ValuesInput", () => {await mount({ labelType: "email", values: [ "[email protected]" ], onCommit: vi.fn() });expect(container.querySelector(".tn-chip a")?.getAttribute("href")).toBe("mailto:[email protected]");+ await mount({ labelType: "phone", values: [ "+15550100" ], onCommit: vi.fn() });+ expect(container.querySelector(".tn-chip a")?.getAttribute("href")).toBe("tel:+15550100");+await mount({ labelType: "text", values: [ "https://a.test/" ], onCommit: vi.fn() });expect(container.querySelector(".tn-chip a")).toBeNull();});