uwp.spec.tsx 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 './uwp';
  6. describe('uwp 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. });