import {render, screen} from 'sentry-test/reactTestingLibrary'; import BaseBadge from 'sentry/components/idBadge/baseBadge'; describe('BadgeBadge', function () { it('has a display name', function () { render( display name} /> ); expect(screen.getByText('display name')).toBeInTheDocument(); }); it('can hide avatar', function () { render( ); expect(screen.queryByTestId('badge-styled-avatar')).not.toBeInTheDocument(); expect(screen.getByTestId('badge-display-name')).toHaveTextContent('hello'); }); it('can hide name', function () { render( display name} /> ); expect(screen.queryByText('display name')).not.toBeInTheDocument(); }); });