Playwright auto-waits on actions but not on queries: click() retries until the element is actionable, while assertVisible() is a one-shot check. That split is why the waitUntil*() methods exist alongside the assertions.
Two things worth doing:
- make the timeout configurable, since it is Playwright's 30s default today, which is long for an assertion
- consider making the assertions retry, which would make most of
waitUntil*() redundant
playwright-php/playwright-symfony#35 does the retrying idea for PlaywrightTestCase's own assertion trait, which we don't use, but it is the same shape.
Playwright auto-waits on actions but not on queries:
click()retries until the element is actionable, whileassertVisible()is a one-shot check. That split is why thewaitUntil*()methods exist alongside the assertions.Two things worth doing:
waitUntil*()redundantplaywright-php/playwright-symfony#35 does the retrying idea for
PlaywrightTestCase's own assertion trait, which we don't use, but it is the same shape.