123456789101112131415161718192021222324252627282930 |
- import {renderWithOnboardingLayout} from 'sentry-test/onboarding/renderWithOnboardingLayout';
- import {screen} from 'sentry-test/reactTestingLibrary';
- import {textWithMarkupMatcher} from 'sentry-test/utils';
- import docs from './django';
- describe('django onboarding docs', function () {
- it('renders doc correctly', function () {
- renderWithOnboardingLayout(docs);
- // Renders main headings
- expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument();
- });
- it('renders without tracing', function () {
- renderWithOnboardingLayout(docs, {
- selectedProducts: [],
- });
- // Does not render config option
- expect(
- screen.queryByText(textWithMarkupMatcher(/traces_sample_rate: 1\.0,/))
- ).not.toBeInTheDocument();
- // Does not render config option
- expect(
- screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate: 1\.0,/))
- ).not.toBeInTheDocument();
- });
- });
|