1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-30 10:36:35 +02:00

Chore: Fix flaky mermaid/KaTeX rendering test (#9628)

This commit is contained in:
Henry Heino 2023-12-29 09:58:07 -08:00 committed by GitHub
parent 0f388b13c7
commit d733a7f5ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,7 +76,8 @@ test.describe('main', () => {
).toBeVisible();
// Should render KaTeX (block)
await expect(viewerFrame.locator('.joplin-editable > .katex-display')).toBeVisible();
// toBeAttached: To be added to the DOM.
await expect(viewerFrame.locator('.joplin-editable > .katex-display').first()).toBeAttached();
await expect(
viewerFrame.locator(
'.katex-display *', { hasText: 'cos' },
@ -84,7 +85,7 @@ test.describe('main', () => {
).toBeVisible();
// Should render KaTeX (inline)
await expect(viewerFrame.locator('.joplin-editable > .katex')).toBeVisible();
await expect(viewerFrame.locator('.joplin-editable > .katex').first()).toBeAttached();
});
test('HTML links should be preserved when editing a note in the WYSIWYG editor', async ({ electronApp, mainWindow }) => {