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