/
group.ts
69 lines (66 loc) · 1.68 KB
/
group.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import {ProjectFixture} from 'sentry-fixture/project';
import {
EventOrGroupType,
type Group,
GroupStatus,
GroupUnresolved,
IssueCategory,
IssueType,
PriorityLevel,
} from 'sentry/types';
export function GroupFixture(params: Partial<Group> = {}): Group {
const unresolvedGroup: GroupUnresolved = {
activity: [],
annotations: [],
assignedTo: null,
count: '327482',
culprit: 'fetchData(app/components/group/suggestedOwners/suggestedOwners)',
firstSeen: '2019-04-05T19:44:05.963Z',
filtered: null,
hasSeen: false,
id: '1',
isBookmarked: false,
isPublic: false,
isSubscribed: false,
isUnhandled: false,
issueCategory: IssueCategory.ERROR,
issueType: IssueType.ERROR,
lastSeen: '2019-04-11T01:08:59Z',
level: 'warning',
logger: null,
metadata: {function: 'fetchData', type: 'RequestError'},
numComments: 0,
participants: [],
permalink: 'https://foo.io/organizations/foo/issues/1234/',
platform: 'javascript',
pluginActions: [],
pluginContexts: [],
pluginIssues: [],
priority: PriorityLevel.MEDIUM,
priorityLockedAt: null,
project: ProjectFixture({
platform: 'javascript',
}),
seenBy: [],
shareId: '',
shortId: 'JAVASCRIPT-6QS',
stats: {
'24h': [
[1517281200, 2],
[1517310000, 1],
],
'30d': [
[1514764800, 1],
[1515024000, 122],
],
},
status: GroupStatus.UNRESOLVED,
statusDetails: {},
subscriptionDetails: null,
title: 'RequestError: GET /issues/ 404',
type: EventOrGroupType.ERROR,
userCount: 35097,
userReportCount: 0,
};
return {...unresolvedGroup, ...params} as Group;
}