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