diff --git a/src/components/button/__test__/__snapshots__/button.test.js.snap b/src/components/button/__test__/__snapshots__/button.test.js.snap index 417ff012..15dfb6dd 100644 --- a/src/components/button/__test__/__snapshots__/button.test.js.snap +++ b/src/components/button/__test__/__snapshots__/button.test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Button component Should be a Large Primary Button 1`] = ` - `; -exports[`Button component Should render as a React element link with custom href 1`] = ` +exports[`Button component Should be an anchor button 1`] = ` + +`; + +exports[`Button component Should render as a React element link with to prop 1`] = ` @@ -82,7 +92,7 @@ exports[`Button component Should render as a static Button 1`] = ` `; exports[`Button component Should render be disabled 1`] = ` - { it('Should be a default Button', () => { - const component = renderer.create(); expect(component.toJSON()).toMatchSnapshot(); }); - it('Should throw a console.error if no hrefAttr is defined when renderAs different as A and href attr is defined', () => { - // eslint-disable-next-line no-console - console.error = jest.genMockFn(); - renderer.create( - ); - // eslint-disable-next-line no-console - expect(console.error).toHaveBeenCalled(); - // eslint-disable-next-line no-console - console.error.mockRestore(); - }); it('Should render be disabled', () => { const component = renderer.create(
- - +
- - +
- - +
Modal Title

- @@ -69,7 +69,7 @@ exports[`Modal component Should close the modal on ESC key press 1`] = ` > Modal Title

-
@@ -169,7 +169,7 @@ exports[`Modal component Should not close the modal on ESC key press 1`] = ` > Modal Title

-
@@ -197,7 +197,7 @@ exports[`Modal component Should not close the modal on other than ESC key press > Modal Title

-
@@ -251,7 +251,7 @@ exports[`Modal component Should open the modal 1`] = ` > Modal Title

-
diff --git a/src/components/modal/__test__/modal.test.js b/src/components/modal/__test__/modal.test.js index 9813ee30..ba9958a4 100644 --- a/src/components/modal/__test__/modal.test.js +++ b/src/components/modal/__test__/modal.test.js @@ -37,7 +37,7 @@ describe('Modal component', () => { ); - component.find('a.delete').simulate('click'); + component.find('.delete').simulate('click'); expect(onClose).toHaveBeenCalledTimes(1); }); it('Should open the modal', () => { @@ -74,7 +74,7 @@ describe('Modal component', () => { ); const modal = window.document.querySelector('div.modal.is-active'); expect(modal).toMatchSnapshot(); - modal.querySelector('a.delete').click(); + modal.querySelector('.delete').click(); expect(onClose).toHaveBeenCalledTimes(1); expect(window.document.querySelector('div.modal.is-active')).toBeNull(); });