metasfresh-webui-frontend-legacy
metasfresh-webui-frontend-legacy copied to clipboard
Add unit tests for Table and child components
Is this a bug or feature request?
Feature
What is the current behavior?
Which are the steps to reproduce?
What is the expected or desired behavior?
We need more tests with the coming navigation changes.
@siemiatj Please have a look over the file Table.test.js on dev-2156
branch.
I have tried to create a Table component inside a Tab component with dummy props. But when I try to run the test it does fail with the following error:
Invariant Violation: Could not find "store" in either the context or props of "Connect(TableFilter)". Either wrap the root component in a <Provider>, or explicitly pass "store" as a prop to "Connect(TableFilter)".
And I don't understand why? because TableFilter is a child component of Table and if we use shallow rendering it should not care about it? Or in this case it does, but why?