tryton.spec.tsx 956 B

123456789101112131415161718192021222324252627282930
  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 './django';
  5. describe('django onboarding docs', function () {
  6. it('renders doc correctly', function () {
  7. renderWithOnboardingLayout(docs);
  8. // Renders main headings
  9. expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument();
  10. });
  11. it('renders without performance monitoring', function () {
  12. renderWithOnboardingLayout(docs, {
  13. selectedProducts: [],
  14. });
  15. // Does not render config option
  16. expect(
  17. screen.queryByText(textWithMarkupMatcher(/traces_sample_rate: 1\.0,/))
  18. ).not.toBeInTheDocument();
  19. // Does not render config option
  20. expect(
  21. screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate: 1\.0,/))
  22. ).not.toBeInTheDocument();
  23. });
  24. });