auto-waiting
Wait for an observable condition instead of a fixed delay.
Use this when A browser test needs sleeps to pass on slower machines.
without the term
“The browser test only passes if I add sleep(3000) everywhere, and it still fails on CI sometimes. Can you make it wait for the right things instead of guessing?”
with the term · How do you ask a model for auto-waiting?
Remove fixed sleeps from this test. Use Playwright auto-waiting and retrying assertions for the actual ready and completed states.
What is auto-waiting?
Playwright actions wait for relevant actionability checks; retrying assertions wait for the expected state within a timeout.
Why does auto-waiting matter when vibe coding?
Adding a longer sleep can hide a timing bug without making the test reliable.
How do you do auto-waiting?
Replace fixed sleeps with locators and assertions for the state that makes the next step valid.
What goes wrong with auto-waiting?
A visible button is not proof that the preceding save has completed.