organizationApiKeyDetails.spec.jsx 789 B

123456789101112131415161718192021222324
  1. import {render, screen} from 'sentry-test/reactTestingLibrary';
  2. import OrganizationApiKeyDetails from 'sentry/views/settings/organizationApiKeys/organizationApiKeyDetails';
  3. describe('OrganizationApiKeyDetails', function () {
  4. beforeEach(function () {
  5. MockApiClient.clearMockResponses();
  6. MockApiClient.addMockResponse({
  7. url: '/organizations/org-slug/api-keys/1/',
  8. method: 'GET',
  9. body: TestStubs.ApiKey(),
  10. });
  11. });
  12. it('renders', function () {
  13. const wrapper = render(<OrganizationApiKeyDetails params={{apiKey: 1}} />, {
  14. context: TestStubs.routerContext(),
  15. organization: TestStubs.Organization(),
  16. });
  17. expect(screen.queryByTestId('loading-indicator')).not.toBeInTheDocument();
  18. expect(wrapper.container).toSnapshot();
  19. });
  20. });