xamarin.spec.tsx 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  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 './xamarin';
  5. describe('xamarin onboarding docs', function () {
  6. it('renders errors onboarding docs correctly', async function () {
  7. renderWithOnboardingLayout(docs, {
  8. releaseRegistry: {
  9. 'sentry.dotnet.xamarin-forms': {
  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: 'Limitations'})).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\.Xamarin\.Forms -Version 1\.99\.9/)
  28. )
  29. ).toBeInTheDocument();
  30. });
  31. });