capacitor.spec.tsx 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. import {renderWithOnboardingLayout} from 'sentry-test/onboarding/renderWithOnboardingLayout';
  2. import {screen} from 'sentry-test/reactTestingLibrary';
  3. import docs, {CapacitorVersion} from './capacitor';
  4. describe('capacitor onboarding docs', function () {
  5. it('renders docs correctly', function () {
  6. renderWithOnboardingLayout(docs);
  7. // Renders main headings
  8. expect(screen.getByRole('heading', {name: 'Install'})).toBeInTheDocument();
  9. expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument();
  10. expect(screen.getByRole('heading', {name: 'Verify'})).toBeInTheDocument();
  11. });
  12. it('renders capacitor 2 docs correctly', function () {
  13. renderWithOnboardingLayout(docs, {
  14. selectedOptions: {
  15. capacitorVersion: CapacitorVersion.V2,
  16. },
  17. });
  18. // Renders main headings
  19. expect(screen.getByRole('heading', {name: 'Install'})).toBeInTheDocument();
  20. expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument();
  21. expect(
  22. screen.getByRole('heading', {name: 'Capacitor 2 - Android'})
  23. ).toBeInTheDocument();
  24. expect(screen.getByRole('heading', {name: 'Verify'})).toBeInTheDocument();
  25. });
  26. });