azurefunctions.spec.tsx 820 B

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