awslambda.spec.tsx 850 B

1234567891011121314151617181920212223242526
  1. import {render, screen} from 'sentry-test/reactTestingLibrary';
  2. import {StepTitle} from 'sentry/components/onboarding/gettingStartedDoc/step';
  3. import {GettingStartedWithAwsLambda, steps} from './awslambda';
  4. describe('GettingStartedWithAwsLambda', function () {
  5. it('renders doc correctly', function () {
  6. render(<GettingStartedWithAwsLambda dsn="test-dsn" projectSlug="test-project" />);
  7. // Steps
  8. for (const step of steps({
  9. installSnippetYarn: 'test-install-snippet-yarn',
  10. installSnippetNpm: 'test-install-snippet-npm',
  11. importContent: 'test-import-content',
  12. initContent: 'test-init-content',
  13. sourceMapStep: {
  14. title: 'Upload Source Maps',
  15. },
  16. })) {
  17. expect(
  18. screen.getByRole('heading', {name: step.title ?? StepTitle[step.type]})
  19. ).toBeInTheDocument();
  20. }
  21. });
  22. });