sveltekit.spec.tsx 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import {renderWithOnboardingLayout} from 'sentry-test/onboarding/renderWithOnboardingLayout';
  2. import {screen} from 'sentry-test/reactTestingLibrary';
  3. import {textWithMarkupMatcher} from 'sentry-test/utils';
  4. import {ProductSolution} from 'sentry/components/onboarding/productSelection';
  5. import docs from './sveltekit';
  6. describe('javascript-sveltekit onboarding docs', function () {
  7. it('renders onboarding docs correctly', () => {
  8. renderWithOnboardingLayout(docs);
  9. // Renders main headings
  10. expect(
  11. screen.getByRole('heading', {name: 'Automatic Configuration (Recommended)'})
  12. ).toBeInTheDocument();
  13. // Includes configure statement
  14. expect(
  15. screen.getByText(textWithMarkupMatcher(/npx @sentry\/wizard@latest -i sveltekit/))
  16. ).toBeInTheDocument();
  17. });
  18. it('displays the verify instructions', () => {
  19. renderWithOnboardingLayout(docs, {
  20. selectedProducts: [
  21. ProductSolution.ERROR_MONITORING,
  22. ProductSolution.PERFORMANCE_MONITORING,
  23. ProductSolution.SESSION_REPLAY,
  24. ],
  25. });
  26. expect(
  27. screen.queryByText(textWithMarkupMatcher(/sentry-example-page/))
  28. ).toBeInTheDocument();
  29. });
  30. });