-
Notifications
You must be signed in to change notification settings - Fork 469
findByRole - document ignored #549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please follow the issue template. More specifically, include the code that lead to this error and ideally provide a https://codesandbox.io. |
This fails with the error in the screenshot above. But it's not only this test case. In every test case where I try to Any other role such as "article" "button" "main" works fine as expected. To me, it seems like, "document" is not even findable and yet it is listed under the list of findable roles. P.S. |
I suspect we query down from |
What I don't understand: How would this even work that |
I doubt it removes it. It wouldn't add up. From what I gather "document" in this case represents What it seems to me is that "document" is not findable just like e.g. Are you positive "document" is in fact a role that could be found by
According to that console-logged list, we do include it, but the list could be wrong, as in not representing actual findable roles |
Then why do you query for it? I don't understand what
A |
Doesn't really matter what role we're talking about. The current error message is misleading since we never included the container in the list of available roles. #550 fixes this issue. |
In another test case, I have a pop-up toaster component that I would like to test for rendering. In the screenshot, it can be seen that the component renders as a direct child of Of course there are alternatives to test this component, like data-testid, which is what I am doing, becuase "document" thing doesn't work and this is why I posting here
According to the console-logged list of available roles, it is a legitimate way to test something so why not use it |
Ok, that settles it then. Thanks. |
🎉 This issue has been resolved in version 7.4.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Uh oh!
There was an error while loading. Please reload this page.
Unable to find role "document" and then logs out a list of available roles and clearly shows there is "document".
What gives?
Thank you
The text was updated successfully, but these errors were encountered: