rails.spec.tsx 929 B

1234567891011121314151617181920212223242526
  1. import {renderWithOnboardingLayout} from 'sentry-test/onboarding/renderWithOnboardingLayout';
  2. import {screen} from 'sentry-test/reactTestingLibrary';
  3. import {textWithMarkupMatcher} from 'sentry-test/utils';
  4. import docs from './rails';
  5. describe('rails onboarding docs', function () {
  6. it('renders doc correctly', function () {
  7. renderWithOnboardingLayout(docs);
  8. // Renders main headings
  9. expect(screen.getByRole('heading', {name: 'Install'})).toBeInTheDocument();
  10. expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument();
  11. expect(screen.getByRole('heading', {name: 'Caveats'})).toBeInTheDocument();
  12. // Renders config options
  13. expect(
  14. screen.getByText(textWithMarkupMatcher(/config.breadcrumbs_logger/))
  15. ).toBeInTheDocument();
  16. // Renders import
  17. expect(
  18. screen.getByText(textWithMarkupMatcher(/gem \"sentry-ruby\"/))
  19. ).toBeInTheDocument();
  20. });
  21. });