Mercurial
diff mrjunejune/test/latex_editor_test.js @ 247:70f2a3dafc1c
[build] Bundle offline Tectonic runtime
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 03 Aug 2026 20:20:06 -0700 |
| parents | 4f2b50bc78e7 |
| children |
line wrap: on
line diff
--- a/mrjunejune/test/latex_editor_test.js Mon Aug 03 18:30:45 2026 -0700 +++ b/mrjunejune/test/latex_editor_test.js Mon Aug 03 20:20:06 2026 -0700 @@ -224,9 +224,17 @@ await page.goto(`${baseUrl}/tools/latex_editor`, { waitUntil: 'networkidle', }); - await page.locator('#latexStatus[data-state="ready"]').waitFor({ + await page.waitForFunction(() => { + const state = document.querySelector('#latexStatus')?.dataset.state; + return state === 'ready' || state === 'error'; + }, null, { timeout: 15000, }); + assert.equal( + await page.locator('#latexStatus').getAttribute('data-state'), + 'ready', + await page.locator('#latexDiagnostics').textContent(), + ); const editorAppearance = await page.locator('#latexSource').evaluate(element => { const style = getComputedStyle(element); const bounds = element.getBoundingClientRect();