diff --git a/e2e/tests/motion.test.mjs b/e2e/tests/motion.test.mjs index 43f67039..80ee5a13 100644 --- a/e2e/tests/motion.test.mjs +++ b/e2e/tests/motion.test.mjs @@ -2097,6 +2097,15 @@ test("About shows diagnostics and hides a donut lab that takes bites inside the const node = document.querySelector('[data-slot="donut-lab"]'); return node ? { bites: Number(node.dataset.bites), state: node.dataset.state } : null; `); + // Captures show the finished donut, not the reveal out of the logo. + const labReady = () => + app.waitFor( + () => + app.execute( + `return document.querySelector('[data-slot="donut-lab"]')?.dataset.phase === "ready";`, + ), + { description: "the donut at rest after its reveal" }, + ); await openAbout(); const system = await app.invoke("get_system_info"); @@ -2172,6 +2181,7 @@ test("About shows diagnostics and hides a donut lab that takes bites inside the "the lab covers the About content", ); assert.deepEqual(await lab(), { bites: 0, state: "whole" }); + await labReady(); await app.capture("donut-lab"); await app.clickSelector(`${slot("donut-lab")} canvas`); @@ -2227,6 +2237,7 @@ test("About shows diagnostics and hides a donut lab that takes bites inside the await resize(app, 640, 400); await assertContained(app, '[role="dialog"]'); await assertContained(app, slot("donut-lab")); + await labReady(); await app.capture("donut-lab-small"); }); }); diff --git a/src/components/about-dialog.tsx b/src/components/about-dialog.tsx index 5eb33674..cdf298ea 100644 --- a/src/components/about-dialog.tsx +++ b/src/components/about-dialog.tsx @@ -124,7 +124,11 @@ export function AboutDialog({ const [licenseQuery, setLicenseQuery] = useState(""); const [check, setCheck] = useState("idle"); const [copied, setCopied] = useState(false); - const [lab, setLab] = useState<{ x: number; y: number } | null>(null); + const [lab, setLab] = useState<{ + x: number; + y: number; + size: number; + } | null>(null); const contentRef = useRef(null); const logoRef = useRef(null); @@ -245,7 +249,11 @@ export function AboutDialog({ clicks.length = 0; const rect = logo.getBoundingClientRect(); contentRef.current?.scrollTo({ top: 0 }); - setLab({ x: rect.left + rect.width / 2, y: rect.top + rect.height / 2 }); + setLab({ + x: rect.left + rect.width / 2, + y: rect.top + rect.height / 2, + size: rect.width, + }); return; } // Each press squeezes a little harder, as if something were inside. @@ -486,8 +494,7 @@ export function AboutDialog({ -