I have a span tag in my component and I need to click it using enzyme
<span className="lock">
<span onClick={[undefined]} id="lock">
<i className="fa fa-lock" />
Reserve this chat
</span>
</span>
Here is my test
it('simulating reservechat click ...',()=>{
const wrapper=shallow(<ReserveChat activeConversation={conversation1} />);
const button=wrapper.find('span').last();
button.simulate('click');
});
I am confused to find what to click,usually there will be some div class or other findable tags