teamAlertsTriggered.spec.jsx 706 B

12345678910111213141516171819
  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. render(
  12. <TeamAlertsTriggered organization={organization} teamSlug={team.slug} period="8w" />
  13. );
  14. expect(alertsTriggeredApi).toHaveBeenCalledTimes(1);
  15. });
  16. });