comparison 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
comparison
equal deleted inserted replaced
245:3843bb6253ac 246:4f2b50bc78e7
225 waitUntil: 'networkidle', 225 waitUntil: 'networkidle',
226 }); 226 });
227 await page.locator('#latexStatus[data-state="ready"]').waitFor({ 227 await page.locator('#latexStatus[data-state="ready"]').waitFor({
228 timeout: 15000, 228 timeout: 15000,
229 }); 229 });
230 const editorAppearance = await page.locator('#latexSource').evaluate(element => {
231 const style = getComputedStyle(element);
232 const bounds = element.getBoundingClientRect();
233 return {
234 background: style.backgroundColor,
235 color: style.color,
236 display: style.display,
237 height: bounds.height,
238 value: element.value,
239 width: bounds.width,
240 };
241 });
242 assert.equal(editorAppearance.display, 'block');
243 assert.ok(editorAppearance.width > 300, JSON.stringify(editorAppearance));
244 assert.ok(editorAppearance.height > 400, JSON.stringify(editorAppearance));
245 assert.notEqual(editorAppearance.background, editorAppearance.color);
246 assert.match(editorAppearance.value, /\\documentclass/);
230 assert.match( 247 assert.match(
231 await page.locator('#pdfPreview').getAttribute('src'), 248 await page.locator('#pdfPreview').getAttribute('src'),
232 /^blob:/, 249 /^blob:/,
233 ); 250 );
234 assert.equal( 251 assert.equal(