for testing a react App with enzyme, the top App can be "mounted"
Code: Select all
var app_wrapper = mount(<App/>)
For a Button:
Code: Select all
var button = app_wrapper.find('Button[<selector>]');
Code: Select all
var input = app_wrapper.find('InputText[<selector>]');
Code: Select all
var slider = app_wrapper.find('Slider[<selector>]');
Code: Select all
button.simulate("click"); //OK
input.simulate('change', { target: { value: "__NEW_TEXT__" } }); // OK.
Code: Select all
slider.simulate('change', { target: { value: 55 } }); // does not work
slider.simulate('change', { value: 55 }); // does not work
Thanks for tips.
PS: the Slider widget seems to be no <input type="range"></input> at all. I am missing something?