]> source.dussan.org Git - sonarqube.git/blob
872890c776479692a18d228dbe9e3ce063ac7963
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly 1`] = `
4 <div
5   className="huge-spacer-bottom"
6 >
7   <h1
8     className="hotspot-list-header bordered-bottom"
9   >
10     <SecurityHotspotIcon
11       className="spacer-right"
12     />
13     hotspots.list_title.TO_REVIEW.0
14   </h1>
15   <ul
16     className="big-spacer-bottom"
17   />
18   <ListFooter
19     count={0}
20     loadMore={[MockFunction]}
21     loading={false}
22   />
23 </div>
24 `;
25
26 exports[`should render correctly 2`] = `
27 <div
28   className="huge-spacer-bottom"
29 >
30   <h1
31     className="hotspot-list-header bordered-bottom"
32   >
33     <SecurityHotspotIcon
34       className="spacer-right"
35     />
36     hotspots.list_title.TO_REVIEW.0
37   </h1>
38   <ul
39     className="big-spacer-bottom"
40   />
41   <ListFooter
42     count={0}
43     loading={true}
44   />
45 </div>
46 `;
47
48 exports[`should render correctly when the list of hotspot is static 1`] = `
49 <div
50   className="huge-spacer-bottom"
51 >
52   <h1
53     className="hotspot-list-header bordered-bottom"
54   >
55     <SecurityHotspotIcon
56       className="spacer-right"
57     />
58     hotspots.list_title.0
59   </h1>
60   <ul
61     className="big-spacer-bottom"
62   />
63   <ListFooter
64     count={0}
65     loadMore={[MockFunction]}
66     loading={false}
67   />
68 </div>
69 `;
70
71 exports[`should render correctly with hotspots: no pagination 1`] = `
72 <div
73   className="huge-spacer-bottom"
74 >
75   <h1
76     className="hotspot-list-header bordered-bottom"
77   >
78     <SecurityHotspotIcon
79       className="spacer-right"
80     />
81     hotspots.list_title.TO_REVIEW.5
82   </h1>
83   <ul
84     className="big-spacer-bottom"
85   >
86     <li
87       className="big-spacer-bottom"
88       key="HIGH"
89     >
90       <div
91         className="hotspot-risk-header little-spacer-left"
92       >
93         <span>
94           hotspots.risk_exposure
95         </span>
96         <div
97           className="hotspot-risk-badge spacer-left HIGH"
98         >
99           risk_exposure.HIGH
100         </div>
101       </div>
102       <ul>
103         <li
104           className="spacer-bottom"
105           key="cat1"
106         >
107           <HotspotCategory
108             category={
109               Object {
110                 "key": "cat1",
111                 "title": "cat1",
112               }
113             }
114             hotspots={
115               Array [
116                 Object {
117                   "author": "Developer 1",
118                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
119                   "creationDate": "2013-05-13T17:55:39+0200",
120                   "key": "h2",
121                   "line": 81,
122                   "message": "'3' is a magic number.",
123                   "project": "com.github.kevinsawicki:http-request",
124                   "resolution": undefined,
125                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
126                   "securityCategory": "cat1",
127                   "status": "TO_REVIEW",
128                   "updateDate": "2013-05-13T17:55:39+0200",
129                   "vulnerabilityProbability": "HIGH",
130                 },
131               ]
132             }
133             onHotspotClick={[MockFunction]}
134             selectedHotspotKey="h2"
135           />
136         </li>
137         <li
138           className="spacer-bottom"
139           key="cat2"
140         >
141           <HotspotCategory
142             category={
143               Object {
144                 "key": "cat2",
145                 "title": "cat2",
146               }
147             }
148             hotspots={
149               Array [
150                 Object {
151                   "author": "Developer 1",
152                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
153                   "creationDate": "2013-05-13T17:55:39+0200",
154                   "key": "h1",
155                   "line": 81,
156                   "message": "'3' is a magic number.",
157                   "project": "com.github.kevinsawicki:http-request",
158                   "resolution": undefined,
159                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
160                   "securityCategory": "cat2",
161                   "status": "TO_REVIEW",
162                   "updateDate": "2013-05-13T17:55:39+0200",
163                   "vulnerabilityProbability": "HIGH",
164                 },
165               ]
166             }
167             onHotspotClick={[MockFunction]}
168             selectedHotspotKey="h2"
169           />
170         </li>
171       </ul>
172     </li>
173     <li
174       className="big-spacer-bottom"
175       key="MEDIUM"
176     >
177       <div
178         className="hotspot-risk-header little-spacer-left"
179       >
180         <span>
181           hotspots.risk_exposure
182         </span>
183         <div
184           className="hotspot-risk-badge spacer-left MEDIUM"
185         >
186           risk_exposure.MEDIUM
187         </div>
188       </div>
189       <ul>
190         <li
191           className="spacer-bottom"
192           key="cat1"
193         >
194           <HotspotCategory
195             category={
196               Object {
197                 "key": "cat1",
198                 "title": "cat1",
199               }
200             }
201             hotspots={
202               Array [
203                 Object {
204                   "author": "Developer 1",
205                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
206                   "creationDate": "2013-05-13T17:55:39+0200",
207                   "key": "h3",
208                   "line": 81,
209                   "message": "'3' is a magic number.",
210                   "project": "com.github.kevinsawicki:http-request",
211                   "resolution": undefined,
212                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
213                   "securityCategory": "cat1",
214                   "status": "TO_REVIEW",
215                   "updateDate": "2013-05-13T17:55:39+0200",
216                   "vulnerabilityProbability": "MEDIUM",
217                 },
218                 Object {
219                   "author": "Developer 1",
220                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
221                   "creationDate": "2013-05-13T17:55:39+0200",
222                   "key": "h4",
223                   "line": 81,
224                   "message": "'3' is a magic number.",
225                   "project": "com.github.kevinsawicki:http-request",
226                   "resolution": undefined,
227                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
228                   "securityCategory": "cat1",
229                   "status": "TO_REVIEW",
230                   "updateDate": "2013-05-13T17:55:39+0200",
231                   "vulnerabilityProbability": "MEDIUM",
232                 },
233               ]
234             }
235             onHotspotClick={[MockFunction]}
236             selectedHotspotKey="h2"
237           />
238         </li>
239         <li
240           className="spacer-bottom"
241           key="cat2"
242         >
243           <HotspotCategory
244             category={
245               Object {
246                 "key": "cat2",
247                 "title": "cat2",
248               }
249             }
250             hotspots={
251               Array [
252                 Object {
253                   "author": "Developer 1",
254                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
255                   "creationDate": "2013-05-13T17:55:39+0200",
256                   "key": "h5",
257                   "line": 81,
258                   "message": "'3' is a magic number.",
259                   "project": "com.github.kevinsawicki:http-request",
260                   "resolution": undefined,
261                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
262                   "securityCategory": "cat2",
263                   "status": "TO_REVIEW",
264                   "updateDate": "2013-05-13T17:55:39+0200",
265                   "vulnerabilityProbability": "MEDIUM",
266                 },
267               ]
268             }
269             onHotspotClick={[MockFunction]}
270             selectedHotspotKey="h2"
271           />
272         </li>
273       </ul>
274     </li>
275   </ul>
276   <ListFooter
277     count={5}
278     loadMore={[MockFunction]}
279     loading={false}
280   />
281 </div>
282 `;
283
284 exports[`should render correctly with hotspots: pagination 1`] = `
285 <div
286   className="huge-spacer-bottom"
287 >
288   <h1
289     className="hotspot-list-header bordered-bottom"
290   >
291     <SecurityHotspotIcon
292       className="spacer-right"
293     />
294     hotspots.list_title.TO_REVIEW.5
295   </h1>
296   <ul
297     className="big-spacer-bottom"
298   >
299     <li
300       className="big-spacer-bottom"
301       key="HIGH"
302     >
303       <div
304         className="hotspot-risk-header little-spacer-left"
305       >
306         <span>
307           hotspots.risk_exposure
308         </span>
309         <div
310           className="hotspot-risk-badge spacer-left HIGH"
311         >
312           risk_exposure.HIGH
313         </div>
314       </div>
315       <ul>
316         <li
317           className="spacer-bottom"
318           key="cat1"
319         >
320           <HotspotCategory
321             category={
322               Object {
323                 "key": "cat1",
324                 "title": "cat1",
325               }
326             }
327             hotspots={
328               Array [
329                 Object {
330                   "author": "Developer 1",
331                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
332                   "creationDate": "2013-05-13T17:55:39+0200",
333                   "key": "h2",
334                   "line": 81,
335                   "message": "'3' is a magic number.",
336                   "project": "com.github.kevinsawicki:http-request",
337                   "resolution": undefined,
338                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
339                   "securityCategory": "cat1",
340                   "status": "TO_REVIEW",
341                   "updateDate": "2013-05-13T17:55:39+0200",
342                   "vulnerabilityProbability": "HIGH",
343                 },
344               ]
345             }
346             onHotspotClick={[MockFunction]}
347             selectedHotspotKey="h2"
348           />
349         </li>
350         <li
351           className="spacer-bottom"
352           key="cat2"
353         >
354           <HotspotCategory
355             category={
356               Object {
357                 "key": "cat2",
358                 "title": "cat2",
359               }
360             }
361             hotspots={
362               Array [
363                 Object {
364                   "author": "Developer 1",
365                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
366                   "creationDate": "2013-05-13T17:55:39+0200",
367                   "key": "h1",
368                   "line": 81,
369                   "message": "'3' is a magic number.",
370                   "project": "com.github.kevinsawicki:http-request",
371                   "resolution": undefined,
372                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
373                   "securityCategory": "cat2",
374                   "status": "TO_REVIEW",
375                   "updateDate": "2013-05-13T17:55:39+0200",
376                   "vulnerabilityProbability": "HIGH",
377                 },
378               ]
379             }
380             onHotspotClick={[MockFunction]}
381             selectedHotspotKey="h2"
382           />
383         </li>
384       </ul>
385     </li>
386     <li
387       className="big-spacer-bottom"
388       key="MEDIUM"
389     >
390       <div
391         className="hotspot-risk-header little-spacer-left"
392       >
393         <span>
394           hotspots.risk_exposure
395         </span>
396         <div
397           className="hotspot-risk-badge spacer-left MEDIUM"
398         >
399           risk_exposure.MEDIUM
400         </div>
401       </div>
402       <ul>
403         <li
404           className="spacer-bottom"
405           key="cat1"
406         >
407           <HotspotCategory
408             category={
409               Object {
410                 "key": "cat1",
411                 "title": "cat1",
412               }
413             }
414             hotspots={
415               Array [
416                 Object {
417                   "author": "Developer 1",
418                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
419                   "creationDate": "2013-05-13T17:55:39+0200",
420                   "key": "h3",
421                   "line": 81,
422                   "message": "'3' is a magic number.",
423                   "project": "com.github.kevinsawicki:http-request",
424                   "resolution": undefined,
425                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
426                   "securityCategory": "cat1",
427                   "status": "TO_REVIEW",
428                   "updateDate": "2013-05-13T17:55:39+0200",
429                   "vulnerabilityProbability": "MEDIUM",
430                 },
431                 Object {
432                   "author": "Developer 1",
433                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
434                   "creationDate": "2013-05-13T17:55:39+0200",
435                   "key": "h4",
436                   "line": 81,
437                   "message": "'3' is a magic number.",
438                   "project": "com.github.kevinsawicki:http-request",
439                   "resolution": undefined,
440                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
441                   "securityCategory": "cat1",
442                   "status": "TO_REVIEW",
443                   "updateDate": "2013-05-13T17:55:39+0200",
444                   "vulnerabilityProbability": "MEDIUM",
445                 },
446               ]
447             }
448             onHotspotClick={[MockFunction]}
449             selectedHotspotKey="h2"
450           />
451         </li>
452         <li
453           className="spacer-bottom"
454           key="cat2"
455         >
456           <HotspotCategory
457             category={
458               Object {
459                 "key": "cat2",
460                 "title": "cat2",
461               }
462             }
463             hotspots={
464               Array [
465                 Object {
466                   "author": "Developer 1",
467                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
468                   "creationDate": "2013-05-13T17:55:39+0200",
469                   "key": "h5",
470                   "line": 81,
471                   "message": "'3' is a magic number.",
472                   "project": "com.github.kevinsawicki:http-request",
473                   "resolution": undefined,
474                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
475                   "securityCategory": "cat2",
476                   "status": "TO_REVIEW",
477                   "updateDate": "2013-05-13T17:55:39+0200",
478                   "vulnerabilityProbability": "MEDIUM",
479                 },
480               ]
481             }
482             onHotspotClick={[MockFunction]}
483             selectedHotspotKey="h2"
484           />
485         </li>
486       </ul>
487     </li>
488   </ul>
489   <ListFooter
490     count={5}
491     loadMore={[MockFunction]}
492     loading={false}
493     total={7}
494   />
495 </div>
496 `;