1
- export function ActivityFeed ( params = { } ) {
1
+ import {
2
+ type Activity ,
3
+ EventOrGroupType ,
4
+ GroupActivityType ,
5
+ IssueCategory ,
6
+ IssueType ,
7
+ } from 'sentry/types' ;
8
+
9
+ export function ActivityFeed ( params : Partial < Activity > = { } ) : Activity {
2
10
return {
3
11
data : { text : 'Very interesting comment' } ,
4
12
dateCreated : '2019-04-29T21:43:32.280Z' ,
5
- project : {
6
- status : 'active' ,
13
+ project : TestStubs . Project ( {
7
14
features : [
8
15
'releases' ,
9
16
'sample-events' ,
@@ -13,21 +20,18 @@ export function ActivityFeed(params = {}) {
13
20
'similarity-view' ,
14
21
'data-forwarding' ,
15
22
] ,
16
- color : '#bf873f' ,
17
23
isInternal : true ,
18
- isPublic : false ,
19
24
dateCreated : '2019-03-09T06:52:19.832Z' ,
20
25
id : '1' ,
21
26
slug : 'internal' ,
22
27
name : 'Internal' ,
23
28
hasAccess : true ,
24
29
isBookmarked : false ,
25
- platform : null ,
30
+ platform : undefined ,
26
31
firstEvent : '2019-03-09T06:56:15Z' ,
27
- avatar : { avatarUuid : null , avatarType : 'letter_avatar' } ,
28
32
isMember : true ,
29
- } ,
30
- user : {
33
+ } ) ,
34
+ user : TestStubs . User ( {
31
35
32
36
lastLogin : '2019-04-23T00:10:19.787Z' ,
33
37
isSuperuser : true ,
@@ -52,8 +56,8 @@ export function ActivityFeed(params = {}) {
52
56
avatar : { avatarUuid : null , avatarType : 'letter_avatar' } ,
53
57
hasPasswordAuth : true ,
54
58
55
- } ,
56
- type : 'note' ,
59
+ } ) ,
60
+ type : GroupActivityType . NOTE ,
57
61
issue : {
58
62
platform : 'javascript' ,
59
63
lastSeen : '2019-04-26T16:34:12.288Z' ,
@@ -62,25 +66,48 @@ export function ActivityFeed(params = {}) {
62
66
culprit : '/organizations/:orgId/issues/:groupId/feedback/' ,
63
67
title : 'Error: user efedback' ,
64
68
id : '524' ,
65
- assignedTo : null ,
66
- logger : null ,
67
- type : 'error' ,
69
+ assignedTo : {
70
+ id : '1' ,
71
+ name : 'actor' ,
72
+ type : 'user' ,
73
+ } ,
74
+ issueCategory : IssueCategory . ERROR ,
75
+ issueType : IssueType . ERROR ,
76
+ participants : [ ] ,
77
+ latestEvent : TestStubs . Event ( ) ,
78
+ isUnhandled : true ,
79
+ pluginActions : [ ] ,
80
+ pluginContexts : [ ] ,
81
+ seenBy : [ ] ,
82
+ filtered : null ,
83
+ pluginIssues : [ ] ,
84
+ // there is a nasty type issue here where "reprocessing" cannot be assigned to
85
+ // resolution status | "reprocessing" and "reprocessing" cannot be assigned to resolution
86
+ // status (fails even if I as const it).
87
+ // @ts -expect-error
88
+ status : 'reprocessing' ,
89
+ activity : [ ] ,
90
+ logger : 'critical' ,
91
+ type : EventOrGroupType . ERROR ,
68
92
annotations : [ ] ,
69
- metadata : { type : 'Error' , value : 'user efedback' , filename : '<anonymous>' } ,
70
- status : 'unresolved' ,
93
+ metadata : { type : 'Error' , value : 'user feedback' , filename : '<anonymous>' } ,
71
94
subscriptionDetails : { reason : 'commented' } ,
72
95
isPublic : false ,
73
96
hasSeen : true ,
74
97
shortId : 'INTERNAL-DW' ,
75
- shareId : null ,
98
+ shareId : '99' ,
76
99
firstSeen : '2019-04-26T16:34:12.288Z' ,
77
100
count : '1' ,
78
101
permalink : 'http://localhost:8000/organizations/sentry/issues/524/?project=1' ,
79
102
level : 'error' ,
80
103
isSubscribed : true ,
81
104
isBookmarked : false ,
82
- project : { platform : null , slug : 'internal' , id : '1' , name : 'Internal' } ,
83
- statusDetails : { } ,
105
+ project : TestStubs . Project ( {
106
+ platform : undefined ,
107
+ slug : 'internal' ,
108
+ id : '1' ,
109
+ name : 'Internal' ,
110
+ } ) ,
84
111
} ,
85
112
id : '48' ,
86
113
...params ,
0 commit comments