Skip to content

Build your personal knowledge base with Trilium Notes

test(client): default the view mode of the popup editor's mock context

Elian Doran81de744a0b86
diff --git a/apps/client/src/widgets/dialogs/PopupEditor.spec.tsx b/apps/client/src/widgets/dialogs/PopupEditor.spec.tsx
index 1e457b56d2..1cb1995c6a 100644
--- a/apps/client/src/widgets/dialogs/PopupEditor.spec.tsx
+++ b/apps/client/src/widgets/dialogs/PopupEditor.spec.tsx
@@ -44,7 +44,7 @@ vi.mock("../../components/note_context", () => ({
note = mocks.contextNote;
triggerEvent = vi.fn();
setNote = vi.fn(async (_notePath: string, opts?: { viewScope?: ViewScope }) => {
- this.viewScope = opts?.viewScope;
+ this.viewScope = { viewMode: "default", ...opts?.viewScope };
});
constructor(ntxId: string) {