]> source.dussan.org Git - sonarqube.git/blob
3301b5c37636a2afdaf8dfa7c91f120f70291bd2
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly: default 1`] = `
4 <div
5   className="issue-row"
6 >
7   <ContextConsumer>
8     <Component />
9   </ContextConsumer>
10   <div
11     className="issue-row-meta"
12   >
13     <div
14       className="issue-meta-list"
15     >
16       <div
17         className="issue-meta"
18       >
19         <IssueChangelog
20           creationDate="2017-03-01T09:36:01+0100"
21           isOpen={false}
22           issue={
23             Object {
24               "actions": Array [],
25               "component": "main.js",
26               "componentLongName": "main.js",
27               "componentQualifier": "FIL",
28               "componentUuid": "foo1234",
29               "creationDate": "2017-03-01T09:36:01+0100",
30               "externalRuleEngine": "foo",
31               "flows": Array [],
32               "fromHotspot": false,
33               "key": "AVsae-CQS-9G3txfbFN2",
34               "line": 25,
35               "message": "Reduce the number of conditional operators (4) used in the expression",
36               "project": "myproject",
37               "projectKey": "foo",
38               "projectName": "Foo",
39               "rule": "javascript:S1067",
40               "ruleName": "foo",
41               "secondaryLocations": Array [],
42               "severity": "MAJOR",
43               "status": "OPEN",
44               "textRange": Object {
45                 "endLine": 26,
46                 "endOffset": 15,
47                 "startLine": 25,
48                 "startOffset": 0,
49               },
50               "transitions": Array [],
51               "type": "BUG",
52             }
53           }
54           togglePopup={[MockFunction]}
55         />
56       </div>
57       <div
58         className="issue-meta"
59       >
60         <span
61           className="issue-meta-label"
62           title="line_number"
63         >
64           L
65           26
66         </span>
67       </div>
68       <div
69         className="issue-meta"
70       >
71         <Link
72           className="js-issue-permalink link-no-underline"
73           onlyActiveOnIndex={false}
74           style={Object {}}
75           target="_blank"
76           title="permalink"
77           to={
78             Object {
79               "pathname": "/project/issues",
80               "query": Object {
81                 "id": "myproject",
82                 "issues": "AVsae-CQS-9G3txfbFN2",
83                 "open": "AVsae-CQS-9G3txfbFN2",
84                 "types": undefined,
85               },
86             }
87           }
88         >
89           <LinkIcon />
90         </Link>
91       </div>
92     </div>
93   </div>
94 </div>
95 `;
96
97 exports[`should render correctly: issue message 1`] = `
98 <IssueMessage
99   engine="foo"
100   manualVulnerability={false}
101   message="Reduce the number of conditional operators (4) used in the expression"
102   onOpenRule={[Function]}
103   ruleKey="javascript:S1067"
104 />
105 `;
106
107 exports[`should render correctly: with filter 1`] = `
108 <div
109   className="issue-row"
110 >
111   <ContextConsumer>
112     <Component />
113   </ContextConsumer>
114   <div
115     className="issue-row-meta"
116   >
117     <div
118       className="issue-meta-list"
119     >
120       <div
121         className="issue-meta"
122       >
123         <IssueChangelog
124           creationDate="2017-03-01T09:36:01+0100"
125           isOpen={false}
126           issue={
127             Object {
128               "actions": Array [],
129               "component": "main.js",
130               "componentLongName": "main.js",
131               "componentQualifier": "FIL",
132               "componentUuid": "foo1234",
133               "creationDate": "2017-03-01T09:36:01+0100",
134               "externalRuleEngine": "foo",
135               "flows": Array [],
136               "fromHotspot": false,
137               "key": "AVsae-CQS-9G3txfbFN2",
138               "line": 25,
139               "message": "Reduce the number of conditional operators (4) used in the expression",
140               "project": "myproject",
141               "projectKey": "foo",
142               "projectName": "Foo",
143               "rule": "javascript:S1067",
144               "ruleName": "foo",
145               "secondaryLocations": Array [],
146               "severity": "MAJOR",
147               "status": "OPEN",
148               "textRange": Object {
149                 "endLine": 26,
150                 "endOffset": 15,
151                 "startLine": 25,
152                 "startOffset": 0,
153               },
154               "transitions": Array [],
155               "type": "BUG",
156             }
157           }
158           togglePopup={[MockFunction]}
159         />
160       </div>
161       <div
162         className="issue-meta"
163       >
164         <span
165           className="issue-meta-label"
166           title="line_number"
167         >
168           L
169           26
170         </span>
171       </div>
172       <div
173         className="issue-meta"
174       >
175         <Link
176           className="js-issue-permalink link-no-underline"
177           onlyActiveOnIndex={false}
178           style={Object {}}
179           target="_blank"
180           title="permalink"
181           to={
182             Object {
183               "pathname": "/project/issues",
184               "query": Object {
185                 "id": "myproject",
186                 "issues": "AVsae-CQS-9G3txfbFN2",
187                 "open": "AVsae-CQS-9G3txfbFN2",
188                 "types": undefined,
189               },
190             }
191           }
192         >
193           <LinkIcon />
194         </Link>
195       </div>
196       <div
197         className="issue-meta"
198       >
199         <SimilarIssuesFilter
200           isOpen={false}
201           issue={
202             Object {
203               "actions": Array [],
204               "component": "main.js",
205               "componentLongName": "main.js",
206               "componentQualifier": "FIL",
207               "componentUuid": "foo1234",
208               "creationDate": "2017-03-01T09:36:01+0100",
209               "externalRuleEngine": "foo",
210               "flows": Array [],
211               "fromHotspot": false,
212               "key": "AVsae-CQS-9G3txfbFN2",
213               "line": 25,
214               "message": "Reduce the number of conditional operators (4) used in the expression",
215               "project": "myproject",
216               "projectKey": "foo",
217               "projectName": "Foo",
218               "rule": "javascript:S1067",
219               "ruleName": "foo",
220               "secondaryLocations": Array [],
221               "severity": "MAJOR",
222               "status": "OPEN",
223               "textRange": Object {
224                 "endLine": 26,
225                 "endOffset": 15,
226                 "startLine": 25,
227                 "startOffset": 0,
228               },
229               "transitions": Array [],
230               "type": "BUG",
231             }
232           }
233           onFilter={[MockFunction]}
234           togglePopup={[MockFunction]}
235         />
236       </div>
237     </div>
238   </div>
239 </div>
240 `;
241
242 exports[`should render correctly: with multi locations 1`] = `
243 <div
244   className="issue-row"
245 >
246   <ContextConsumer>
247     <Component />
248   </ContextConsumer>
249   <div
250     className="issue-row-meta"
251   >
252     <div
253       className="issue-meta-list"
254     >
255       <div
256         className="issue-meta"
257       >
258         <IssueChangelog
259           creationDate="2017-03-01T09:36:01+0100"
260           isOpen={false}
261           issue={
262             Object {
263               "actions": Array [],
264               "component": "main.js",
265               "componentLongName": "main.js",
266               "componentQualifier": "FIL",
267               "componentUuid": "foo1234",
268               "creationDate": "2017-03-01T09:36:01+0100",
269               "flows": Array [
270                 Array [
271                   Object {
272                     "component": "main.js",
273                     "textRange": Object {
274                       "endLine": 2,
275                       "endOffset": 2,
276                       "startLine": 1,
277                       "startOffset": 1,
278                     },
279                   },
280                   Object {
281                     "component": "main.js",
282                     "textRange": Object {
283                       "endLine": 2,
284                       "endOffset": 2,
285                       "startLine": 1,
286                       "startOffset": 1,
287                     },
288                   },
289                   Object {
290                     "component": "main.js",
291                     "textRange": Object {
292                       "endLine": 2,
293                       "endOffset": 2,
294                       "startLine": 1,
295                       "startOffset": 1,
296                     },
297                   },
298                 ],
299                 Array [
300                   Object {
301                     "component": "main.js",
302                     "textRange": Object {
303                       "endLine": 2,
304                       "endOffset": 2,
305                       "startLine": 1,
306                       "startOffset": 1,
307                     },
308                   },
309                   Object {
310                     "component": "main.js",
311                     "textRange": Object {
312                       "endLine": 2,
313                       "endOffset": 2,
314                       "startLine": 1,
315                       "startOffset": 1,
316                     },
317                   },
318                 ],
319               ],
320               "fromHotspot": false,
321               "key": "AVsae-CQS-9G3txfbFN2",
322               "line": 25,
323               "message": "Reduce the number of conditional operators (4) used in the expression",
324               "project": "myproject",
325               "projectKey": "foo",
326               "projectName": "Foo",
327               "rule": "javascript:S1067",
328               "ruleName": "foo",
329               "secondaryLocations": Array [
330                 Object {
331                   "component": "main.js",
332                   "textRange": Object {
333                     "endLine": 2,
334                     "endOffset": 2,
335                     "startLine": 1,
336                     "startOffset": 1,
337                   },
338                 },
339                 Object {
340                   "component": "main.js",
341                   "textRange": Object {
342                     "endLine": 2,
343                     "endOffset": 2,
344                     "startLine": 1,
345                     "startOffset": 1,
346                   },
347                 },
348               ],
349               "severity": "MAJOR",
350               "status": "OPEN",
351               "textRange": Object {
352                 "endLine": 26,
353                 "endOffset": 15,
354                 "startLine": 25,
355                 "startOffset": 0,
356               },
357               "transitions": Array [],
358               "type": "BUG",
359             }
360           }
361           togglePopup={[MockFunction]}
362         />
363       </div>
364       <div
365         className="issue-meta"
366       >
367         <span
368           className="issue-meta-label"
369           title="line_number"
370         >
371           L
372           26
373         </span>
374       </div>
375       <div
376         className="issue-meta"
377       >
378         <Tooltip
379           overlay="issue.this_issue_involves_x_code_locations.7"
380         >
381           <LocationIndex>
382             7
383           </LocationIndex>
384         </Tooltip>
385       </div>
386       <div
387         className="issue-meta"
388       >
389         <Link
390           className="js-issue-permalink link-no-underline"
391           onlyActiveOnIndex={false}
392           style={Object {}}
393           target="_blank"
394           title="permalink"
395           to={
396             Object {
397               "pathname": "/project/issues",
398               "query": Object {
399                 "id": "myproject",
400                 "issues": "AVsae-CQS-9G3txfbFN2",
401                 "open": "AVsae-CQS-9G3txfbFN2",
402                 "types": undefined,
403               },
404             }
405           }
406         >
407           <LinkIcon />
408         </Link>
409       </div>
410     </div>
411   </div>
412 </div>
413 `;
414
415 exports[`should render correctly: with multi locations and link 1`] = `
416 <div
417   className="issue-row"
418 >
419   <ContextConsumer>
420     <Component />
421   </ContextConsumer>
422   <div
423     className="issue-row-meta"
424   >
425     <div
426       className="issue-meta-list"
427     >
428       <div
429         className="issue-meta"
430       >
431         <IssueChangelog
432           creationDate="2017-03-01T09:36:01+0100"
433           isOpen={false}
434           issue={
435             Object {
436               "actions": Array [],
437               "component": "main.js",
438               "componentLongName": "main.js",
439               "componentQualifier": "FIL",
440               "componentUuid": "foo1234",
441               "creationDate": "2017-03-01T09:36:01+0100",
442               "flows": Array [
443                 Array [
444                   Object {
445                     "component": "main.js",
446                     "textRange": Object {
447                       "endLine": 2,
448                       "endOffset": 2,
449                       "startLine": 1,
450                       "startOffset": 1,
451                     },
452                   },
453                   Object {
454                     "component": "main.js",
455                     "textRange": Object {
456                       "endLine": 2,
457                       "endOffset": 2,
458                       "startLine": 1,
459                       "startOffset": 1,
460                     },
461                   },
462                   Object {
463                     "component": "main.js",
464                     "textRange": Object {
465                       "endLine": 2,
466                       "endOffset": 2,
467                       "startLine": 1,
468                       "startOffset": 1,
469                     },
470                   },
471                 ],
472                 Array [
473                   Object {
474                     "component": "main.js",
475                     "textRange": Object {
476                       "endLine": 2,
477                       "endOffset": 2,
478                       "startLine": 1,
479                       "startOffset": 1,
480                     },
481                   },
482                   Object {
483                     "component": "main.js",
484                     "textRange": Object {
485                       "endLine": 2,
486                       "endOffset": 2,
487                       "startLine": 1,
488                       "startOffset": 1,
489                     },
490                   },
491                 ],
492               ],
493               "fromHotspot": false,
494               "key": "AVsae-CQS-9G3txfbFN2",
495               "line": 25,
496               "message": "Reduce the number of conditional operators (4) used in the expression",
497               "project": "myproject",
498               "projectKey": "foo",
499               "projectName": "Foo",
500               "rule": "javascript:S1067",
501               "ruleName": "foo",
502               "secondaryLocations": Array [
503                 Object {
504                   "component": "main.js",
505                   "textRange": Object {
506                     "endLine": 2,
507                     "endOffset": 2,
508                     "startLine": 1,
509                     "startOffset": 1,
510                   },
511                 },
512                 Object {
513                   "component": "main.js",
514                   "textRange": Object {
515                     "endLine": 2,
516                     "endOffset": 2,
517                     "startLine": 1,
518                     "startOffset": 1,
519                   },
520                 },
521               ],
522               "severity": "MAJOR",
523               "status": "OPEN",
524               "textRange": Object {
525                 "endLine": 26,
526                 "endOffset": 15,
527                 "startLine": 25,
528                 "startOffset": 0,
529               },
530               "transitions": Array [],
531               "type": "BUG",
532             }
533           }
534           togglePopup={[MockFunction]}
535         />
536       </div>
537       <div
538         className="issue-meta"
539       >
540         <span
541           className="issue-meta-label"
542           title="line_number"
543         >
544           L
545           26
546         </span>
547       </div>
548       <div
549         className="issue-meta"
550       >
551         <Link
552           onlyActiveOnIndex={false}
553           style={Object {}}
554           target="_blank"
555           to={
556             Object {
557               "pathname": "/project/issues",
558               "query": Object {
559                 "branch": "branch-6.7",
560                 "id": "myproject",
561                 "issues": "AVsae-CQS-9G3txfbFN2",
562                 "open": "AVsae-CQS-9G3txfbFN2",
563                 "types": undefined,
564               },
565             }
566           }
567         >
568           <Tooltip
569             overlay="issue.this_issue_involves_x_code_locations.7"
570           >
571             <LocationIndex>
572               7
573             </LocationIndex>
574           </Tooltip>
575         </Link>
576       </div>
577       <div
578         className="issue-meta"
579       >
580         <Link
581           className="js-issue-permalink link-no-underline"
582           onlyActiveOnIndex={false}
583           style={Object {}}
584           target="_blank"
585           title="permalink"
586           to={
587             Object {
588               "pathname": "/project/issues",
589               "query": Object {
590                 "branch": "branch-6.7",
591                 "id": "myproject",
592                 "issues": "AVsae-CQS-9G3txfbFN2",
593                 "open": "AVsae-CQS-9G3txfbFN2",
594                 "types": undefined,
595               },
596             }
597           }
598         >
599           <LinkIcon />
600         </Link>
601       </div>
602     </div>
603   </div>
604 </div>
605 `;