Skip to content

Build your personal knowledge base with Trilium Notes

client: fix a failing test

Adorian Doran63089581285c
diff --git a/apps/client/src/widgets/collections/attribute_menu.spec.ts b/apps/client/src/widgets/collections/attribute_menu.spec.ts
index 25643a7806..94d75d11fb 100644
--- a/apps/client/src/widgets/collections/attribute_menu.spec.ts
+++ b/apps/client/src/widgets/collections/attribute_menu.spec.ts
@@ -154,7 +154,8 @@ describe("buildAttributeMenuItems", () => {
"#state(inheritable)": "Doing",
children: [ { title: "Card" } ]
});
- const note = froca.getNoteFromCache(parent.getChildNoteIds()[0]);
+ const note = froca.notes[parent.getChildNoteIds()[0]];
+ if (!note) throw new Error("expected the card to be built");
pick(options(note)[0]);
expect(writes.setLabelValues).toHaveBeenCalledWith(note, "state", [ "" ]);