]> source.dussan.org Git - sonarqube.git/blob
91edea01d5715e84f73f760a6ee762bb729b560a
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly when the list of hotspot is static 1`] = `
4 <div
5   className="filter-bar-outer"
6 >
7   <div
8     className="filter-bar"
9   >
10     <div
11       className="filter-bar-inner display-flex-center"
12     >
13       <ForwardRef(Link)
14         to={
15           {
16             "pathname": "/security_hotspots",
17             "search": "?id=my-project",
18           }
19         }
20       >
21         hotspot.filters.show_all
22       </ForwardRef(Link)>
23     </div>
24   </div>
25 </div>
26 `;
27
28 exports[`should render correctly: anonymous 1`] = `
29 <div
30   className="filter-bar-outer"
31 >
32   <div
33     className="filter-bar"
34   >
35     <div
36       className="filter-bar-inner display-flex-center"
37     >
38       <div
39         className="display-flex-space-between width-100"
40       >
41         <div
42           className="display-flex-center"
43         >
44           <h3
45             className="huge-spacer-right"
46           >
47             hotspot.filters.title
48           </h3>
49           <span
50             className="spacer-right"
51           >
52              
53             status
54              
55           </span>
56           <Select
57             aria-label="hotspot.filters.status"
58             className="input-medium big-spacer-right"
59             isSearchable={false}
60             onChange={[Function]}
61             options={
62               [
63                 {
64                   "label": "hotspot.filters.status.to_review",
65                   "value": "TO_REVIEW",
66                 },
67                 {
68                   "label": "hotspot.filters.status.acknowledged",
69                   "value": "ACKNOWLEDGED",
70                 },
71                 {
72                   "label": "hotspot.filters.status.fixed",
73                   "value": "FIXED",
74                 },
75                 {
76                   "label": "hotspot.filters.status.safe",
77                   "value": "SAFE",
78                 },
79               ]
80             }
81             value={
82               {
83                 "label": "hotspot.filters.status.to_review",
84                 "value": "TO_REVIEW",
85               }
86             }
87           />
88           <Select
89             aria-label="hotspot.filters.period"
90             className="input-medium big-spacer-right"
91             isSearchable={false}
92             onChange={[Function]}
93             options={
94               [
95                 {
96                   "label": "hotspot.filters.period.since_leak_period",
97                   "value": true,
98                 },
99                 {
100                   "label": "hotspot.filters.period.overall",
101                   "value": false,
102                 },
103               ]
104             }
105             value={
106               {
107                 "label": "hotspot.filters.period.overall",
108                 "value": false,
109               }
110             }
111           />
112         </div>
113         <div
114           className="display-flex-center"
115         >
116           <span
117             className="little-spacer-right"
118           >
119             metric.security_hotspots_reviewed.name
120           </span>
121           <HelpTooltip
122             className="big-spacer-right"
123             overlay="hotspots.reviewed.tooltip"
124           />
125           <DeferredSpinner
126             loading={false}
127           >
128             <Measure
129               className="spacer-left huge it__hs-review-percentage"
130               metricKey="security_hotspots_reviewed"
131               metricType="PERCENT"
132             />
133           </DeferredSpinner>
134         </div>
135       </div>
136     </div>
137   </div>
138 </div>
139 `;
140
141 exports[`should render correctly: logged-in 1`] = `
142 <div
143   className="filter-bar-outer"
144 >
145   <div
146     className="filter-bar"
147   >
148     <div
149       className="filter-bar-inner display-flex-center"
150     >
151       <div
152         className="display-flex-space-between width-100"
153       >
154         <div
155           className="display-flex-center"
156         >
157           <h3
158             className="huge-spacer-right"
159           >
160             hotspot.filters.title
161           </h3>
162           <span
163             className="huge-spacer-right"
164           >
165             <ButtonToggle
166               onCheck={[Function]}
167               options={
168                 [
169                   {
170                     "label": "hotspot.filters.assignee.assigned_to_me",
171                     "value": "me",
172                   },
173                   {
174                     "label": "hotspot.filters.assignee.all",
175                     "value": "all",
176                   },
177                 ]
178               }
179               value="all"
180             />
181           </span>
182           <span
183             className="spacer-right"
184           >
185              
186             status
187              
188           </span>
189           <Select
190             aria-label="hotspot.filters.status"
191             className="input-medium big-spacer-right"
192             isSearchable={false}
193             onChange={[Function]}
194             options={
195               [
196                 {
197                   "label": "hotspot.filters.status.to_review",
198                   "value": "TO_REVIEW",
199                 },
200                 {
201                   "label": "hotspot.filters.status.acknowledged",
202                   "value": "ACKNOWLEDGED",
203                 },
204                 {
205                   "label": "hotspot.filters.status.fixed",
206                   "value": "FIXED",
207                 },
208                 {
209                   "label": "hotspot.filters.status.safe",
210                   "value": "SAFE",
211                 },
212               ]
213             }
214             value={
215               {
216                 "label": "hotspot.filters.status.to_review",
217                 "value": "TO_REVIEW",
218               }
219             }
220           />
221           <Select
222             aria-label="hotspot.filters.period"
223             className="input-medium big-spacer-right"
224             isSearchable={false}
225             onChange={[Function]}
226             options={
227               [
228                 {
229                   "label": "hotspot.filters.period.since_leak_period",
230                   "value": true,
231                 },
232                 {
233                   "label": "hotspot.filters.period.overall",
234                   "value": false,
235                 },
236               ]
237             }
238             value={
239               {
240                 "label": "hotspot.filters.period.overall",
241                 "value": false,
242               }
243             }
244           />
245         </div>
246         <div
247           className="display-flex-center"
248         >
249           <span
250             className="little-spacer-right"
251           >
252             metric.security_hotspots_reviewed.name
253           </span>
254           <HelpTooltip
255             className="big-spacer-right"
256             overlay="hotspots.reviewed.tooltip"
257           />
258           <DeferredSpinner
259             loading={false}
260           >
261             <Measure
262               className="spacer-left huge it__hs-review-percentage"
263               metricKey="security_hotspots_reviewed"
264               metricType="PERCENT"
265             />
266           </DeferredSpinner>
267         </div>
268       </div>
269     </div>
270   </div>
271 </div>
272 `;
273
274 exports[`should render correctly: non-project 1`] = `
275 <div
276   className="filter-bar-outer"
277 >
278   <div
279     className="filter-bar"
280   >
281     <div
282       className="filter-bar-inner display-flex-center"
283     >
284       <div
285         className="display-flex-space-between width-100"
286       >
287         <div
288           className="display-flex-center"
289         >
290           <h3
291             className="huge-spacer-right"
292           >
293             hotspot.filters.title
294           </h3>
295           <span
296             className="huge-spacer-right"
297           >
298             <ButtonToggle
299               onCheck={[Function]}
300               options={
301                 [
302                   {
303                     "label": "hotspot.filters.assignee.assigned_to_me",
304                     "value": "me",
305                   },
306                   {
307                     "label": "hotspot.filters.assignee.all",
308                     "value": "all",
309                   },
310                 ]
311               }
312               value="all"
313             />
314           </span>
315           <span
316             className="spacer-right"
317           >
318              
319             status
320              
321           </span>
322           <Select
323             aria-label="hotspot.filters.status"
324             className="input-medium big-spacer-right"
325             isSearchable={false}
326             onChange={[Function]}
327             options={
328               [
329                 {
330                   "label": "hotspot.filters.status.to_review",
331                   "value": "TO_REVIEW",
332                 },
333                 {
334                   "label": "hotspot.filters.status.acknowledged",
335                   "value": "ACKNOWLEDGED",
336                 },
337                 {
338                   "label": "hotspot.filters.status.fixed",
339                   "value": "FIXED",
340                 },
341                 {
342                   "label": "hotspot.filters.status.safe",
343                   "value": "SAFE",
344                 },
345               ]
346             }
347             value={
348               {
349                 "label": "hotspot.filters.status.to_review",
350                 "value": "TO_REVIEW",
351               }
352             }
353           />
354           <Select
355             aria-label="hotspot.filters.period"
356             className="input-medium big-spacer-right"
357             isSearchable={false}
358             onChange={[Function]}
359             options={
360               [
361                 {
362                   "label": "hotspot.filters.period.since_leak_period",
363                   "value": true,
364                 },
365                 {
366                   "label": "hotspot.filters.period.overall",
367                   "value": false,
368                 },
369               ]
370             }
371             value={
372               {
373                 "label": "hotspot.filters.period.overall",
374                 "value": false,
375               }
376             }
377           />
378         </div>
379       </div>
380     </div>
381   </div>
382 </div>
383 `;
384
385 exports[`should render correctly: on Pull request 1`] = `
386 <div
387   className="filter-bar-outer"
388 >
389   <div
390     className="filter-bar"
391   >
392     <div
393       className="filter-bar-inner display-flex-center"
394     >
395       <div
396         className="display-flex-space-between width-100"
397       >
398         <div
399           className="display-flex-center"
400         >
401           <h3
402             className="huge-spacer-right"
403           >
404             hotspot.filters.title
405           </h3>
406           <span
407             className="spacer-right"
408           >
409              
410             status
411              
412           </span>
413           <Select
414             aria-label="hotspot.filters.status"
415             className="input-medium big-spacer-right"
416             isSearchable={false}
417             onChange={[Function]}
418             options={
419               [
420                 {
421                   "label": "hotspot.filters.status.to_review",
422                   "value": "TO_REVIEW",
423                 },
424                 {
425                   "label": "hotspot.filters.status.acknowledged",
426                   "value": "ACKNOWLEDGED",
427                 },
428                 {
429                   "label": "hotspot.filters.status.fixed",
430                   "value": "FIXED",
431                 },
432                 {
433                   "label": "hotspot.filters.status.safe",
434                   "value": "SAFE",
435                 },
436               ]
437             }
438             value={
439               {
440                 "label": "hotspot.filters.status.to_review",
441                 "value": "TO_REVIEW",
442               }
443             }
444           />
445         </div>
446         <div
447           className="display-flex-center"
448         >
449           <span
450             className="little-spacer-right"
451           >
452             metric.security_hotspots_reviewed.name
453           </span>
454           <HelpTooltip
455             className="big-spacer-right"
456             overlay="hotspots.reviewed.tooltip"
457           />
458           <DeferredSpinner
459             loading={false}
460           >
461             <Measure
462               className="spacer-left huge it__hs-review-percentage"
463               metricKey="new_security_hotspots_reviewed"
464               metricType="PERCENT"
465             />
466           </DeferredSpinner>
467         </div>
468       </div>
469     </div>
470   </div>
471 </div>
472 `;
473
474 exports[`should render correctly: with hotspots reviewed measure 1`] = `
475 <div
476   className="filter-bar-outer"
477 >
478   <div
479     className="filter-bar"
480   >
481     <div
482       className="filter-bar-inner display-flex-center"
483     >
484       <div
485         className="display-flex-space-between width-100"
486       >
487         <div
488           className="display-flex-center"
489         >
490           <h3
491             className="huge-spacer-right"
492           >
493             hotspot.filters.title
494           </h3>
495           <span
496             className="spacer-right"
497           >
498              
499             status
500              
501           </span>
502           <Select
503             aria-label="hotspot.filters.status"
504             className="input-medium big-spacer-right"
505             isSearchable={false}
506             onChange={[Function]}
507             options={
508               [
509                 {
510                   "label": "hotspot.filters.status.to_review",
511                   "value": "TO_REVIEW",
512                 },
513                 {
514                   "label": "hotspot.filters.status.acknowledged",
515                   "value": "ACKNOWLEDGED",
516                 },
517                 {
518                   "label": "hotspot.filters.status.fixed",
519                   "value": "FIXED",
520                 },
521                 {
522                   "label": "hotspot.filters.status.safe",
523                   "value": "SAFE",
524                 },
525               ]
526             }
527             value={
528               {
529                 "label": "hotspot.filters.status.to_review",
530                 "value": "TO_REVIEW",
531               }
532             }
533           />
534           <Select
535             aria-label="hotspot.filters.period"
536             className="input-medium big-spacer-right"
537             isSearchable={false}
538             onChange={[Function]}
539             options={
540               [
541                 {
542                   "label": "hotspot.filters.period.since_leak_period",
543                   "value": true,
544                 },
545                 {
546                   "label": "hotspot.filters.period.overall",
547                   "value": false,
548                 },
549               ]
550             }
551             value={
552               {
553                 "label": "hotspot.filters.period.overall",
554                 "value": false,
555               }
556             }
557           />
558         </div>
559         <div
560           className="display-flex-center"
561         >
562           <span
563             className="little-spacer-right"
564           >
565             metric.security_hotspots_reviewed.name
566           </span>
567           <HelpTooltip
568             className="big-spacer-right"
569             overlay="hotspots.reviewed.tooltip"
570           />
571           <DeferredSpinner
572             loading={false}
573           >
574             <CoverageRating
575               value="23.30"
576             />
577             <Measure
578               className="spacer-left huge it__hs-review-percentage"
579               metricKey="security_hotspots_reviewed"
580               metricType="PERCENT"
581               value="23.30"
582             />
583           </DeferredSpinner>
584         </div>
585       </div>
586     </div>
587   </div>
588 </div>
589 `;