Skip to content

Build your personal knowledge base with Trilium Notes

chore(e2e): check katex is rendered in ToC

Elian Doran1530a09dc85c
diff --git a/e2e/note_types/text.spec.ts b/e2e/note_types/text.spec.ts
index ec9c24e981..3ab14ba11a 100644
--- a/e2e/note_types/text.spec.ts
+++ b/e2e/note_types/text.spec.ts
@@ -25,6 +25,10 @@ test("Table of contents is displayed", async ({ page }) => {
await expect(rootList.locator("> ol").first().locator("> li").first()).toHaveText("Heading 1.1");
await expect(rootList.locator("> ol").first().locator("> li").nth(1)).toHaveText("Heading 1.2");
+ // Heading 2 has a Katex equation, check if it's rendered.
+ await expect(rootList.locator("> li").nth(1)).toContainText("Heading 2");
+ await expect(rootList.locator("> li").nth(1).locator(".katex")).toBeAttached();
+
await expect(rootList.locator("> ol")).toHaveCount(2);
await expect(rootList.locator("> ol").nth(1).locator("> li")).toHaveCount(2);
await expect(rootList.locator("> ol").nth(1).locator("> ol")).toHaveCount(1);
diff --git a/integration-tests/db/document.db b/integration-tests/db/document.db
index a80f36d839..984d7d8f72 100644
Binary files a/integration-tests/db/document.db and b/integration-tests/db/document.db differ