sanic.spec.tsx 819 B

123456789101112131415161718192021
  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 './sanic';
  5. describe('sanic 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: 'Verify'})).toBeInTheDocument();
  12. // Renders install instructions
  13. expect(
  14. screen.getByText(textWithMarkupMatcher(/pip install --upgrade sentry-sdk\[sanic\]/))
  15. ).toBeInTheDocument();
  16. });
  17. });