awslambda.spec.tsx 993 B

1234567891011121314151617181920212223242526272829
  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 './awslambda';
  5. describe('awslambda onboarding docs', function () {
  6. it('renders docs correctly', async function () {
  7. renderWithOnboardingLayout(docs, {
  8. releaseRegistry: {
  9. 'sentry.dotnet.aspnetcore': {
  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. // Renders SDK version from registry
  19. expect(
  20. await screen.findByText(
  21. textWithMarkupMatcher(/Install-Package Sentry.AspNetCore -Version 1\.99\.9/)
  22. )
  23. ).toBeInTheDocument();
  24. });
  25. });