Lower playwright default timeout #577
Labels
🤖 aspect: dx
Concerns developers' experience with the codebase
🧰 goal: internal improvement
Improvement that benefits maintainers, not users
🟩 priority: low
Low priority and doesn't need to be rushed
🧱 stack: frontend
Related to the Nuxt frontend
Problem
Our current default playwright timeout is very high (1 minute) and makes debugging new tests annoying. It's also potentially too flexible if we want to rely on playwright tests to give us some indication of the general performance of the application.
Description
Our current end to end tests should be very fast under most conditions. Specifically, unless a new page is being accessed (in which case a real API request will have to be made) the every request and navigation never leaves the local loopback. With our current high timeout of 1 minute, we're probably losing some insight into when parts of the application slow down, but we're also making debugging new tests annoying. If a selector you write doesn't work, then you have to wait a full minute for it to fail unless you remembered specifically to pass a shorter timeout to the selector function.
Curious what @WordPress/openverse-frontend folks think about this and what the lowered timeout should be if we did do it. Most of the time I find that
100
works fine, but it might be too low for certain things like page navigation. In those cases, should we expect the test writer to manually raise the timeout only for those cases when it is necessary? Or should we choose a middle ground like 1 or 2 seconds? Those still seem very high if we expect our app to be performant (especially considering we're taking network latency out of the equation except when runningupdate-tapes
).If we do lower it, we'd also want to default to a higher value when updating tapes, so that we do account for the network latency.
Implementation
The text was updated successfully, but these errors were encountered: