capacitor.spec.tsx 1.1 KB

123456789101112131415161718192021222324252627282930
  1. import {renderWithOnboardingLayout} from 'sentry-test/onboarding/renderWithOnboardingLayout';
  2. import {screen} from 'sentry-test/reactTestingLibrary';
  3. import docs, {SiblingOption} 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. for (const enumMember in SiblingOption) {
  13. it(`renders capacitor docs correctly with sibling ${enumMember}`, function () {
  14. renderWithOnboardingLayout(docs, {
  15. selectedOptions: {
  16. siblingOption: enumMember,
  17. },
  18. });
  19. // Renders main headings
  20. expect(screen.getByRole('heading', {name: 'Install'})).toBeInTheDocument();
  21. expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument();
  22. expect(screen.getByRole('heading', {name: 'Verify'})).toBeInTheDocument();
  23. });
  24. }
  25. });