MCPcopy
hub / github.com/getsentry/sentry / renderMockRequests

Function renderMockRequests

static/app/components/updatedEmptyState.spec.tsx:10–33  ·  view source on GitHub ↗
({firstIssue}: {firstIssue?: string} = {})

Source from the content-addressed store, hash-verified

8import UpdatedEmptyState from 'sentry/components/updatedEmptyState';
9
10function renderMockRequests({firstIssue}: {firstIssue?: string} = {}) {
11 MockApiClient.addMockResponse({
12 url: '/projects/org-slug/project-slug/keys/',
13 method: 'GET',
14 body: [ProjectKeysFixture()[0]],
15 });
16
17 MockApiClient.addMockResponse({
18 url: '/projects/org-slug/project-slug/issues/',
19 method: 'GET',
20 body: firstIssue ? [GroupFixture({id: '1', firstSeen: firstIssue})] : [],
21 });
22
23 MockApiClient.addMockResponse({
24 url: '/projects/org-slug/project-slug/',
25 method: 'GET',
26 body: ProjectFixture({platform: 'python-django', firstEvent: firstIssue ?? null}),
27 });
28
29 MockApiClient.addMockResponse({
30 url: '/organizations/org-slug/sdks/',
31 method: 'GET',
32 });
33}
34
35describe('UpdatedEmptyState', () => {
36 it('Empty state without first error event', async () => {

Callers 1

Calls 4

ProjectKeysFixtureFunction · 0.90
GroupFixtureFunction · 0.90
ProjectFixtureFunction · 0.90
addMockResponseMethod · 0.80

Tested by

no test coverage detected