12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- import {renderWithOnboardingLayout} from 'sentry-test/onboarding/renderWithOnboardingLayout';
- import {screen} from 'sentry-test/reactTestingLibrary';
- import {textWithMarkupMatcher} from 'sentry-test/utils';
- import {ProductSolution} from 'sentry/components/onboarding/productSelection';
- import docs from './maui';
- describe('maui onboarding docs', function () {
- it('renders errors onboarding docs correctly', async function () {
- renderWithOnboardingLayout(docs, {
- releaseRegistry: {
- 'sentry.dotnet.maui': {
- version: '1.99.9',
- },
- },
- });
- // 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();
- expect(
- screen.getByRole('heading', {name: 'Performance Monitoring'})
- ).toBeInTheDocument();
- expect(screen.getByRole('heading', {name: 'Sample Application'})).toBeInTheDocument();
- // Renders SDK version from registry
- expect(
- await screen.findByText(
- textWithMarkupMatcher(/Install-Package Sentry\.Maui -Version 1\.99\.9/)
- )
- ).toBeInTheDocument();
- });
- it('renders performance onboarding docs correctly', async function () {
- renderWithOnboardingLayout(docs, {
- selectedProducts: [ProductSolution.PERFORMANCE_MONITORING],
- });
- expect(
- await screen.findByText(textWithMarkupMatcher(/options.TracesSampleRate/))
- ).toBeInTheDocument();
- });
- it('renders profiling onboarding docs correctly', async function () {
- renderWithOnboardingLayout(docs, {
- selectedProducts: [
- ProductSolution.PERFORMANCE_MONITORING,
- ProductSolution.PROFILING,
- ],
- });
- expect(
- await screen.findByText(textWithMarkupMatcher(/options.ProfilesSampleRate/))
- ).toBeInTheDocument();
- });
- });
|