mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
fix(e2e): bring back katex test
This commit is contained in:
parent
dd3397bcbb
commit
33baf6c917
@ -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");
|
||||
});
|
||||
|
Binary file not shown.
@ -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");
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user