how to simulate dropodown click in react testing
document.body.innerHTML = `
<select>
<option value="hello">Hello</option>
<option value="goodbye" selected>Goodbye</option>
</select>
`;
const props = {
node: document.querySelector('select'),
};
const wrapper = mount(<Component {...props} />);
expect(wrapper.render().find('select [selected]').val()).to.equal('goodbye');
wrapper.find('select').node.value = 'hello';
wrapper.find('select').simulate('change');
expect(wrapper.render().find('select [selected]').val()).to.equal('hello');
});