onboarding.spec.tsx 995 B

12345678910111213141516171819202122232425262728
  1. import {OrganizationFixture} from 'sentry-fixture/organization';
  2. import {ProjectFixture} from 'sentry-fixture/project';
  3. import {render, screen} from 'sentry-test/reactTestingLibrary';
  4. import Onboarding from 'sentry/views/performance/onboarding';
  5. describe('Performance Onboarding View > Unsupported Banner', function () {
  6. const organization = OrganizationFixture();
  7. it('Displays unsupported banner for unsupported projects', function () {
  8. const project = ProjectFixture({
  9. platform: 'nintendo-switch',
  10. });
  11. render(<Onboarding organization={organization} project={project} />);
  12. expect(screen.getByTestId('unsupported-alert')).toBeInTheDocument();
  13. });
  14. it('Does not display unsupported banner for supported projects', function () {
  15. const project = ProjectFixture({
  16. platform: 'java',
  17. });
  18. render(<Onboarding organization={organization} project={project} />);
  19. expect(screen.queryByTestId('unsupported-alert')).not.toBeInTheDocument();
  20. });
  21. });