teamAlertsTriggered.spec.jsx 746 B

1234567891011121314151617181920
  1. import {render} from 'sentry-test/reactTestingLibrary';
  2. import TeamAlertsTriggered from 'sentry/views/organizationStats/teamInsights/teamAlertsTriggered';
  3. describe('TeamAlertsTriggered', () => {
  4. it('should render graph of alerts triggered', () => {
  5. const team = TestStubs.Team();
  6. const organization = TestStubs.Organization();
  7. const alertsTriggeredApi = MockApiClient.addMockResponse({
  8. url: `/teams/${organization.slug}/${team.slug}/alerts-triggered/`,
  9. body: TestStubs.TeamAlertsTriggered(),
  10. });
  11. MockApiClient.warnOnMissingMocks();
  12. render(
  13. <TeamAlertsTriggered organization={organization} teamSlug={team.slug} period="8w" />
  14. );
  15. expect(alertsTriggeredApi).toHaveBeenCalledTimes(1);
  16. });
  17. });