import React from 'react' import { render } from '@testing-library/react' import Popover from './Popover' import { userMock, userMockConnected } from '../../../__mocks__/user-mock' import { marketMock } from '../../../__mocks__/market-mock' import { User, Market } from '../../../context' describe('Popover', () => { it('renders without crashing', () => { const { container } = render( null} style={{}} /> ) expect(container.firstChild).toBeInTheDocument() }) it('renders connected without crashing', () => { const { container } = render( null} style={{}} /> ) expect(container.firstChild).toBeInTheDocument() }) it('renders correct network', () => { const { container } = render( null} style={{}} /> ) expect(container.firstChild).toBeInTheDocument() expect(container.firstChild).toHaveTextContent('Connected to Pacific') }) it('renders with wrong network', () => { const { container } = render( null} style={{}} /> ) expect(container.firstChild).toBeInTheDocument() expect(container.firstChild).toHaveTextContent( 'Please connect to Custom RPC' ) }) })