teamResolutionTime.spec.tsx 810 B

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