]> source.dussan.org Git - sonarqube.git/blob
253103a022eb624c343b6ed9587372f5bb231cb0
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly 1`] = `
4 <div
5   className="padded it__hs-review-history"
6 >
7   <label
8     htmlFor="security-hotspot-comment"
9   >
10     hotspots.comment.field
11   </label>
12   <textarea
13     className="form-field fixed-width width-100 spacer-bottom"
14     id="security-hotspot-comment"
15     onChange={[Function]}
16     rows={2}
17     value=""
18   />
19   <div
20     className="display-flex-space-between display-flex-center "
21   >
22     <FormattingTips
23       className="huge-spacer-bottom"
24     />
25     <div>
26       <Button
27         className="huge-spacer-bottom"
28         id="hotspot-comment-box-submit"
29         onClick={[Function]}
30       >
31         hotspots.comment.submit
32       </Button>
33     </div>
34   </div>
35   <h2
36     className="spacer-top big-spacer-bottom"
37   >
38     hotspot.section.activity
39   </h2>
40   <HotspotReviewHistory
41     hotspot={
42       {
43         "assignee": "assignee",
44         "assigneeUser": {
45           "active": true,
46           "local": true,
47           "login": "assignee",
48           "name": "John Doe",
49         },
50         "author": "author",
51         "authorUser": {
52           "active": true,
53           "local": true,
54           "login": "author",
55           "name": "John Doe",
56         },
57         "canChangeStatus": true,
58         "changelog": [],
59         "comment": [],
60         "component": {
61           "key": "hotspot-component",
62           "longName": "Hotspot component long name",
63           "name": "Hotspot Component",
64           "path": "path/to/component",
65           "qualifier": "FIL",
66         },
67         "creationDate": "2013-05-13T17:55:41+0200",
68         "flows": [
69           {
70             "locations": [
71               {
72                 "component": "main.js",
73                 "textRange": {
74                   "endLine": 2,
75                   "endOffset": 2,
76                   "startLine": 1,
77                   "startOffset": 1,
78                 },
79               },
80             ],
81           },
82         ],
83         "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
84         "line": 142,
85         "message": "'3' is a magic number.",
86         "project": {
87           "key": "hotspot-component",
88           "longName": "Hotspot component long name",
89           "name": "Hotspot Component",
90           "path": "path/to/component",
91           "qualifier": "TRK",
92         },
93         "resolution": "FIXED",
94         "rule": {
95           "key": "squid:S2077",
96           "name": "That rule",
97           "securityCategory": "sql-injection",
98           "vulnerabilityProbability": "HIGH",
99         },
100         "status": "REVIEWED",
101         "textRange": {
102           "endLine": 142,
103           "endOffset": 83,
104           "startLine": 142,
105           "startOffset": 26,
106         },
107         "updateDate": "2013-05-13T17:55:42+0200",
108         "users": [
109           {
110             "active": true,
111             "local": true,
112             "login": "assignee",
113             "name": "John Doe",
114           },
115           {
116             "active": true,
117             "local": true,
118             "login": "author",
119             "name": "John Doe",
120           },
121         ],
122       }
123     }
124     onDeleteComment={[Function]}
125     onEditComment={[Function]}
126     onShowFullHistory={[Function]}
127     showFullHistory={false}
128   />
129 </div>
130 `;
131
132 exports[`should render correctly without user 1`] = `
133 <div
134   className="padded it__hs-review-history"
135 >
136   <h2
137     className="spacer-top big-spacer-bottom"
138   >
139     hotspot.section.activity
140   </h2>
141   <HotspotReviewHistory
142     hotspot={
143       {
144         "assignee": "assignee",
145         "assigneeUser": {
146           "active": true,
147           "local": true,
148           "login": "assignee",
149           "name": "John Doe",
150         },
151         "author": "author",
152         "authorUser": {
153           "active": true,
154           "local": true,
155           "login": "author",
156           "name": "John Doe",
157         },
158         "canChangeStatus": true,
159         "changelog": [],
160         "comment": [],
161         "component": {
162           "key": "hotspot-component",
163           "longName": "Hotspot component long name",
164           "name": "Hotspot Component",
165           "path": "path/to/component",
166           "qualifier": "FIL",
167         },
168         "creationDate": "2013-05-13T17:55:41+0200",
169         "flows": [
170           {
171             "locations": [
172               {
173                 "component": "main.js",
174                 "textRange": {
175                   "endLine": 2,
176                   "endOffset": 2,
177                   "startLine": 1,
178                   "startOffset": 1,
179                 },
180               },
181             ],
182           },
183         ],
184         "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
185         "line": 142,
186         "message": "'3' is a magic number.",
187         "project": {
188           "key": "hotspot-component",
189           "longName": "Hotspot component long name",
190           "name": "Hotspot Component",
191           "path": "path/to/component",
192           "qualifier": "TRK",
193         },
194         "resolution": "FIXED",
195         "rule": {
196           "key": "squid:S2077",
197           "name": "That rule",
198           "securityCategory": "sql-injection",
199           "vulnerabilityProbability": "HIGH",
200         },
201         "status": "REVIEWED",
202         "textRange": {
203           "endLine": 142,
204           "endOffset": 83,
205           "startLine": 142,
206           "startOffset": 26,
207         },
208         "updateDate": "2013-05-13T17:55:42+0200",
209         "users": [
210           {
211             "active": true,
212             "local": true,
213             "login": "assignee",
214             "name": "John Doe",
215           },
216           {
217             "active": true,
218             "local": true,
219             "login": "author",
220             "name": "John Doe",
221           },
222         ],
223       }
224     }
225     onDeleteComment={[Function]}
226     onEditComment={[Function]}
227     onShowFullHistory={[Function]}
228     showFullHistory={false}
229   />
230 </div>
231 `;