Mercurial
diff mrjunejune/test/latex_editor_test.js @ 246:4f2b50bc78e7
[tools] Fix LaTeX editor visibility
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 03 Aug 2026 18:30:45 -0700 |
| parents | 3843bb6253ac |
| children | 70f2a3dafc1c |
line wrap: on
line diff
--- a/mrjunejune/test/latex_editor_test.js Mon Aug 03 18:23:36 2026 -0700 +++ b/mrjunejune/test/latex_editor_test.js Mon Aug 03 18:30:45 2026 -0700 @@ -227,6 +227,23 @@ await page.locator('#latexStatus[data-state="ready"]').waitFor({ timeout: 15000, }); + const editorAppearance = await page.locator('#latexSource').evaluate(element => { + const style = getComputedStyle(element); + const bounds = element.getBoundingClientRect(); + return { + background: style.backgroundColor, + color: style.color, + display: style.display, + height: bounds.height, + value: element.value, + width: bounds.width, + }; + }); + assert.equal(editorAppearance.display, 'block'); + assert.ok(editorAppearance.width > 300, JSON.stringify(editorAppearance)); + assert.ok(editorAppearance.height > 400, JSON.stringify(editorAppearance)); + assert.notEqual(editorAppearance.background, editorAppearance.color); + assert.match(editorAppearance.value, /\\documentclass/); assert.match( await page.locator('#pdfPreview').getAttribute('src'), /^blob:/,