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
Is your feature request related to a problem? Please describe.
I would like to be able to pass a name to the base <table> element for testing purposes. If the table appears conditionally (ie: my app may show an error message instead of the table if there's a network error or similar) it would be nice to be able to do a simple const materialTable = await screen.findByRole("table", { name: "my-cool-table" })
using react-testing-library/jest.
Currently, my only choice seems to be to check whether the string I pass for the title is there as the appropriate heading level: const tableHeading = await screen.findByRole("heading", { level: 6, name: "My Cool Table" })
Would much prefer the former. Is there any way to assign that table name?
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.
Is your feature request related to a problem? Please describe.
I would like to be able to pass a name to the base
<table>
element for testing purposes. If the table appears conditionally (ie: my app may show an error message instead of the table if there's a network error or similar) it would be nice to be able to do a simpleconst materialTable = await screen.findByRole("table", { name: "my-cool-table" })
using react-testing-library/jest.
Currently, my only choice seems to be to check whether the string I pass for the title is there as the appropriate heading level:
const tableHeading = await screen.findByRole("heading", { level: 6, name: "My Cool Table" })
Would much prefer the former. Is there any way to assign that table name?
The text was updated successfully, but these errors were encountered: