awslambda.spec.tsx 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 './awslambda';
  6. describe('awslambda onboarding docs', function () {
  7. it('renders errors onboarding docs correctly', async function () {
  8. renderWithOnboardingLayout(docs, {
  9. releaseRegistry: {
  10. 'sentry.dotnet.aspnetcore': {
  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. // Renders SDK version from registry
  20. expect(
  21. await screen.findByText(
  22. textWithMarkupMatcher(/Install-Package Sentry.AspNetCore -Version 1\.99\.9/)
  23. )
  24. ).toBeInTheDocument();
  25. });
  26. it('renders performance onboarding docs correctly', async function () {
  27. renderWithOnboardingLayout(docs, {
  28. selectedProducts: [ProductSolution.PERFORMANCE_MONITORING],
  29. });
  30. expect(
  31. await screen.findByText(textWithMarkupMatcher(/o.TracesSampleRate/))
  32. ).toBeInTheDocument();
  33. });
  34. });