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): assert the relation chips tabindex on the DOM
matt wilkie2ffc59062555
diff --git a/apps/client/src/widgets/attribute_widgets/relation_values_input.spec.tsx b/apps/client/src/widgets/attribute_widgets/relation_values_input.spec.tsxindex 8e2d491eb5..7b47a1d0ec 100644--- a/apps/client/src/widgets/attribute_widgets/relation_values_input.spec.tsx+++ b/apps/client/src/widgets/attribute_widgets/relation_values_input.spec.tsx@@ -11,7 +11,11 @@ vi.mock("../react/NoteAutocomplete", async () => {return {default: (props: Record<string, unknown>) => {autocomplete.current = props;- return h("input", { id: props.id as string | undefined, ref: props.inputRef });+ return h("input", {+ id: props.id as string | undefined,+ tabIndex: props.tabIndex as number | undefined,+ ref: props.inputRef+ });}};});@@ -94,7 +98,7 @@ describe("RelationValuesInput", () => {await mount({ values: [], onCommit: vi.fn(), inputId: "field-id", tabIndex: 205 });const input = container.querySelector("input");expect(input?.id).toBe("field-id");- expect(autocomplete.current?.tabIndex).toBe(205);+ expect(input?.getAttribute("tabindex")).toBe("205");});});