diff options
Diffstat (limited to 'test/web_snapshot.mjs')
| -rw-r--r-- | test/web_snapshot.mjs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/web_snapshot.mjs b/test/web_snapshot.mjs index 4c50956e..df42b1c5 100644 --- a/test/web_snapshot.mjs +++ b/test/web_snapshot.mjs @@ -300,8 +300,15 @@ async function waitForRuntime(timeout) { if (!app?.test?.grid()?.cols || document.querySelector("canvas")) return false; const want = app.runtime.gridSize(); const frame = app.test.grid(); + const tagline = document.querySelector(".pardes-cell.is-tagline"); + const body = document.querySelector(".pardes-cell:not(.is-tagline)"); + if (!tagline || !body) return false; + const tagRect = tagline.getBoundingClientRect(); + const bodyRect = body.getBoundingClientRect(); return frame.cols === want.cols && frame.rows === want.rows && - document.querySelectorAll(".pardes-row").length === want.rows; + document.querySelectorAll(".pardes-row").length === want.rows && + tagRect.width === bodyRect.width && tagRect.height === bodyRect.height && + parseFloat(getComputedStyle(tagline).fontSize) < parseFloat(getComputedStyle(body).fontSize); })()`); } catch { return false; |
