projectBadge.spec.tsx 584 B

12345678910111213141516
  1. import {render, screen} from 'sentry-test/reactTestingLibrary';
  2. import ProjectBadge from 'sentry/components/idBadge/projectBadge';
  3. describe('ProjectBadge', function () {
  4. it('renders with Avatar and team name', function () {
  5. render(<ProjectBadge project={TestStubs.Project()} />);
  6. expect(screen.getByRole('img')).toBeInTheDocument();
  7. expect(screen.getByRole('link')).toHaveAttribute(
  8. 'href',
  9. '/organizations/org-slug/projects/project-slug/?project=2'
  10. );
  11. expect(screen.getByTestId('badge-display-name')).toHaveTextContent('project-slug');
  12. });
  13. });