123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import {render, screen} from 'sentry-test/reactTestingLibrary';
- import {StepTitle} from 'sentry/components/onboarding/gettingStartedDoc/step';
- import {ProductSolution} from 'sentry/components/onboarding/productSelection';
- import {GettingStartedWithSvelte, nextSteps, steps} from './svelte';
- describe('GettingStartedWithSvelte', function () {
- it('all products are selected', function () {
- render(
- <GettingStartedWithSvelte
- dsn="test-dsn"
- activeProductSelection={[
- ProductSolution.PERFORMANCE_MONITORING,
- ProductSolution.SESSION_REPLAY,
- ]}
- />
- );
- // Steps
- for (const step of steps()) {
- expect(
- screen.getByRole('heading', {name: step.title ?? StepTitle[step.type]})
- ).toBeInTheDocument();
- }
- // Next Steps
- const filteredNextStepsLinks = nextSteps.filter(
- nextStep =>
- ![
- ProductSolution.PERFORMANCE_MONITORING,
- ProductSolution.SESSION_REPLAY,
- ].includes(nextStep.id as ProductSolution)
- );
- for (const filteredNextStepsLink of filteredNextStepsLinks) {
- expect(
- screen.getByRole('link', {name: filteredNextStepsLink.name})
- ).toBeInTheDocument();
- }
- });
- });
|