mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
38 lines
1.3 KiB
TypeScript
38 lines
1.3 KiB
TypeScript
import {renderWithOnboardingLayout} from 'sentry-test/onboarding/renderWithOnboardingLayout';
|
|
import {screen} from 'sentry-test/reactTestingLibrary';
|
|
import {textWithMarkupMatcher} from 'sentry-test/utils';
|
|
|
|
import docs from './quart';
|
|
|
|
describe('quart onboarding docs', function () {
|
|
it('renders doc correctly', function () {
|
|
renderWithOnboardingLayout(docs);
|
|
|
|
// Renders main headings
|
|
expect(screen.getByRole('heading', {name: 'Install'})).toBeInTheDocument();
|
|
expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument();
|
|
expect(screen.getByRole('heading', {name: 'Verify'})).toBeInTheDocument();
|
|
|
|
// Renders install instructions
|
|
expect(
|
|
screen.getByText(textWithMarkupMatcher(/pip install --upgrade sentry-sdk\[quart\]/))
|
|
).toBeInTheDocument();
|
|
});
|
|
|
|
it('renders without performance monitoring', 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();
|
|
});
|
|
});
|