expectCt.spec.tsx 955 B

123456789101112131415161718192021222324252627282930313233
  1. import {initializeOrg} from 'sentry-test/initializeOrg';
  2. import {render} from 'sentry-test/reactTestingLibrary';
  3. import ProjectExpectCtReports from 'sentry/views/settings/projectSecurityHeaders/expectCt';
  4. describe('ProjectExpectCtReports', function () {
  5. const {router, org, project} = initializeOrg();
  6. const url = `/projects/${org.slug}/${project.slug}/expect-ct/`;
  7. beforeEach(function () {
  8. MockApiClient.clearMockResponses();
  9. MockApiClient.addMockResponse({
  10. url: `/projects/${org.slug}/${project.slug}/keys/`,
  11. method: 'GET',
  12. body: [],
  13. });
  14. });
  15. it('renders', function () {
  16. const {container} = render(
  17. <ProjectExpectCtReports
  18. route={{}}
  19. routeParams={{}}
  20. router={router}
  21. routes={router.routes}
  22. params={{orgId: org.slug, projectId: project.slug}}
  23. location={TestStubs.location({pathname: url})}
  24. />
  25. );
  26. expect(container).toSnapshot();
  27. });
  28. });