For testing Im using JSDom, mocha, chai and ReactTestUtils.
One of my component got three radio button, that when a change is detected (onChange
) will run a function.
Everything works in manual testing, but I cant seem to trigger the function when I use simulate.Click
on it.
var FrequencyFormInstance = ReactTestUtils.findRenderedComponentWithType(rootElement, FrequencyForm);
var frequencyNode = ReactDom.findDOMNode(FrequencyFormInstance);
var oneOfTheRadioButton = frequencyNode.children[1].children[2];
ReactTestUtils.Simulate.click(oneOfTheRadioButton);
then some assert show me that the function inside the component was never ran, so it never detected the change (the click on the radio button).
any clue as to why?