diff --git a/client/src/components/molecules/VersionNumbers/index.test.tsx b/client/src/components/molecules/VersionNumbers/index.test.tsx index bf23bb6..06c97eb 100644 --- a/client/src/components/molecules/VersionNumbers/index.test.tsx +++ b/client/src/components/molecules/VersionNumbers/index.test.tsx @@ -58,21 +58,29 @@ const mockResponseFaulty = { describe('VersionNumbers', () => { it('renders without crashing', () => { - const { container } = render( + const { container, rerender } = render( - + ) mockAxios.mockResponse(mockResponse) expect(mockAxios.get).toHaveBeenCalled() expect(container.firstChild).toBeInTheDocument() + + rerender( + + + + ) + mockAxios.mockResponse(mockResponse) + expect(mockAxios.get).toHaveBeenCalled() }) it('renders without proper component response', () => { const { container } = render( - + ) diff --git a/client/src/components/organisms/WalletSelector.test.tsx b/client/src/components/organisms/WalletSelector.test.tsx index e668fba..ac9e4d9 100644 --- a/client/src/components/organisms/WalletSelector.test.tsx +++ b/client/src/components/organisms/WalletSelector.test.tsx @@ -7,10 +7,10 @@ import { userMockConnected } from '../../../__mocks__/user-mock' import { marketMock } from '../../../__mocks__/market-mock' describe('WalletSelector', () => { - it('renders without crashing', () => { + it('renders without crashing', async () => { ReactModal.setAppElement(document.createElement('div')) - const { container } = render( + const { container, getByText } = render( @@ -18,6 +18,13 @@ describe('WalletSelector', () => { ) expect(container.firstChild).toBeInTheDocument() - fireEvent.click(container.querySelector('button')) + fireEvent.click(getByText('Select wallet')) + + const burnerButton = await getByText('Burner Wallet') + fireEvent.click(burnerButton) + + fireEvent.click(getByText('Select wallet')) + // const metamaskButton = await getByText('MetaMask') + // fireEvent.click(metamaskButton) }) })