winforms.spec.tsx 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import {renderWithOnboardingLayout} from 'sentry-test/onboarding/renderWithOnboardingLayout';
  2. import {screen} from 'sentry-test/reactTestingLibrary';
  3. import {textWithMarkupMatcher} from 'sentry-test/utils';
  4. import {ProductSolution} from 'sentry/components/onboarding/productSelection';
  5. import docs from './winforms';
  6. describe('winforms onboarding docs', function () {
  7. it('renders errors onboarding docs correctly', async function () {
  8. renderWithOnboardingLayout(docs, {
  9. releaseRegistry: {
  10. 'sentry.dotnet': {
  11. version: '1.99.9',
  12. },
  13. },
  14. });
  15. // Renders main headings
  16. expect(screen.getByRole('heading', {name: 'Install'})).toBeInTheDocument();
  17. expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument();
  18. expect(screen.getByRole('heading', {name: 'Verify'})).toBeInTheDocument();
  19. expect(
  20. screen.getByRole('heading', {name: 'Performance Monitoring'})
  21. ).toBeInTheDocument();
  22. expect(screen.getByRole('heading', {name: 'Documentation'})).toBeInTheDocument();
  23. expect(screen.getByRole('heading', {name: 'Samples'})).toBeInTheDocument();
  24. // Renders SDK version from registry
  25. expect(
  26. await screen.findByText(
  27. textWithMarkupMatcher(/Install-Package Sentry -Version 1\.99\.9/)
  28. )
  29. ).toBeInTheDocument();
  30. });
  31. it('renders performance onboarding docs correctly', async function () {
  32. renderWithOnboardingLayout(docs, {
  33. selectedProducts: [ProductSolution.PERFORMANCE_MONITORING],
  34. });
  35. expect(
  36. await screen.findByText(textWithMarkupMatcher(/o.TracesSampleRate/))
  37. ).toBeInTheDocument();
  38. });
  39. it('renders profiling onboarding docs correctly', async function () {
  40. renderWithOnboardingLayout(docs, {
  41. selectedProducts: [
  42. ProductSolution.PERFORMANCE_MONITORING,
  43. ProductSolution.PROFILING,
  44. ],
  45. });
  46. expect(
  47. await screen.findByText(textWithMarkupMatcher(/o.ProfilesSampleRate/))
  48. ).toBeInTheDocument();
  49. });
  50. });