We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There's an example of simulating click events using the shallow renderer:
it('simulates click events', () => { const onButtonClick = sinon.spy(); const wrapper = shallow( <Foo onButtonClick={onButtonClick} /> ); wrapper.find('button').click(); expect(onButtonClick.calledOnce).to.be.true; });
But when I try to use it, I get this:
$.find('.' + helloClass).click(); ^ TypeError: $.find(...).click is not a function
I didn't search meticulously, but I don't see a .click() method in the source... where is it?
.click()
The text was updated successfully, but these errors were encountered:
Also doesn't appear in the shallow.md API docs. =)
shallow.md
Sorry, something went wrong.
This is definitely a mistake. Thank you for pointing out.
wrapper.find('button').simulate('click')
Is what you're looking for. I'll fix!
PR Opened.
haha, I thought I already opened a PR for this. Where is my brain?
lelandrichardson
No branches or pull requests
There's an example of simulating click events using the shallow renderer:
But when I try to use it, I get this:
I didn't search meticulously, but I don't see a
.click()
method in the source... where is it?The text was updated successfully, but these errors were encountered: