From 50d1d4fae137cca58d5295fccecbb5ec98038aea Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 29 Apr 2025 10:57:15 +0300 Subject: [PATCH] chore(test/client): wrong path to docs --- apps/client/src/widgets/floating_buttons/help_button.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/client/src/widgets/floating_buttons/help_button.spec.ts b/apps/client/src/widgets/floating_buttons/help_button.spec.ts index 9015d7d75..b75db0f9d 100644 --- a/apps/client/src/widgets/floating_buttons/help_button.spec.ts +++ b/apps/client/src/widgets/floating_buttons/help_button.spec.ts @@ -2,6 +2,7 @@ import { describe, expect, it } from "vitest"; import { byBookType, byNoteType } from "./help_button.js"; import fs from "fs"; import type { HiddenSubtreeItem } from "@triliumnext/commons"; +import path from "path"; describe("Help button", () => { it("All help notes are accessible", () => { @@ -24,7 +25,8 @@ describe("Help button", () => { ...Object.values(byBookType) ].filter((noteId) => noteId) as string[]; - const meta: HiddenSubtreeItem[] = JSON.parse(fs.readFileSync("src/public/app/doc_notes/en/User Guide/!!!meta.json", "utf-8")); + const metaPath = path.resolve(path.join(__dirname, "../../../../server/src/public/app/doc_notes/en/User Guide/!!!meta.json")); + const meta: HiddenSubtreeItem[] = JSON.parse(fs.readFileSync(metaPath, "utf-8")); const allNoteIds = new Set(getNoteIds(meta)); for (const helpNote of allHelpNotes) {