Flaky Specs

Diagnose and prevent flaky Go/Ginkgo Biloba specs — specs that pass locally but fail in CI, fail intermittently under `-p` or load, or fail somewhere other than the line that is actually wrong. Biloba polls by default, so the headline rule is "don't reach for b.Immediate()". Covers the residual smells — single-shot `b.Run(expr,&x)` reads and gate-then-re-read pairs (fix with .Capture); the non-polling SendKeysToWindowImmediately and `*Immediately` verbs; optimistic-UI and server-reconciliation traps (barrier on app state with b.GetJSValue, force the arrival order with b.HoldResponse + Limit/ReleaseNext); async-settling geometry, layout, and document-order reads; AllowMissing for properties absent on the element type; network handlers accumulating across an Ordered container; vacuous assertions that can never fail (an unresolved locator scope, BeNetworkIdle before the request starts, an empty Current*ForEach under a negation, a visual baseline written without ever being reviewed, a screenshot tolerance widened

onsi 06853af 28.6 KB Updated

File contents

onsi/biloba/tree/main/plugins/biloba-go/skills/flaky-specs commit 06853aff1c

Frequently asked questions

npx skillmds@latest add onsi/flaky-specs