express.spec.tsx 880 B

123456789101112131415161718192021222324252627
  1. import {render, screen} from 'sentry-test/reactTestingLibrary';
  2. import {StepTitle} from 'sentry/components/onboarding/gettingStartedDoc/step';
  3. import {GettingStartedWithExpress, steps} from './express';
  4. describe('GettingStartedWithExpress', function () {
  5. it('renders doc correctly', function () {
  6. render(<GettingStartedWithExpress 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. hasPerformanceMonitoring: true,
  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. });