Skip to content

Commit

Permalink
ref(onboarding): Convert platform apple & apple-macos to new structure (
Browse files Browse the repository at this point in the history
#59412)

- relates to #56549
  • Loading branch information
ArthurKnaus authored Nov 7, 2023
1 parent 77baa9f commit 6e656e1
Show file tree
Hide file tree
Showing 5 changed files with 216 additions and 395 deletions.
2 changes: 1 addition & 1 deletion static/app/gettingStartedDocs/apple/apple-ios.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {screen} from 'sentry-test/reactTestingLibrary';
import docs from './apple-ios';

describe('apple-ios onboarding docs', function () {
it('renders gradle docs correctly', function () {
it('renders docs correctly', function () {
renderWithOnboardingLayout(docs);

// Renders main headings
Expand Down
37 changes: 25 additions & 12 deletions static/app/gettingStartedDocs/apple/apple-macos.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
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 docs from './apple-macos';

import {GettingStartedWithMacos, steps} from './apple-macos';
describe('apple-macos onboarding docs', function () {
it('renders docs correctly', async function () {
renderWithOnboardingLayout(docs, {
releaseRegistry: {
'sentry.cocoa': {
version: '1.99.9',
},
},
});

describe('GettingStartedWithMacos', function () {
it('renders doc correctly', function () {
render(<GettingStartedWithMacos dsn="test-dsn" projectSlug="test-project" />);
// Renders main headings
expect(screen.getByRole('heading', {name: 'Install'})).toBeInTheDocument();
expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument();
expect(screen.getByRole('heading', {name: 'Verify'})).toBeInTheDocument();

// Steps
for (const step of steps()) {
expect(
screen.getByRole('heading', {name: step.title ?? StepTitle[step.type]})
).toBeInTheDocument();
}
// Renders SDK version from registry
expect(
await screen.findByText(
textWithMarkupMatcher(
/\.package\(url: "https:\/\/github.com\/getsentry\/sentry-cocoa", from: "1\.99\.9"\),/
)
)
).toBeInTheDocument();
});
});
Loading

0 comments on commit 6e656e1

Please sign in to comment.