]> source.dussan.org Git - sonarqube.git/blob
1aeb92a076dc3eaa3c05f8cb27b889928ecd1cbe
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should handle duplication popup 1`] = `
4 <Context.Consumer>
5   [Function]
6 </Context.Consumer>
7 `;
8
9 exports[`should render correctly 1`] = `
10 <div>
11   <DeferredSpinner
12     timeout={100}
13   />
14 </div>
15 `;
16
17 exports[`should render correctly 2`] = `
18 <div>
19   <ComponentSourceSnippetViewer
20     issue={
21       Object {
22         "actions": Array [],
23         "component": "main.js",
24         "componentLongName": "main.js",
25         "componentQualifier": "FIL",
26         "componentUuid": "foo1234",
27         "creationDate": "2017-03-01T09:36:01+0100",
28         "flows": Array [
29           Array [
30             Object {
31               "component": "main.js",
32               "textRange": Object {
33                 "endLine": 2,
34                 "endOffset": 2,
35                 "startLine": 1,
36                 "startOffset": 1,
37               },
38             },
39             Object {
40               "component": "main.js",
41               "textRange": Object {
42                 "endLine": 2,
43                 "endOffset": 2,
44                 "startLine": 1,
45                 "startOffset": 1,
46               },
47             },
48             Object {
49               "component": "main.js",
50               "textRange": Object {
51                 "endLine": 2,
52                 "endOffset": 2,
53                 "startLine": 1,
54                 "startOffset": 1,
55               },
56             },
57           ],
58           Array [
59             Object {
60               "component": "main.js",
61               "textRange": Object {
62                 "endLine": 2,
63                 "endOffset": 2,
64                 "startLine": 1,
65                 "startOffset": 1,
66               },
67             },
68             Object {
69               "component": "main.js",
70               "textRange": Object {
71                 "endLine": 2,
72                 "endOffset": 2,
73                 "startLine": 1,
74                 "startOffset": 1,
75               },
76             },
77           ],
78         ],
79         "fromHotspot": false,
80         "key": "1",
81         "line": 25,
82         "message": "Reduce the number of conditional operators (4) used in the expression",
83         "organization": "myorg",
84         "project": "myproject",
85         "projectKey": "foo",
86         "projectName": "Foo",
87         "projectOrganization": "org",
88         "rule": "javascript:S1067",
89         "ruleName": "foo",
90         "secondaryLocations": Array [
91           Object {
92             "component": "main.js",
93             "textRange": Object {
94               "endLine": 2,
95               "endOffset": 2,
96               "startLine": 1,
97               "startOffset": 1,
98             },
99           },
100           Object {
101             "component": "main.js",
102             "textRange": Object {
103               "endLine": 2,
104               "endOffset": 2,
105               "startLine": 1,
106               "startOffset": 1,
107             },
108           },
109         ],
110         "severity": "MAJOR",
111         "status": "OPEN",
112         "textRange": Object {
113           "endLine": 26,
114           "endOffset": 15,
115           "startLine": 25,
116           "startOffset": 0,
117         },
118         "transitions": Array [],
119         "type": "BUG",
120       }
121     }
122     issuesByLine={Object {}}
123     key="1-0-0"
124     last={true}
125     loadDuplications={[Function]}
126     locations={
127       Array [
128         Object {
129           "component": "main.js",
130           "index": 0,
131           "textRange": Object {
132             "endLine": 2,
133             "endOffset": 2,
134             "startLine": 1,
135             "startOffset": 1,
136           },
137         },
138       ]
139     }
140     onIssueChange={[MockFunction]}
141     onIssuePopupToggle={[Function]}
142     onLinePopupToggle={[Function]}
143     onLocationSelect={[MockFunction]}
144     renderDuplicationPopup={[Function]}
145     scroll={[MockFunction]}
146     snippetGroup={
147       Object {
148         "component": Object {
149           "key": "main.js",
150           "measures": Object {
151             "coverage": "85.2",
152             "duplicationDensity": "1.0",
153             "issues": "12",
154             "lines": "56",
155           },
156           "path": "main.js",
157           "project": "my-project",
158           "projectName": "MyProject",
159           "q": "FIL",
160           "uuid": "foo-bar",
161         },
162         "locations": Array [
163           Object {
164             "component": "main.js",
165             "index": 0,
166             "textRange": Object {
167               "endLine": 2,
168               "endOffset": 2,
169               "startLine": 1,
170               "startOffset": 1,
171             },
172           },
173         ],
174         "sources": Object {
175           "16": Object {
176             "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
177             "coverageStatus": "covered",
178             "coveredConditions": 2,
179             "duplicated": false,
180             "isNew": true,
181             "line": 16,
182             "scmAuthor": "simon.brandhof@sonarsource.com",
183             "scmDate": "2018-12-11T10:48:39+0100",
184             "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
185           },
186         },
187       }
188     }
189   />
190 </div>
191 `;