title: Simulate button click with Jest & Enzyme
body: <br/>
  I'm trying to simulate a click with jest & enzyme and I'm new to react's testing libraries.<br/>
  My component is using Material UI. <br/>
  <p>Here's the part of my code I want to test: <br/></p>
  <pre><code>                    &lt;div&gt;
                          &lt;Typography className={classes.instructions}&gt;
                              All steps completed - you're finished
                          &lt;/Typography&gt;
                          &lt;Button onClick={handleNext} className={classes.button}&gt;
                              Next
                          &lt;/Button&gt;
                      &lt;/div&gt;
  </code></pre>
  <p>In this part, I want to test the button click <br/>
  Here's what I've done so far:<Br/></p>
  <pre><code> let wrapper;
      const handleNext = jest.fn();
      beforeEach(() =&gt; {
          wrapper = mount(&lt;ModelStepper handleNext={handleNext}/&gt;)
      })
    it(&quot;handleNext increment&quot;, () =&gt; {
          const btn = wrapper.find(Button).at(1)
          expect(handleNext).toBeCalledTimes(0);
          btn.simulate(&quot;click&quot;);
          expect(handleNext).toBeCalledTimes(1);
      })
  </code></pre>
  <p>For some reason I'm not getting it to be clicked, I've already console logged the text of the button and it's the correct button I want to click.</p>
  <p>Thanks!!</p>