builtInRepositories.spec.tsx 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. import {BuiltInSymbolSources} 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 = BuiltInSymbolSources();
  9. const builtinSymbolSources = ['ios', 'microsoft', 'android'];
  10. it('renders', function () {
  11. render(
  12. <BuiltInRepositories
  13. api={api}
  14. organization={organization}
  15. project={project}
  16. isLoading={false}
  17. builtinSymbolSourceOptions={builtinSymbolSourceOptions}
  18. builtinSymbolSources={builtinSymbolSources}
  19. />
  20. );
  21. // Section Title
  22. expect(screen.queryAllByText('Built-in Repositories')).toHaveLength(2);
  23. // Enabled Field
  24. expect(screen.getByText('Microsoft')).toBeInTheDocument();
  25. expect(screen.getByRole('textbox')).toBeEnabled();
  26. });
  27. });