rack.spec.tsx 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 './rack';
  6. describe('GettingStartedWithSpring', function () {
  7. it('renders errors onboarding docs correctly', function () {
  8. renderWithOnboardingLayout(docs);
  9. // Renders main headings
  10. expect(screen.getByRole('heading', {name: 'Install'})).toBeInTheDocument();
  11. expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument();
  12. });
  13. it('renders performance onboarding docs correctly', async function () {
  14. renderWithOnboardingLayout(docs, {
  15. selectedProducts: [ProductSolution.PERFORMANCE_MONITORING],
  16. });
  17. expect(
  18. await screen.findByText(textWithMarkupMatcher(/config.traces_sample_rate/))
  19. ).toBeInTheDocument();
  20. });
  21. it('renders profiling onboarding docs correctly', async function () {
  22. renderWithOnboardingLayout(docs, {
  23. selectedProducts: [
  24. ProductSolution.PERFORMANCE_MONITORING,
  25. ProductSolution.PROFILING,
  26. ],
  27. });
  28. expect(
  29. await screen.findByText(textWithMarkupMatcher(/config.profiles_sample_rate/))
  30. ).toBeInTheDocument();
  31. expect(
  32. await screen.findByText(textWithMarkupMatcher(/Ruby Profiling beta is available/))
  33. ).toBeInTheDocument();
  34. expect(
  35. await screen.findByText(
  36. textWithMarkupMatcher(/Make sure stackprof is loaded before sentry-ruby/)
  37. )
  38. ).toBeInTheDocument();
  39. });
  40. });