Mercurial
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 246:4f2b50bc78e7 | 247:70f2a3dafc1c |
|---|---|
| 222 }); | 222 }); |
| 223 | 223 |
| 224 await page.goto(`${baseUrl}/tools/latex_editor`, { | 224 await page.goto(`${baseUrl}/tools/latex_editor`, { |
| 225 waitUntil: 'networkidle', | 225 waitUntil: 'networkidle', |
| 226 }); | 226 }); |
| 227 await page.locator('#latexStatus[data-state="ready"]').waitFor({ | 227 await page.waitForFunction(() => { |
| 228 const state = document.querySelector('#latexStatus')?.dataset.state; | |
| 229 return state === 'ready' || state === 'error'; | |
| 230 }, null, { | |
| 228 timeout: 15000, | 231 timeout: 15000, |
| 229 }); | 232 }); |
| 233 assert.equal( | |
| 234 await page.locator('#latexStatus').getAttribute('data-state'), | |
| 235 'ready', | |
| 236 await page.locator('#latexDiagnostics').textContent(), | |
| 237 ); | |
| 230 const editorAppearance = await page.locator('#latexSource').evaluate(element => { | 238 const editorAppearance = await page.locator('#latexSource').evaluate(element => { |
| 231 const style = getComputedStyle(element); | 239 const style = getComputedStyle(element); |
| 232 const bounds = element.getBoundingClientRect(); | 240 const bounds = element.getBoundingClientRect(); |
| 233 return { | 241 return { |
| 234 background: style.backgroundColor, | 242 background: style.backgroundColor, |