const wrapper = shallow(<TitleContainer />);
expect(wrapper.find(SubmitAppFormContainer)).to.have.lengthOf(0);
You can't really test anything else, since "isPageEnabled" is never anything but false in your code.
If it's a prop, absolutely. You have it marked as "private".
The first one is a typescript error and is unrelated to enzyme; the second one is troubling and might reflect a real bug in enzyme.
Can you confirm that the code in the OP matches the exact code in the TitleContainer component?
Also, which exact version of enzyme, react, and the react 15 adapter are you using? Can you include the code inside UserRoles?
So in that error, what is on line 38 of UserRoles.test.tsx?
and while I have you, if you delete the connect wrapper, and also delete all the methods but render in TitleContainer, do you get the same issue?
no, i mean in the actual implementation of TitleContainer - reduce it down to just what you have in the OP.
Thanks - I'm having trouble reproducing this; can you try updating to enzyme-adapter-react-15 v1.1, and enzyme v3.6?
If you set them to true before creating the wrapper, yes.
In your case, where you've declared "private" (altho fully public) own properties, you're right - you'd need to alter them, and then wrapper.update(), and then you'd be able to wrapper.find.
It seems right to me.
I'm not sure how to proceed here. Is there any chance you could make a small repo that can reproduce the problem, so I can clone it myself? That way I can much more easily figure out exactly what is wrong.
Note that npm ls has to exit successfully, otherwise your dependency graph is invalid, and nothing can be expected to work.