mongo.spec.tsx 758 B

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