mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-30 19:58:50 +00:00
test: keep smoke_preloader's reduced-motion wait alive without animation frames
Validate 34346813552 on the beta.9 candidate failed only in browser smoke shard 1: smoke_preloader phase 3 died with "Resulting promise was garbage collected" — its rAF-only wait for the boot house had no other reference while the runner withheld animation frames. A timer now bounds the wait and keeps the promise reachable; the verdict is unchanged (animationName of the house, or 'missed'). Pre-release gate repair per PROCESS §11.4: locally `node demo/smoke_preloader.mjs` → OK ×2; all other heavy gates of that run (golden, perf-smoke, backend, shards 2–3) were green. Issue: #506 User-Visible: no Release: v1.73.0-beta.9
This commit is contained in:
@@ -130,11 +130,17 @@ const reduced = await page.evaluate(async () => {
|
||||
const t0 = performance.now();
|
||||
let anim = 'missed';
|
||||
await new Promise((done) => {
|
||||
// A timer keeps this promise reachable even if the renderer withholds
|
||||
// animation frames for a while (a CI runner under load once let the
|
||||
// rAF-only chain be garbage-collected mid-wait); the verdict stays the
|
||||
// same: the house is found, or `anim` remains 'missed'.
|
||||
const settle = () => { clearTimeout(guard); done(); };
|
||||
const guard = setTimeout(settle, 700);
|
||||
const tick = () => {
|
||||
const house = sr().querySelector('.bootveil .boothouse');
|
||||
if (house) { anim = getComputedStyle(house).animationName; done(); return; }
|
||||
if (house) { anim = getComputedStyle(house).animationName; settle(); return; }
|
||||
if (performance.now() - t0 < 500) requestAnimationFrame(tick);
|
||||
else done();
|
||||
else settle();
|
||||
};
|
||||
requestAnimationFrame(tick);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user