builtInRepositories.spec.tsx 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. import {BuiltInSymbolSourcesFixture} from 'sentry-fixture/builtInSymbolSources';
  2. import {initializeOrg} from 'sentry-test/initializeOrg';
  3. import {render, screen} from 'sentry-test/reactTestingLibrary';
  4. import BuiltInRepositories from 'sentry/views/settings/projectDebugFiles/sources/builtInRepositories';
  5. describe('Built-in Repositories', function () {
  6. const api = new MockApiClient();
  7. const {project, organization} = initializeOrg();
  8. const builtinSymbolSourceOptions = BuiltInSymbolSourcesFixture();
  9. const builtinSymbolSources = ['ios', 'microsoft', 'android'];
  10. it('renders', function () {
  11. render(
  12. <BuiltInRepositories
  13. api={api}
  14. organization={organization}
  15. project={project}
  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. });