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