-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref(onboarding): Convert platform flutter to new structure (#59520)
- relates to #56549
- Loading branch information
1 parent
10d97a0
commit 9dd57fc
Showing
3 changed files
with
148 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,6 +98,7 @@ const onboarding: OnboardingConfig = { | |
}, | ||
], | ||
}; | ||
|
||
const docs: Docs = { | ||
onboarding, | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,27 @@ | ||
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 './flutter'; | ||
|
||
import {GettingStartedWithFlutter, steps} from './flutter'; | ||
describe('flutter onboarding docs', function () { | ||
it('renders docs correctly', async function () { | ||
renderWithOnboardingLayout(docs, { | ||
releaseRegistry: { | ||
'sentry.dart.flutter': { | ||
version: '1.99.9', | ||
}, | ||
}, | ||
}); | ||
|
||
describe('GettingStartedWithFlutter', function () { | ||
it('renders doc correctly', function () { | ||
render(<GettingStartedWithFlutter 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(/sentry_flutter: \^1\.99\.9/)) | ||
).toBeInTheDocument(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters