]> source.dussan.org Git - sonarqube.git/blob
7deee3c6bdac3e0330cda403dbf90d12501b9fcb
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should correctly filter analyses by category 1`] = `
4 <ul
5   className="project-activity-versions-list"
6   onScroll={[Function]}
7   style={
8     {
9       "marginTop": 36,
10     }
11   }
12 >
13   <li
14     key="E2"
15   >
16     <div
17       className="project-activity-version-badge first"
18     >
19       <Tooltip
20         mouseEnterDelay={0.5}
21         overlay="version 6.4"
22       >
23         <h2
24           className="analysis-version"
25         >
26           6.4
27         </h2>
28       </Tooltip>
29     </div>
30     <ul
31       className="project-activity-days-list"
32     >
33       <li
34         className="project-activity-day"
35         data-day="ISO.1477267200000"
36         key="1477267200000"
37       >
38         <h3>
39           <DateFormatter
40             date={1477267200000}
41             long={true}
42           />
43         </h3>
44         <ul
45           className="project-activity-analyses-list"
46         >
47           <injectIntl(ProjectActivityAnalysis)
48             addCustomEvent={[MockFunction]}
49             addVersion={[MockFunction]}
50             analysis={
51               {
52                 "date": 2016-10-24T16:33:50.000Z,
53                 "events": [
54                   {
55                     "category": "QUALITY_GATE",
56                     "key": "E1",
57                     "name": "Quality gate changed to red...",
58                   },
59                 ],
60                 "key": "A4",
61                 "projectVersion": "1.0",
62               }
63             }
64             canAdmin={false}
65             canCreateVersion={true}
66             changeEvent={[MockFunction]}
67             deleteAnalysis={[MockFunction]}
68             deleteEvent={[MockFunction]}
69             isBaseline={false}
70             isFirst={false}
71             key="A4"
72             selected={false}
73             updateSelectedDate={[Function]}
74           />
75         </ul>
76       </li>
77     </ul>
78   </li>
79 </ul>
80 `;
81
82 exports[`should correctly filter analyses by date range 1`] = `
83 <ul
84   className="project-activity-versions-list"
85   onScroll={[Function]}
86   style={
87     {
88       "marginTop": 36,
89     }
90   }
91 >
92   <li
93     key="E1"
94   >
95     <div
96       className="project-activity-version-badge first"
97     >
98       <Tooltip
99         mouseEnterDelay={0.5}
100         overlay="version 6.5-SNAPSHOT"
101       >
102         <h2
103           className="analysis-version"
104         >
105           6.5-SNAPSHOT
106         </h2>
107       </Tooltip>
108     </div>
109     <ul
110       className="project-activity-days-list"
111     >
112       <li
113         className="project-activity-day"
114         data-day="ISO.1477526400000"
115         key="1477526400000"
116       >
117         <h3>
118           <DateFormatter
119             date={1477526400000}
120             long={true}
121           />
122         </h3>
123         <ul
124           className="project-activity-analyses-list"
125         >
126           <injectIntl(ProjectActivityAnalysis)
127             addCustomEvent={[MockFunction]}
128             addVersion={[MockFunction]}
129             analysis={
130               {
131                 "date": 2016-10-27T16:33:50.000Z,
132                 "events": [
133                   {
134                     "category": "VERSION",
135                     "key": "E1",
136                     "name": "6.5-SNAPSHOT",
137                   },
138                 ],
139                 "key": "A1",
140                 "projectVersion": "1.0",
141               }
142             }
143             canAdmin={false}
144             canCreateVersion={true}
145             changeEvent={[MockFunction]}
146             deleteAnalysis={[MockFunction]}
147             deleteEvent={[MockFunction]}
148             isBaseline={false}
149             isFirst={true}
150             key="A1"
151             selected={false}
152             updateSelectedDate={[Function]}
153           />
154         </ul>
155       </li>
156     </ul>
157   </li>
158 </ul>
159 `;
160
161 exports[`should render correctly: application 1`] = `
162 <ul
163   className="project-activity-versions-list"
164   onScroll={[Function]}
165   style={
166     {
167       "marginTop": undefined,
168     }
169   }
170 >
171   <li
172     key="E1"
173   >
174     <div
175       className="project-activity-version-badge first"
176     >
177       <Tooltip
178         mouseEnterDelay={0.5}
179         overlay="version 6.5-SNAPSHOT"
180       >
181         <h2
182           className="analysis-version"
183         >
184           6.5-SNAPSHOT
185         </h2>
186       </Tooltip>
187     </div>
188     <ul
189       className="project-activity-days-list"
190     >
191       <li
192         className="project-activity-day"
193         data-day="ISO.1477526400000"
194         key="1477526400000"
195       >
196         <h3>
197           <DateFormatter
198             date={1477526400000}
199             long={true}
200           />
201         </h3>
202         <ul
203           className="project-activity-analyses-list"
204         >
205           <injectIntl(ProjectActivityAnalysis)
206             addCustomEvent={[MockFunction]}
207             addVersion={[MockFunction]}
208             analysis={
209               {
210                 "date": 2016-10-27T16:33:50.000Z,
211                 "events": [
212                   {
213                     "category": "VERSION",
214                     "key": "E1",
215                     "name": "6.5-SNAPSHOT",
216                   },
217                 ],
218                 "key": "A1",
219                 "projectVersion": "1.0",
220               }
221             }
222             canAdmin={false}
223             canCreateVersion={false}
224             changeEvent={[MockFunction]}
225             deleteAnalysis={[MockFunction]}
226             deleteEvent={[MockFunction]}
227             isBaseline={false}
228             isFirst={true}
229             key="A1"
230             selected={false}
231             updateSelectedDate={[Function]}
232           />
233           <injectIntl(ProjectActivityAnalysis)
234             addCustomEvent={[MockFunction]}
235             addVersion={[MockFunction]}
236             analysis={
237               {
238                 "date": 2016-10-27T12:21:15.000Z,
239                 "events": [],
240                 "key": "A2",
241                 "projectVersion": "1.0",
242               }
243             }
244             canAdmin={false}
245             canCreateVersion={false}
246             changeEvent={[MockFunction]}
247             deleteAnalysis={[MockFunction]}
248             deleteEvent={[MockFunction]}
249             isBaseline={true}
250             isFirst={false}
251             key="A2"
252             selected={false}
253             updateSelectedDate={[Function]}
254           />
255         </ul>
256       </li>
257     </ul>
258   </li>
259   <li
260     key="E2"
261   >
262     <div
263       className="project-activity-version-badge"
264     >
265       <Tooltip
266         mouseEnterDelay={0.5}
267         overlay="version 6.4"
268       >
269         <h2
270           className="analysis-version"
271         >
272           6.4
273         </h2>
274       </Tooltip>
275     </div>
276     <ul
277       className="project-activity-days-list"
278     >
279       <li
280         className="project-activity-day"
281         data-day="ISO.1477440000000"
282         key="1477440000000"
283       >
284         <h3>
285           <DateFormatter
286             date={1477440000000}
287             long={true}
288           />
289         </h3>
290         <ul
291           className="project-activity-analyses-list"
292         >
293           <injectIntl(ProjectActivityAnalysis)
294             addCustomEvent={[MockFunction]}
295             addVersion={[MockFunction]}
296             analysis={
297               {
298                 "date": 2016-10-26T12:17:29.000Z,
299                 "events": [
300                   {
301                     "category": "VERSION",
302                     "key": "E2",
303                     "name": "6.4",
304                   },
305                   {
306                     "category": "OTHER",
307                     "key": "E3",
308                     "name": "foo",
309                   },
310                 ],
311                 "key": "A3",
312                 "projectVersion": "1.0",
313               }
314             }
315             canAdmin={false}
316             canCreateVersion={false}
317             changeEvent={[MockFunction]}
318             deleteAnalysis={[MockFunction]}
319             deleteEvent={[MockFunction]}
320             isBaseline={false}
321             isFirst={false}
322             key="A3"
323             selected={false}
324             updateSelectedDate={[Function]}
325           />
326         </ul>
327       </li>
328       <li
329         className="project-activity-day"
330         data-day="ISO.1477267200000"
331         key="1477267200000"
332       >
333         <h3>
334           <DateFormatter
335             date={1477267200000}
336             long={true}
337           />
338         </h3>
339         <ul
340           className="project-activity-analyses-list"
341         >
342           <injectIntl(ProjectActivityAnalysis)
343             addCustomEvent={[MockFunction]}
344             addVersion={[MockFunction]}
345             analysis={
346               {
347                 "date": 2016-10-24T16:33:50.000Z,
348                 "events": [
349                   {
350                     "category": "QUALITY_GATE",
351                     "key": "E1",
352                     "name": "Quality gate changed to red...",
353                   },
354                 ],
355                 "key": "A4",
356                 "projectVersion": "1.0",
357               }
358             }
359             canAdmin={false}
360             canCreateVersion={false}
361             changeEvent={[MockFunction]}
362             deleteAnalysis={[MockFunction]}
363             deleteEvent={[MockFunction]}
364             isBaseline={false}
365             isFirst={false}
366             key="A4"
367             selected={false}
368             updateSelectedDate={[Function]}
369           />
370         </ul>
371       </li>
372     </ul>
373   </li>
374 </ul>
375 `;
376
377 exports[`should render correctly: default 1`] = `
378 <ul
379   className="project-activity-versions-list"
380   onScroll={[Function]}
381   style={
382     {
383       "marginTop": 36,
384     }
385   }
386 >
387   <li
388     key="E1"
389   >
390     <div
391       className="project-activity-version-badge first"
392     >
393       <Tooltip
394         mouseEnterDelay={0.5}
395         overlay="version 6.5-SNAPSHOT"
396       >
397         <h2
398           className="analysis-version"
399         >
400           6.5-SNAPSHOT
401         </h2>
402       </Tooltip>
403     </div>
404     <ul
405       className="project-activity-days-list"
406     >
407       <li
408         className="project-activity-day"
409         data-day="ISO.1477526400000"
410         key="1477526400000"
411       >
412         <h3>
413           <DateFormatter
414             date={1477526400000}
415             long={true}
416           />
417         </h3>
418         <ul
419           className="project-activity-analyses-list"
420         >
421           <injectIntl(ProjectActivityAnalysis)
422             addCustomEvent={[MockFunction]}
423             addVersion={[MockFunction]}
424             analysis={
425               {
426                 "date": 2016-10-27T16:33:50.000Z,
427                 "events": [
428                   {
429                     "category": "VERSION",
430                     "key": "E1",
431                     "name": "6.5-SNAPSHOT",
432                   },
433                 ],
434                 "key": "A1",
435                 "projectVersion": "1.0",
436               }
437             }
438             canAdmin={false}
439             canCreateVersion={true}
440             changeEvent={[MockFunction]}
441             deleteAnalysis={[MockFunction]}
442             deleteEvent={[MockFunction]}
443             isBaseline={false}
444             isFirst={true}
445             key="A1"
446             selected={false}
447             updateSelectedDate={[Function]}
448           />
449           <injectIntl(ProjectActivityAnalysis)
450             addCustomEvent={[MockFunction]}
451             addVersion={[MockFunction]}
452             analysis={
453               {
454                 "date": 2016-10-27T12:21:15.000Z,
455                 "events": [],
456                 "key": "A2",
457                 "projectVersion": "1.0",
458               }
459             }
460             canAdmin={false}
461             canCreateVersion={true}
462             changeEvent={[MockFunction]}
463             deleteAnalysis={[MockFunction]}
464             deleteEvent={[MockFunction]}
465             isBaseline={true}
466             isFirst={false}
467             key="A2"
468             selected={false}
469             updateSelectedDate={[Function]}
470           />
471         </ul>
472       </li>
473     </ul>
474   </li>
475   <li
476     key="E2"
477   >
478     <div
479       className="project-activity-version-badge"
480     >
481       <Tooltip
482         mouseEnterDelay={0.5}
483         overlay="version 6.4"
484       >
485         <h2
486           className="analysis-version"
487         >
488           6.4
489         </h2>
490       </Tooltip>
491     </div>
492     <ul
493       className="project-activity-days-list"
494     >
495       <li
496         className="project-activity-day"
497         data-day="ISO.1477440000000"
498         key="1477440000000"
499       >
500         <h3>
501           <DateFormatter
502             date={1477440000000}
503             long={true}
504           />
505         </h3>
506         <ul
507           className="project-activity-analyses-list"
508         >
509           <injectIntl(ProjectActivityAnalysis)
510             addCustomEvent={[MockFunction]}
511             addVersion={[MockFunction]}
512             analysis={
513               {
514                 "date": 2016-10-26T12:17:29.000Z,
515                 "events": [
516                   {
517                     "category": "VERSION",
518                     "key": "E2",
519                     "name": "6.4",
520                   },
521                   {
522                     "category": "OTHER",
523                     "key": "E3",
524                     "name": "foo",
525                   },
526                 ],
527                 "key": "A3",
528                 "projectVersion": "1.0",
529               }
530             }
531             canAdmin={false}
532             canCreateVersion={true}
533             changeEvent={[MockFunction]}
534             deleteAnalysis={[MockFunction]}
535             deleteEvent={[MockFunction]}
536             isBaseline={false}
537             isFirst={false}
538             key="A3"
539             selected={false}
540             updateSelectedDate={[Function]}
541           />
542         </ul>
543       </li>
544       <li
545         className="project-activity-day"
546         data-day="ISO.1477267200000"
547         key="1477267200000"
548       >
549         <h3>
550           <DateFormatter
551             date={1477267200000}
552             long={true}
553           />
554         </h3>
555         <ul
556           className="project-activity-analyses-list"
557         >
558           <injectIntl(ProjectActivityAnalysis)
559             addCustomEvent={[MockFunction]}
560             addVersion={[MockFunction]}
561             analysis={
562               {
563                 "date": 2016-10-24T16:33:50.000Z,
564                 "events": [
565                   {
566                     "category": "QUALITY_GATE",
567                     "key": "E1",
568                     "name": "Quality gate changed to red...",
569                   },
570                 ],
571                 "key": "A4",
572                 "projectVersion": "1.0",
573               }
574             }
575             canAdmin={false}
576             canCreateVersion={true}
577             changeEvent={[MockFunction]}
578             deleteAnalysis={[MockFunction]}
579             deleteEvent={[MockFunction]}
580             isBaseline={false}
581             isFirst={false}
582             key="A4"
583             selected={false}
584             updateSelectedDate={[Function]}
585           />
586         </ul>
587       </li>
588     </ul>
589   </li>
590 </ul>
591 `;
592
593 exports[`should render correctly: loading 1`] = `
594 <div
595   className="boxed-group-inner"
596 >
597   <div
598     className="text-center"
599   >
600     <i
601       className="spinner"
602     />
603   </div>
604 </div>
605 `;
606
607 exports[`should render correctly: no analyses 1`] = `
608 <div
609   className="boxed-group-inner"
610 >
611   <span
612     className="note"
613   >
614     no_results
615   </span>
616 </div>
617 `;