teamResolutionTime.spec.tsx 713 B

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