1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-13 00:10:37 +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

View File

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