azurefunctions.spec.tsx 882 B

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