Skip to content

Commit 521191c

Browse files
committed
mock
1 parent 8316bcc commit 521191c

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

static/app/gettingStartedDocs/unity/metrics.spec.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import {ProjectFixture} from 'sentry-fixture/project';
2+
13
import {renderWithOnboardingLayout} from 'sentry-test/onboarding/renderWithOnboardingLayout';
24
import {screen} from 'sentry-test/reactTestingLibrary';
35
import {textWithMarkupMatcher} from 'sentry-test/utils';
@@ -6,8 +8,17 @@ import {ProductSolution} from 'sentry/components/onboarding/gettingStartedDoc/ty
68

79
import docs from '.';
810

11+
function renderMockRequests() {
12+
MockApiClient.addMockResponse({
13+
url: '/projects/org-slug/project-slug/',
14+
body: [ProjectFixture()],
15+
});
16+
}
17+
918
describe('metrics', () => {
1019
it('unity metrics onboarding docs', () => {
20+
renderMockRequests();
21+
1122
renderWithOnboardingLayout(docs, {
1223
selectedProducts: [ProductSolution.METRICS],
1324
});
@@ -20,6 +31,8 @@ describe('metrics', () => {
2031
});
2132

2233
it('does not render metrics configuration when metrics is not enabled', () => {
34+
renderMockRequests();
35+
2336
renderWithOnboardingLayout(docs, {
2437
selectedProducts: [],
2538
});

0 commit comments

Comments
 (0)