diff --git a/tests/activities-test.mjs b/tests/activities-test.mjs index 612ea2c..ffe6c56 100644 --- a/tests/activities-test.mjs +++ b/tests/activities-test.mjs @@ -195,8 +195,12 @@ const DECK = { "timed: the timeout is recorded as a miss", (await page.locator("[data-testid=study-feed]").evaluate((element) => element.scrollTop)) > 100, ); + /* A fresh budget, not the exhausted card's leftover (which reads ~0). The + window is deliberately loose at the low end: under the fake clock the + suite's own waits advance the app's interval, and a loaded machine can + tick a few extra seconds between the switch and this read. */ const fresh = Number.parseInt((await toggle.textContent()) ?? "", 10); - check("timed: the next card gets a fresh budget", fresh >= 25 && fresh <= 30, String(fresh)); + check("timed: the next card gets a fresh budget", fresh >= 20 && fresh <= 30, String(fresh)); /* The second card times out too: the results screen counts the miss. */ await page.clock.runFor(31_000);