awslambda.spec.tsx 788 B

12345678910111213141516171819202122232425
  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. installSnippet: 'test-install-snippet',
  10. importContent: 'test-import-content',
  11. initContent: 'test-init-content',
  12. sourceMapStep: {
  13. title: 'Upload Source Maps',
  14. },
  15. })) {
  16. expect(
  17. screen.getByRole('heading', {name: step.title ?? StepTitle[step.type]})
  18. ).toBeInTheDocument();
  19. }
  20. });
  21. });