Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions static/app/components/onboarding/productSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ export const platformProductAvailability = {
ProductSolution.PERFORMANCE_MONITORING,
ProductSolution.SESSION_REPLAY,
],
'javascript-remix': [
ProductSolution.PERFORMANCE_MONITORING,
ProductSolution.SESSION_REPLAY,
],
'javascript-svelte': [
ProductSolution.PERFORMANCE_MONITORING,
ProductSolution.SESSION_REPLAY,
Expand Down
53 changes: 17 additions & 36 deletions static/app/gettingStartedDocs/javascript/remix.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,43 +1,24 @@
import {render, screen} from 'sentry-test/reactTestingLibrary';
import {renderWithOnboardingLayout} from 'sentry-test/onboarding/renderWithOnboardingLayout';
import {screen} from 'sentry-test/reactTestingLibrary';
import {textWithMarkupMatcher} from 'sentry-test/utils';

import {StepTitle} from 'sentry/components/onboarding/gettingStartedDoc/step';
import {ProductSolution} from 'sentry/components/onboarding/productSelection';
import docs from './remix';

import {GettingStartedWithRemix, nextSteps, steps} from './remix';
describe('javascript-remix onboarding docs', function () {
it('renders onboarding docs correctly', () => {
renderWithOnboardingLayout(docs);

describe('GettingStartedWithRemix', function () {
it('all products are selected', function () {
render(
<GettingStartedWithRemix
dsn="test-dsn"
projectSlug="test-project"
activeProductSelection={[
ProductSolution.PERFORMANCE_MONITORING,
ProductSolution.SESSION_REPLAY,
]}
/>
);
// Renders main headings
expect(screen.getByRole('heading', {name: 'Install'})).toBeInTheDocument();
expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument();
expect(screen.getByRole('heading', {name: 'Next Steps'})).toBeInTheDocument();

// Steps
for (const step of steps()) {
expect(
screen.getByRole('heading', {name: step.title ?? StepTitle[step.type]})
).toBeInTheDocument();
}
// Includes minimum required Astro version
expect(screen.getByText(textWithMarkupMatcher(/Remix 1.0.0/))).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();
}
// Includes wizard command statement
expect(
screen.getByText(textWithMarkupMatcher(/npx @sentry\/wizard@latest -i remix/))
).toBeInTheDocument();
});
});
Loading