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