]> source.dussan.org Git - sonarqube.git/blob
897a9ae03e783b253a125307257b2f4fa2d051ea
[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           :
96         </span>
97         <div
98           className="hotspot-risk-badge spacer-left HIGH"
99         >
100           risk_exposure.HIGH
101         </div>
102       </div>
103       <ul>
104         <li
105           className="spacer-bottom"
106           key="cat2"
107         >
108           <HotspotCategory
109             categoryKey="cat2"
110             hotspots={
111               Array [
112                 Object {
113                   "author": "Developer 1",
114                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
115                   "creationDate": "2013-05-13T17:55:39+0200",
116                   "key": "h1",
117                   "line": 81,
118                   "message": "'3' is a magic number.",
119                   "project": "com.github.kevinsawicki:http-request",
120                   "resolution": undefined,
121                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
122                   "securityCategory": "cat2",
123                   "status": "TO_REVIEW",
124                   "updateDate": "2013-05-13T17:55:39+0200",
125                   "vulnerabilityProbability": "HIGH",
126                 },
127               ]
128             }
129             onHotspotClick={[MockFunction]}
130             onToggleExpand={[Function]}
131             selectedHotspot={
132               Object {
133                 "author": "Developer 1",
134                 "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
135                 "creationDate": "2013-05-13T17:55:39+0200",
136                 "key": "h2",
137                 "line": 81,
138                 "message": "'3' is a magic number.",
139                 "project": "com.github.kevinsawicki:http-request",
140                 "resolution": undefined,
141                 "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
142                 "securityCategory": "command-injection",
143                 "status": "TO_REVIEW",
144                 "updateDate": "2013-05-13T17:55:39+0200",
145                 "vulnerabilityProbability": "HIGH",
146               }
147             }
148             title="cat2"
149           />
150         </li>
151         <li
152           className="spacer-bottom"
153           key="cat1"
154         >
155           <HotspotCategory
156             categoryKey="cat1"
157             hotspots={
158               Array [
159                 Object {
160                   "author": "Developer 1",
161                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
162                   "creationDate": "2013-05-13T17:55:39+0200",
163                   "key": "h2",
164                   "line": 81,
165                   "message": "'3' is a magic number.",
166                   "project": "com.github.kevinsawicki:http-request",
167                   "resolution": undefined,
168                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
169                   "securityCategory": "cat1",
170                   "status": "TO_REVIEW",
171                   "updateDate": "2013-05-13T17:55:39+0200",
172                   "vulnerabilityProbability": "HIGH",
173                 },
174               ]
175             }
176             onHotspotClick={[MockFunction]}
177             onToggleExpand={[Function]}
178             selectedHotspot={
179               Object {
180                 "author": "Developer 1",
181                 "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
182                 "creationDate": "2013-05-13T17:55:39+0200",
183                 "key": "h2",
184                 "line": 81,
185                 "message": "'3' is a magic number.",
186                 "project": "com.github.kevinsawicki:http-request",
187                 "resolution": undefined,
188                 "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
189                 "securityCategory": "command-injection",
190                 "status": "TO_REVIEW",
191                 "updateDate": "2013-05-13T17:55:39+0200",
192                 "vulnerabilityProbability": "HIGH",
193               }
194             }
195             title="cat1"
196           />
197         </li>
198       </ul>
199     </li>
200     <li
201       className="big-spacer-bottom"
202       key="MEDIUM"
203     >
204       <div
205         className="hotspot-risk-header little-spacer-left"
206       >
207         <span>
208           hotspots.risk_exposure
209           :
210         </span>
211         <div
212           className="hotspot-risk-badge spacer-left MEDIUM"
213         >
214           risk_exposure.MEDIUM
215         </div>
216       </div>
217       <ul>
218         <li
219           className="spacer-bottom"
220           key="cat1"
221         >
222           <HotspotCategory
223             categoryKey="cat1"
224             hotspots={
225               Array [
226                 Object {
227                   "author": "Developer 1",
228                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
229                   "creationDate": "2013-05-13T17:55:39+0200",
230                   "key": "h3",
231                   "line": 81,
232                   "message": "'3' is a magic number.",
233                   "project": "com.github.kevinsawicki:http-request",
234                   "resolution": undefined,
235                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
236                   "securityCategory": "cat1",
237                   "status": "TO_REVIEW",
238                   "updateDate": "2013-05-13T17:55:39+0200",
239                   "vulnerabilityProbability": "MEDIUM",
240                 },
241                 Object {
242                   "author": "Developer 1",
243                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
244                   "creationDate": "2013-05-13T17:55:39+0200",
245                   "key": "h4",
246                   "line": 81,
247                   "message": "'3' is a magic number.",
248                   "project": "com.github.kevinsawicki:http-request",
249                   "resolution": undefined,
250                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
251                   "securityCategory": "cat1",
252                   "status": "TO_REVIEW",
253                   "updateDate": "2013-05-13T17:55:39+0200",
254                   "vulnerabilityProbability": "MEDIUM",
255                 },
256               ]
257             }
258             onHotspotClick={[MockFunction]}
259             onToggleExpand={[Function]}
260             selectedHotspot={
261               Object {
262                 "author": "Developer 1",
263                 "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
264                 "creationDate": "2013-05-13T17:55:39+0200",
265                 "key": "h2",
266                 "line": 81,
267                 "message": "'3' is a magic number.",
268                 "project": "com.github.kevinsawicki:http-request",
269                 "resolution": undefined,
270                 "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
271                 "securityCategory": "command-injection",
272                 "status": "TO_REVIEW",
273                 "updateDate": "2013-05-13T17:55:39+0200",
274                 "vulnerabilityProbability": "HIGH",
275               }
276             }
277             title="cat1"
278           />
279         </li>
280         <li
281           className="spacer-bottom"
282           key="cat2"
283         >
284           <HotspotCategory
285             categoryKey="cat2"
286             hotspots={
287               Array [
288                 Object {
289                   "author": "Developer 1",
290                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
291                   "creationDate": "2013-05-13T17:55:39+0200",
292                   "key": "h5",
293                   "line": 81,
294                   "message": "'3' is a magic number.",
295                   "project": "com.github.kevinsawicki:http-request",
296                   "resolution": undefined,
297                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
298                   "securityCategory": "cat2",
299                   "status": "TO_REVIEW",
300                   "updateDate": "2013-05-13T17:55:39+0200",
301                   "vulnerabilityProbability": "MEDIUM",
302                 },
303               ]
304             }
305             onHotspotClick={[MockFunction]}
306             onToggleExpand={[Function]}
307             selectedHotspot={
308               Object {
309                 "author": "Developer 1",
310                 "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
311                 "creationDate": "2013-05-13T17:55:39+0200",
312                 "key": "h2",
313                 "line": 81,
314                 "message": "'3' is a magic number.",
315                 "project": "com.github.kevinsawicki:http-request",
316                 "resolution": undefined,
317                 "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
318                 "securityCategory": "command-injection",
319                 "status": "TO_REVIEW",
320                 "updateDate": "2013-05-13T17:55:39+0200",
321                 "vulnerabilityProbability": "HIGH",
322               }
323             }
324             title="cat2"
325           />
326         </li>
327       </ul>
328     </li>
329   </ul>
330   <ListFooter
331     count={5}
332     loadMore={[MockFunction]}
333     loading={false}
334   />
335 </div>
336 `;
337
338 exports[`should render correctly with hotspots: pagination 1`] = `
339 <div
340   className="huge-spacer-bottom"
341 >
342   <h1
343     className="hotspot-list-header bordered-bottom"
344   >
345     <SecurityHotspotIcon
346       className="spacer-right"
347     />
348     hotspots.list_title.TO_REVIEW.5
349   </h1>
350   <ul
351     className="big-spacer-bottom"
352   >
353     <li
354       className="big-spacer-bottom"
355       key="HIGH"
356     >
357       <div
358         className="hotspot-risk-header little-spacer-left"
359       >
360         <span>
361           hotspots.risk_exposure
362           :
363         </span>
364         <div
365           className="hotspot-risk-badge spacer-left HIGH"
366         >
367           risk_exposure.HIGH
368         </div>
369       </div>
370       <ul>
371         <li
372           className="spacer-bottom"
373           key="cat2"
374         >
375           <HotspotCategory
376             categoryKey="cat2"
377             hotspots={
378               Array [
379                 Object {
380                   "author": "Developer 1",
381                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
382                   "creationDate": "2013-05-13T17:55:39+0200",
383                   "key": "h1",
384                   "line": 81,
385                   "message": "'3' is a magic number.",
386                   "project": "com.github.kevinsawicki:http-request",
387                   "resolution": undefined,
388                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
389                   "securityCategory": "cat2",
390                   "status": "TO_REVIEW",
391                   "updateDate": "2013-05-13T17:55:39+0200",
392                   "vulnerabilityProbability": "HIGH",
393                 },
394               ]
395             }
396             onHotspotClick={[MockFunction]}
397             onToggleExpand={[Function]}
398             selectedHotspot={
399               Object {
400                 "author": "Developer 1",
401                 "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
402                 "creationDate": "2013-05-13T17:55:39+0200",
403                 "key": "h2",
404                 "line": 81,
405                 "message": "'3' is a magic number.",
406                 "project": "com.github.kevinsawicki:http-request",
407                 "resolution": undefined,
408                 "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
409                 "securityCategory": "command-injection",
410                 "status": "TO_REVIEW",
411                 "updateDate": "2013-05-13T17:55:39+0200",
412                 "vulnerabilityProbability": "HIGH",
413               }
414             }
415             title="cat2"
416           />
417         </li>
418         <li
419           className="spacer-bottom"
420           key="cat1"
421         >
422           <HotspotCategory
423             categoryKey="cat1"
424             hotspots={
425               Array [
426                 Object {
427                   "author": "Developer 1",
428                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
429                   "creationDate": "2013-05-13T17:55:39+0200",
430                   "key": "h2",
431                   "line": 81,
432                   "message": "'3' is a magic number.",
433                   "project": "com.github.kevinsawicki:http-request",
434                   "resolution": undefined,
435                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
436                   "securityCategory": "cat1",
437                   "status": "TO_REVIEW",
438                   "updateDate": "2013-05-13T17:55:39+0200",
439                   "vulnerabilityProbability": "HIGH",
440                 },
441               ]
442             }
443             onHotspotClick={[MockFunction]}
444             onToggleExpand={[Function]}
445             selectedHotspot={
446               Object {
447                 "author": "Developer 1",
448                 "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
449                 "creationDate": "2013-05-13T17:55:39+0200",
450                 "key": "h2",
451                 "line": 81,
452                 "message": "'3' is a magic number.",
453                 "project": "com.github.kevinsawicki:http-request",
454                 "resolution": undefined,
455                 "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
456                 "securityCategory": "command-injection",
457                 "status": "TO_REVIEW",
458                 "updateDate": "2013-05-13T17:55:39+0200",
459                 "vulnerabilityProbability": "HIGH",
460               }
461             }
462             title="cat1"
463           />
464         </li>
465       </ul>
466     </li>
467     <li
468       className="big-spacer-bottom"
469       key="MEDIUM"
470     >
471       <div
472         className="hotspot-risk-header little-spacer-left"
473       >
474         <span>
475           hotspots.risk_exposure
476           :
477         </span>
478         <div
479           className="hotspot-risk-badge spacer-left MEDIUM"
480         >
481           risk_exposure.MEDIUM
482         </div>
483       </div>
484       <ul>
485         <li
486           className="spacer-bottom"
487           key="cat1"
488         >
489           <HotspotCategory
490             categoryKey="cat1"
491             hotspots={
492               Array [
493                 Object {
494                   "author": "Developer 1",
495                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
496                   "creationDate": "2013-05-13T17:55:39+0200",
497                   "key": "h3",
498                   "line": 81,
499                   "message": "'3' is a magic number.",
500                   "project": "com.github.kevinsawicki:http-request",
501                   "resolution": undefined,
502                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
503                   "securityCategory": "cat1",
504                   "status": "TO_REVIEW",
505                   "updateDate": "2013-05-13T17:55:39+0200",
506                   "vulnerabilityProbability": "MEDIUM",
507                 },
508                 Object {
509                   "author": "Developer 1",
510                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
511                   "creationDate": "2013-05-13T17:55:39+0200",
512                   "key": "h4",
513                   "line": 81,
514                   "message": "'3' is a magic number.",
515                   "project": "com.github.kevinsawicki:http-request",
516                   "resolution": undefined,
517                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
518                   "securityCategory": "cat1",
519                   "status": "TO_REVIEW",
520                   "updateDate": "2013-05-13T17:55:39+0200",
521                   "vulnerabilityProbability": "MEDIUM",
522                 },
523               ]
524             }
525             onHotspotClick={[MockFunction]}
526             onToggleExpand={[Function]}
527             selectedHotspot={
528               Object {
529                 "author": "Developer 1",
530                 "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
531                 "creationDate": "2013-05-13T17:55:39+0200",
532                 "key": "h2",
533                 "line": 81,
534                 "message": "'3' is a magic number.",
535                 "project": "com.github.kevinsawicki:http-request",
536                 "resolution": undefined,
537                 "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
538                 "securityCategory": "command-injection",
539                 "status": "TO_REVIEW",
540                 "updateDate": "2013-05-13T17:55:39+0200",
541                 "vulnerabilityProbability": "HIGH",
542               }
543             }
544             title="cat1"
545           />
546         </li>
547         <li
548           className="spacer-bottom"
549           key="cat2"
550         >
551           <HotspotCategory
552             categoryKey="cat2"
553             hotspots={
554               Array [
555                 Object {
556                   "author": "Developer 1",
557                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
558                   "creationDate": "2013-05-13T17:55:39+0200",
559                   "key": "h5",
560                   "line": 81,
561                   "message": "'3' is a magic number.",
562                   "project": "com.github.kevinsawicki:http-request",
563                   "resolution": undefined,
564                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
565                   "securityCategory": "cat2",
566                   "status": "TO_REVIEW",
567                   "updateDate": "2013-05-13T17:55:39+0200",
568                   "vulnerabilityProbability": "MEDIUM",
569                 },
570               ]
571             }
572             onHotspotClick={[MockFunction]}
573             onToggleExpand={[Function]}
574             selectedHotspot={
575               Object {
576                 "author": "Developer 1",
577                 "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
578                 "creationDate": "2013-05-13T17:55:39+0200",
579                 "key": "h2",
580                 "line": 81,
581                 "message": "'3' is a magic number.",
582                 "project": "com.github.kevinsawicki:http-request",
583                 "resolution": undefined,
584                 "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
585                 "securityCategory": "command-injection",
586                 "status": "TO_REVIEW",
587                 "updateDate": "2013-05-13T17:55:39+0200",
588                 "vulnerabilityProbability": "HIGH",
589               }
590             }
591             title="cat2"
592           />
593         </li>
594       </ul>
595     </li>
596   </ul>
597   <ListFooter
598     count={5}
599     loadMore={[MockFunction]}
600     loading={false}
601     total={7}
602   />
603 </div>
604 `;