teamResolutionTime.spec.tsx 896 B

1234567891011121314151617181920212223
  1. import {OrganizationFixture} from 'sentry-fixture/organization';
  2. import {TeamFixture} from 'sentry-fixture/team';
  3. import {TeamResolutionTimeFixture} from 'sentry-fixture/teamResolutionTime';
  4. import {render} from 'sentry-test/reactTestingLibrary';
  5. import TeamResolutionTime from 'sentry/views/organizationStats/teamInsights/teamResolutionTime';
  6. describe('TeamResolutionTime', () => {
  7. it('should render graph of issue time to resolution', () => {
  8. const team = TeamFixture();
  9. const organization = OrganizationFixture();
  10. const timeToResolutionApi = MockApiClient.addMockResponse({
  11. url: `/teams/${organization.slug}/${team.slug}/time-to-resolution/`,
  12. body: TeamResolutionTimeFixture(),
  13. });
  14. render(
  15. <TeamResolutionTime organization={organization} teamSlug={team.slug} period="8w" />
  16. );
  17. expect(timeToResolutionApi).toHaveBeenCalledTimes(1);
  18. });
  19. });