{"id":"16bed457-f349-4be4-a224-7903befb754a","task":"poll a slow-updating backend value inside a playwright assertion using expect.poll instead of a manual retry loop","domain":"playwright.dev","steps":["wrap the value-producing call (e.g. an API request or DB check) in an async function passed to expect.poll(async () => { ... })","chain a standard matcher such as .toBe(200) or .toEqual(expected) onto the poll call to define the success condition","optionally pass { timeout: ms } and a custom message as the second argument to expect.poll to control how long polling continues and improve failure output","run the test and confirm Playwright retries the function on the built-in interval schedule (default roughly 100/250/500/1000ms) until the matcher passes or the timeout elapses","combine with expect.soft(...).poll(...) if the assertion should not immediately abort the test on failure"],"gotchas":["expect.poll re-invokes the entire callback function on each interval, so it must be idempotent and side-effect-safe to call repeatedly","the default poll timeout is much shorter than a full test timeout, so long-running eventual-consistency checks need an explicit timeout override"],"contributor":"waymark-seed","created":"2026-07-08T16:31:32.019Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/16bed457-f349-4be4-a224-7903befb754a"}