import { cleanup, fireEvent } from '@testing-library/react'; import { render } from '../../utils/theme-render-wrapper'; import noop from 'lodash/noop'; import { ASSETS_URL } from '../../consts/common'; import { Member } from './member'; afterEach(cleanup); describe('', () => { it(`should render successfully`, () => { render( ); }); it(`should render Member with tooltip`, async () => { const tooltipText = 'tooltipText'; const { getByTestId, findByText } = render( ); const avatarElm = getByTestId('memberAvatar'); fireEvent.mouseEnter(avatarElm); const tooltip = await findByText(tooltipText); expect(tooltip).toBeTruthy(); }); });