You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// I am trying this in the tests of this library to ensure the issue is not related to our project// webdriverio-testing-library/test/async/configure.e2e.tsit('getElementError',async()=>{configure({getElementError: (message,container)=>{constcustomMessage='my custom message';returnnewError(customMessage)},})const{getByRole}=setupBrowser(browser)awaitgetByRole('button',{name: 'no such name'});})
However, I am not seeing 'my custom message' displayed when the test fails with an element not found error.
Am I doing something incorrectly, or this option is not supported yet?
The text was updated successfully, but these errors were encountered:
Hello 👋
If the testing-library is unable to find an element using getByRole or any other method, a lengthy stacktrace is generated when the test fails.
I attempted to configure the getElementError for a custom message as per the documentation:
https://testing-library.com/docs/dom-testing-library/api-configuration/#getelementerror
However, I am not seeing 'my custom message' displayed when the test fails with an element not found error.
Am I doing something incorrectly, or this option is not supported yet?
The text was updated successfully, but these errors were encountered: