Issue with TableView component not rendering data in test #8463
-
Hello, I'm experiencing an issue with the TableView component. The component does not seem to render the data as expected in my test environment, although it works fine in a regular browser environment. Issue DescriptionWhen using the TableView component, the data rows are not rendered in the test output. However, if I replace the TableView with a simple div-based structure, the data renders correctly. This suggests that there might be an issue with how TableView is being used or how it interacts with the test environment. Test setup:
Code That WorksHere is a simplified version of the component using div elements that works as expected:
Code That Doesn't WorkHere is a simplified version of my component using the TableView component that does not render the data in the test environment:
And here is the actual component I'm trying to test, which obviously doesn't work neither:
Any insights or suggestions on how to resolve this issue would be greatly appreciated. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Have you seen this section of the docs? https://react-spectrum.adobe.com/react-spectrum/testing.html#virtualized-components Also we provide some utilities to make testing easier: https://react-spectrum.adobe.com/react-spectrum/TableView.html#testing |
Beta Was this translation helpful? Give feedback.
Have you seen this section of the docs? https://react-spectrum.adobe.com/react-spectrum/testing.html#virtualized-components
Also we provide some utilities to make testing easier: https://react-spectrum.adobe.com/react-spectrum/TableView.html#testing