mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-11-02 05:51:30 +08:00
test(calendar): relation as custom title with attribute relation
This commit is contained in:
parent
f953f6514f
commit
a8b119e4df
@ -111,4 +111,18 @@ describe("Building events", () => {
|
||||
expect(events[1]).toMatchObject({ title: "Note 2", start: "2025-05-07" });
|
||||
});
|
||||
|
||||
it("discards relation as custom title with custom relation", async () => {
|
||||
const noteIds = buildNotes([
|
||||
{ id: "myParentNote", title: "My parent note" },
|
||||
{ id: "mySharedTitle", title: "My custom title", "~myTitle": "myParentNote", "#calendar:title": "~myTitle" },
|
||||
{ title: "Note 1", "~myTitle": "mySharedTitle", "#startDate": "2025-05-05", "#calendar:title": "~myTitle" },
|
||||
{ title: "Note 2", "#startDate": "2025-05-07", "#calendar:title": "~myTitle" },
|
||||
]);
|
||||
const events = await CalendarView.buildEvents(noteIds);
|
||||
|
||||
expect(events).toHaveLength(2);
|
||||
expect(events[0]).toMatchObject({ title: "My shared custom title", start: "2025-05-05" });
|
||||
expect(events[1]).toMatchObject({ title: "Note 2", start: "2025-05-07" });
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user