|
| 1 | +import {OrganizationFixture} from 'sentry-fixture/organization'; |
| 2 | +import {ProjectFixture} from 'sentry-fixture/project'; |
1 | 3 | import {ProjectKeysFixture} from 'sentry-fixture/projectKeys'; |
2 | 4 |
|
3 | | -import {initializeOrg} from 'sentry-test/initializeOrg'; |
4 | | -import {render} from 'sentry-test/reactTestingLibrary'; |
| 5 | +import {render, type RouterConfig} from 'sentry-test/reactTestingLibrary'; |
5 | 6 |
|
6 | 7 | import {OnboardingLayout} from 'sentry/components/onboarding/gettingStartedDoc/onboardingLayout'; |
7 | 8 | import type { |
@@ -41,14 +42,16 @@ export function renderWithOnboardingLayout< |
41 | 42 | selectedOptions = {}, |
42 | 43 | } = options; |
43 | 44 |
|
44 | | - const {organization, project, router} = initializeOrg({ |
45 | | - organization: renderOptions.organization, |
46 | | - router: { |
47 | | - location: { |
48 | | - query: selectedOptions, |
49 | | - }, |
| 45 | + const organization = OrganizationFixture(renderOptions.organization); |
| 46 | + const project = ProjectFixture({organization}); |
| 47 | + |
| 48 | + const initialRouterConfig: RouterConfig = { |
| 49 | + location: { |
| 50 | + pathname: `/organizations/${organization.slug}/projects/${project.slug}/getting-started/`, |
| 51 | + query: selectedOptions, |
50 | 52 | }, |
51 | | - }); |
| 53 | + route: `/organizations/:orgId/projects/:projectId/getting-started/`, |
| 54 | + }; |
52 | 55 |
|
53 | 56 | const projectKey = 'test-project-key-id'; |
54 | 57 |
|
@@ -87,8 +90,7 @@ export function renderWithOnboardingLayout< |
87 | 90 | />, |
88 | 91 | { |
89 | 92 | organization, |
90 | | - router, |
91 | | - deprecatedRouterMocks: true, |
| 93 | + initialRouterConfig, |
92 | 94 | } |
93 | 95 | ); |
94 | 96 | } |
0 commit comments