winforms.spec.tsx 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  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 './winforms';
  5. describe('winforms onboarding docs', function () {
  6. it('renders docs correctly', async function () {
  7. renderWithOnboardingLayout(docs, {
  8. releaseRegistry: {
  9. 'sentry.dotnet': {
  10. version: '1.99.9',
  11. },
  12. },
  13. });
  14. // Renders main headings
  15. expect(screen.getByRole('heading', {name: 'Install'})).toBeInTheDocument();
  16. expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument();
  17. expect(screen.getByRole('heading', {name: 'Verify'})).toBeInTheDocument();
  18. expect(
  19. screen.getByRole('heading', {name: 'Performance Monitoring'})
  20. ).toBeInTheDocument();
  21. expect(screen.getByRole('heading', {name: 'Documentation'})).toBeInTheDocument();
  22. expect(screen.getByRole('heading', {name: 'Samples'})).toBeInTheDocument();
  23. // Renders SDK version from registry
  24. expect(
  25. await screen.findByText(
  26. textWithMarkupMatcher(/Install-Package Sentry -Version 1\.99\.9/)
  27. )
  28. ).toBeInTheDocument();
  29. });
  30. });