testing-library / playwright-testing-library

🔍 Find elements in Playwright with queries from Testing Library
MIT License
248 stars 9 forks source link

How to set the global timeout before findBy/queryBy queries fail? #460

Closed wardellbagby closed 2 years ago

wardellbagby commented 2 years ago

Recently ran into a dramatically slow Github Workflow macOS Runner day which caused me quite a few headaches as my app was running so slowly on CI that my test assertions would fail. I'm hoping to alleviate any future pain there by changing the global timeout to be something higher on CI, but I can't quite figure out how to do it.

I've tried using the @testing-library/dom asyncUtilTimeout via its configure method, but that doesn't seem to do anything.

Is there anyway to accomplish this?

jrolfs commented 2 years ago

Hi, @wardellbagby thanks for creating an issue! I'm sorry you spun your wheels a bit here, technically the only option we supported until now via the configure() function that's exposed from playwright-testing-library was testId. I went ahead and added support for asyncUtilTimeout since it was pretty easy. I'll have a release out soon and you should be good to go 🙂

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 4.3.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: