Components cannot find react-redux context value #22366
-
Hello all,
Here is my simple component test (using Cypress v10):
Here is the commands support file:
The type file:
The Redux store file:
And the parts of my package.json I can share:
Thank you for any help you can provide. Please let me know if there is anything else I should provide. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I found the answer myself, and honestly I feel quite silly. |
Beta Was this translation helpful? Give feedback.
-
Saved me debugging time! Helpful Resource: Cypress Doc - Custom Mount Redux |
Beta Was this translation helpful? Give feedback.
I found the answer myself, and honestly I feel quite silly.
I had been defining a new mount, globally accessible via cy.mount, that would properly wrap the component in a redux provider.
But somehow (and I am still not sure how because I have since started over), I was also creating another cy.mount elsewhere, because I got it to work now and I am sure that the problem was that I was calling the wrong mount. I was able to determine this in my new attempt by changing the name of the mount I was creating to reduxMount so I could properly track which mount I was using.