-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Before I started to use this library, I used the puppeteer method waitForSelector in order to find elements on a page. By default, the timeout was set to 30 seconds.
Now, I wish to use this library and replace all the waitForSelector occurrences with findBy* queries, which similarly wait until the element appears or if there's a timeout. Unfortunately, the default timeout of those queries is only 1 second.
There is, however, an option to change the timeout to some other value, for example by doing findByText('some text', {}, {timeout: 30_000}), but I'd like to have a cleaner solution where I don't have to state the timeout over and over again.
Furthermore, I read that it is possible to globally configure the testing library, and pass an asyncUtilTimeout configuration with the default timeout, but this configuration didn't seem to work as expected with this library.
After looking into the code, I think the issue might be related to the exported configure method, which supports only a testIdAttribute configuration.
Is there some other option to set the timeout globally for all the queries? And if not, should this library support this configuration the same way other libraries within the testing-library family support it?
Thanks