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