Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions tests/js/spec/views/alerts/alertBadge.spec.jsx

This file was deleted.

19 changes: 19 additions & 0 deletions tests/js/spec/views/alerts/alertBadge.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import {mountWithTheme, screen} from 'sentry-test/reactTestingLibrary';

import AlertBadge from 'app/views/alerts/alertBadge';
import {IncidentStatus} from 'app/views/alerts/types';

describe('AlertBadge', () => {
it('displays status', () => {
mountWithTheme(<AlertBadge status={IncidentStatus.CLOSED} />);
expect(screen.getByText('Resolved')).toBeInTheDocument();
});
it('hides status text', () => {
mountWithTheme(<AlertBadge hideText status={IncidentStatus.CLOSED} />);
expect(screen.queryByText('Resolved')).not.toBeInTheDocument();
});
it('can be an issue badge', () => {
mountWithTheme(<AlertBadge isIssue />);
expect(screen.getByText('Issue')).toBeInTheDocument();
});
});