builtInRepositories.spec.tsx 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. import {initializeOrg} from 'sentry-test/initializeOrg';
  2. import {render, screen} from 'sentry-test/reactTestingLibrary';
  3. import BuiltInRepositories from 'sentry/views/settings/projectDebugFiles/sources/builtInRepositories';
  4. describe('Built-in Repositories', function () {
  5. const api = new MockApiClient();
  6. const {project, organization} = initializeOrg();
  7. const builtinSymbolSourceOptions = TestStubs.BuiltInSymbolSources();
  8. const builtinSymbolSources = ['ios', 'microsoft', 'android'];
  9. it('renders', function () {
  10. render(
  11. <BuiltInRepositories
  12. api={api}
  13. organization={organization}
  14. projSlug={project.slug}
  15. isLoading={false}
  16. builtinSymbolSourceOptions={builtinSymbolSourceOptions}
  17. builtinSymbolSources={builtinSymbolSources}
  18. />
  19. );
  20. // Section Title
  21. expect(screen.queryAllByText('Built-in Repositories')).toHaveLength(2);
  22. // Enabled Field
  23. expect(screen.getByText('Microsoft')).toBeInTheDocument();
  24. expect(screen.getByRole('textbox')).toBeEnabled();
  25. });
  26. });