Skip to content

2.0.6

Choose a tag to compare

@Natshah Natshah released this 22 Sep 19:15
· 2 commits to 2.0.x since this release

What's changed

One fix: smartSettle can no longer wait forever, plus a packaging fix so both CLI commands ship.

Each smartSettle stage gets its own share of the budget (#57, #58)

On any page whose network never goes idle (analytics, a chat widget, a carousel that reschedules a
timer), a step could die with cucumber's bare
Error: function timed out, ensure the promise resolves within 45000 milliseconds.
networkidle spent the whole budget, the remaining time floored to 0, and Playwright reads
timeout: 0 as "no timeout at all"
, so the final probe waited forever and nothing ever threw.

What it does now

  • No zero timeouts. Below a 25ms floor a stage is skipped, not started, so no Playwright call
    is ever handed a zero or negative timeout.
  • No starved stages. Each stage draws a share of the original budget (25% / 25% / 50% / 50%)
    and never more than what is left, so networkidle can no longer consume the AJAX / pending-timer /
    DOM-quiet probe that actually decides the answer on a client-rendered page. Time a stage does not
    use passes to the stages after it.
  • Same behaviour when a page settles. What the stages check, the signature, and "a stage timing
    out is not a failure" are unchanged.

Measured with a 10s budget:

Page Before After
A never-idle live site still waiting at 60s (hard kill) returned after 10.0s
never-settles.html (new fixture) still waiting at 45s (hard kill) returned after 10.0s
element.html (settles) 492ms 489ms

Both CLI commands are in the package (#60)

The bin paths lost their ./ prefix. npm 11 removes a ./bin/… entry at publish time, so 2.0.6
would otherwise have shipped without init-varbase-e2e and generate-reports.

Install: npm install --save-dev @vardot/varbase-e2e@2.0.6