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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
export const mockAbuseReport = {
user: {
username: 'spamuser417',
name: 'Sp4m User',
createdAt: '2023-03-29T09:30:23.885Z',
email: 'sp4m@spam.com',
lastActivityOn: '2023-04-02',
avatarUrl: 'https://www.gravatar.com/avatar/a2579caffc69ea5d7606f9dd9d8504ba?s=80&d=identicon',
path: '/spamuser417',
adminPath: '/admin/users/spamuser417',
plan: 'Free',
verificationState: { email: true, phone: false, creditCard: true },
creditCard: {
name: 'S. User',
similarRecordsCount: 2,
cardMatchesLink: '/admin/users/spamuser417/card_match',
},
pastClosedReports: [
{
category: 'offensive',
createdAt: '2023-02-28T10:09:54.982Z',
reportPath: '/admin/abuse_reports/29',
},
{
category: 'crypto',
createdAt: '2023-03-31T11:57:11.849Z',
reportPath: '/admin/abuse_reports/31',
},
],
mostUsedIp: null,
lastSignInIp: '::1',
snippetsCount: 0,
groupsCount: 0,
notesCount: 6,
similarOpenReports: [
{
status: 'open',
message: 'This is obvious spam',
reportedAt: '2023-03-29T09:39:50.502Z',
category: 'spam',
type: 'issue',
content: '',
screenshot: null,
reporter: {
username: 'reporter 2',
name: 'Another Reporter',
avatarUrl: 'https://www.gravatar.com/avatar/anotherreporter',
path: '/reporter-2',
},
updatePath: '/admin/abuse_reports/28',
},
],
},
report: {
globalId: 'gid://gitlab/AbuseReport/1',
status: 'open',
message: 'This is obvious spam',
reportedAt: '2023-03-29T09:39:50.502Z',
category: 'spam',
type: 'comment',
content:
'<p data-sourcepos="1:1-1:772" dir="auto">Farmers Toy Sale ON NOW | SHOP CATALOGUE ... 50% off Kids\' Underwear by Hanes ... BUY 1 GET 1 HALF PRICE on Women\'s Clothing by Whistle, Ella Clothing Farmers Toy Sale ON <a href="http://www.farmers.com" rel="nofollow noreferrer noopener" target="_blank">www.farmers.com</a> | SHOP CATALOGUE ... 50% off Kids\' Underwear by Hanes ... BUY 1 GET 1 HALF PRICE on Women\'s Clothing by Whistle, Ella Clothing Farmers Toy Sale ON NOW | SHOP CATALOGUE ... 50% off Kids\' Underwear by Farmers Toy Sale ON NOW | SHOP CATALOGUE ... 50% off Kids\' Underwear by Hanes ... BUY 1 GET 1 HALF PRICE on Women\'s Clothing by Whistle, Ella Clothing Farmers Toy Sale ON <a href="http://www.farmers.com" rel="nofollow noreferrer noopener" target="_blank">www.farmers.com</a> | SHOP CATALOGUE ... 50% off Kids\' Underwear by Hanes ... BUY 1 GET 1 HALF PRICE on Women\'s Clothing by Whistle, Ella Clothing Farmers Toy Sale ON NOW | SHOP CATALOGUE ... 50% off Kids\' Underwear by.</p>',
url: 'http://localhost:3000/spamuser417/project/-/merge_requests/1#note_1375',
screenshot:
'/uploads/-/system/abuse_report/screenshot/27/Screenshot_2023-03-30_at_16.56.37.png',
updatePath: '/admin/abuse_reports/27',
moderateUserPath: '/admin/abuse_reports/27/moderate_user',
reporter: {
username: 'reporter',
name: 'R Porter',
avatarUrl:
'https://www.gravatar.com/avatar/a2579caffc69ea5d7606f9dd9d8504ba?s=80&d=identicon',
path: '/reporter',
},
},
};
export const mockLabel1 = {
id: 'gid://gitlab/Admin::AbuseReportLabel/1',
title: 'Uno',
color: '#F0AD4E',
textColor: '#FFFFFF',
description: null,
};
export const mockLabel2 = {
id: 'gid://gitlab/Admin::AbuseReportLabel/2',
title: 'Dos',
color: '#F0AD4E',
textColor: '#FFFFFF',
description: null,
};
export const mockLabelsQueryResponse = {
data: {
labels: {
nodes: [mockLabel1, mockLabel2],
__typename: 'LabelConnection',
},
},
};
export const mockReportQueryResponse = {
data: {
abuseReport: {
labels: {
nodes: [mockLabel1],
__typename: 'LabelConnection',
},
__typename: 'AbuseReport',
},
},
};
export const mockCreateLabelResponse = {
data: {
labelCreate: {
label: {
id: 'gid://gitlab/Admin::AbuseReportLabel/1',
color: '#ed9121',
description: null,
title: 'abuse report label',
textColor: '#FFFFFF',
__typename: 'Label',
},
errors: [],
__typename: 'AbuseReportLabelCreatePayload',
},
},
};
|