node.spec.tsx 729 B

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