diff --git a/e2e/note_types/text.spec.ts b/e2e/note_types/text.spec.ts index d7b878724..af42d9898 100644 --- a/e2e/note_types/text.spec.ts +++ b/e2e/note_types/text.spec.ts @@ -49,3 +49,20 @@ test("Highlights list is displayed", async ({ page, context }) => { await expect(rootList.locator("li").nth(index++)).toContainText(highlightedEl); } }); + +test("Displays math popup", async ({ page, context }) => { + const app = new App(page, context); + await app.goto(); + await app.goToNoteInNewTab("Empty text"); + const noteContent = app.currentNoteSplit.locator(".note-detail-editable-text-editor") + await noteContent.fill("Hello world"); + await noteContent.press("Control+M"); + + const mathForm = page.locator(".ck-math-form"); + await expect(mathForm).toBeVisible(); + + await mathForm.locator(".ck-input").first().fill("e=mc^2"); + + const preview = page.locator('[id^="math-preview"]'); + await expect(preview).toMatchAriaSnapshot("- math: e = m c 2"); +}); diff --git a/integration-tests/db/document.db b/integration-tests/db/document.db index 91583b46a..c3a649e62 100644 Binary files a/integration-tests/db/document.db and b/integration-tests/db/document.db differ diff --git a/integration-tests/katex.disabled.ts b/integration-tests/katex.disabled.ts deleted file mode 100644 index 457c53d7c..000000000 --- a/integration-tests/katex.disabled.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { test, expect } from "@playwright/test"; - -const ROOT_URL = "http://localhost:8080"; -const LOGIN_PASSWORD = "eliandoran"; - -test("Can insert equations", async ({ page }) => { - await page.setDefaultTimeout(60_000); - await page.setDefaultNavigationTimeout(60_000); - - // Create a new note - // await page.locator("button.button-widget.bx-file-blank") - // .click(); - - const activeNote = page.locator(".component.note-split:visible"); - const noteContent = activeNote.locator(".note-detail-editable-text-editor"); - await noteContent.press("Ctrl+M"); -});