WebJamApps / breakpointministries

MIT License
0 stars 0 forks source link

Fix last homepage test #58

Closed Unesdala closed 3 years ago

Unesdala commented 3 years ago

Homepage test to simulate clicking on addBlogButton isn't working.

Currently have the test commented out. Last one needed before Homepage Fixes should be done.

` Home › renders when authenticated and clicks button to addBlog

Method “simulate” is meant to be run on 1 node. 4 found instead.

  111 |     />);
  112 |     wrapper2.instance().addBlogButton = jest.fn();
> 113 |     wrapper2.find('#addBlogButton').simulate('click');
      |                                     ^
  114 |     expect(wrapper2.instance().addBlogButton).toHaveBeenCalledWith('1');
  115 |   });
  116 | });

  at ShallowWrapper.single (node_modules/enzyme/src/ShallowWrapper.js:1652:13)
  at ShallowWrapper.simulate (node_modules/enzyme/src/ShallowWrapper.js:1133:17)
  at Object.<anonymous> (test/containers/Homepage/index.spec.tsx:113:37)`
Unesdala commented 3 years ago

Nevermind, I figured it out ^^