teamResolutionTime.spec.tsx 858 B

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