]> source.dussan.org Git - sonarqube.git/blob
772a3ad35f35606447a3cc7d129a31d0164811bd
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly 1`] = `
4 <div
5   className="bordered big-spacer-bottom"
6 >
7   <SourceViewerHeaderSlim
8     branchLike={
9       Object {
10         "analysisDate": "2018-01-01",
11         "excludedFromPurge": true,
12         "isMain": true,
13         "name": "master",
14       }
15     }
16     displayProjectName={true}
17     expandable={false}
18     linkToProject={false}
19     loading={false}
20     onExpand={[Function]}
21     sourceViewerFile={
22       Object {
23         "key": "foo",
24         "measures": Object {
25           "coverage": "85.2",
26           "duplicationDensity": "1.0",
27           "issues": "12",
28           "lines": "56",
29         },
30         "path": "foo/bar.ts",
31         "project": "my-project",
32         "projectName": "MyProject",
33         "q": "FIL",
34         "uuid": "foo-bar",
35       }
36     }
37   />
38   <DeferredSpinner
39     loading={false}
40     timeout={100}
41   />
42 </div>
43 `;
44
45 exports[`should render correctly: with sourcelines 1`] = `
46 <div
47   className="bordered big-spacer-bottom"
48 >
49   <SourceViewerHeaderSlim
50     branchLike={
51       Object {
52         "analysisDate": "2018-01-01",
53         "excludedFromPurge": true,
54         "isMain": true,
55         "name": "master",
56       }
57     }
58     displayProjectName={true}
59     expandable={false}
60     linkToProject={false}
61     loading={false}
62     onExpand={[Function]}
63     sourceViewerFile={
64       Object {
65         "key": "foo",
66         "measures": Object {
67           "coverage": "85.2",
68           "duplicationDensity": "1.0",
69           "issues": "12",
70           "lines": "56",
71         },
72         "path": "foo/bar.ts",
73         "project": "my-project",
74         "projectName": "MyProject",
75         "q": "FIL",
76         "uuid": "foo-bar",
77       }
78     }
79   />
80   <DeferredSpinner
81     loading={false}
82     timeout={100}
83   >
84     <ContextProvider
85       value={
86         Object {
87           "branchLike": Object {
88             "analysisDate": "2018-01-01",
89             "excludedFromPurge": true,
90             "isMain": true,
91             "name": "master",
92           },
93           "file": Object {
94             "key": "foo",
95             "measures": Object {
96               "coverage": "85.2",
97               "duplicationDensity": "1.0",
98               "issues": "12",
99               "lines": "56",
100             },
101             "path": "foo/bar.ts",
102             "project": "my-project",
103             "projectName": "MyProject",
104             "q": "FIL",
105             "uuid": "foo-bar",
106           },
107         }
108       }
109     >
110       <SnippetViewer
111         branchLike={
112           Object {
113             "analysisDate": "2018-01-01",
114             "excludedFromPurge": true,
115             "isMain": true,
116             "name": "master",
117           }
118         }
119         component={
120           Object {
121             "key": "foo",
122             "measures": Object {
123               "coverage": "85.2",
124               "duplicationDensity": "1.0",
125               "issues": "12",
126               "lines": "56",
127             },
128             "path": "foo/bar.ts",
129             "project": "my-project",
130             "projectName": "MyProject",
131             "q": "FIL",
132             "uuid": "foo-bar",
133           }
134         }
135         displaySCM={false}
136         expandBlock={[Function]}
137         handleCloseIssues={[Function]}
138         handleLinePopupToggle={[MockFunction]}
139         handleOpenIssues={[Function]}
140         handleSymbolClick={[MockFunction]}
141         highlightedSymbols={Array []}
142         index={0}
143         issue={
144           Object {
145             "assignee": "assignee",
146             "assigneeUser": Object {
147               "active": true,
148               "local": true,
149               "login": "assignee",
150               "name": "John Doe",
151             },
152             "author": "author",
153             "authorUser": Object {
154               "active": true,
155               "local": true,
156               "login": "author",
157               "name": "John Doe",
158             },
159             "canChangeStatus": true,
160             "changelog": Array [],
161             "comment": Array [],
162             "component": Object {
163               "breadcrumbs": Array [],
164               "key": "my-project",
165               "name": "MyProject",
166               "organization": "foo",
167               "qualifier": "FIL",
168               "qualityGate": Object {
169                 "isDefault": true,
170                 "key": "30",
171                 "name": "Sonar way",
172               },
173               "qualityProfiles": Array [
174                 Object {
175                   "deleted": false,
176                   "key": "my-qp",
177                   "language": "ts",
178                   "name": "Sonar way",
179                 },
180               ],
181               "tags": Array [],
182             },
183             "creationDate": "2013-05-13T17:55:41+0200",
184             "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
185             "line": 142,
186             "message": "'3' is a magic number.",
187             "project": Object {
188               "breadcrumbs": Array [],
189               "key": "my-project",
190               "name": "MyProject",
191               "organization": "foo",
192               "qualifier": "TRK",
193               "qualityGate": Object {
194                 "isDefault": true,
195                 "key": "30",
196                 "name": "Sonar way",
197               },
198               "qualityProfiles": Array [
199                 Object {
200                   "deleted": false,
201                   "key": "my-qp",
202                   "language": "ts",
203                   "name": "Sonar way",
204                 },
205               ],
206               "tags": Array [],
207             },
208             "resolution": "FIXED",
209             "rule": Object {
210               "fixRecommendations": "<p>This a <strong>strong</strong> message about fixing !</p>",
211               "key": "squid:S2077",
212               "name": "That rule",
213               "riskDescription": "<p>This a <strong>strong</strong> message about risk !</p>",
214               "securityCategory": "sql-injection",
215               "vulnerabilityDescription": "<p>This a <strong>strong</strong> message about vulnerability !</p>",
216               "vulnerabilityProbability": "HIGH",
217             },
218             "status": "REVIEWED",
219             "textRange": Object {
220               "endLine": 142,
221               "endOffset": 83,
222               "startLine": 142,
223               "startOffset": 26,
224             },
225             "updateDate": "2013-05-13T17:55:42+0200",
226             "users": Array [
227               Object {
228                 "active": true,
229                 "local": true,
230                 "login": "assignee",
231                 "name": "John Doe",
232               },
233               Object {
234                 "active": true,
235                 "local": true,
236                 "login": "author",
237                 "name": "John Doe",
238               },
239             ],
240           }
241         }
242         issuesByLine={Object {}}
243         lastSnippetOfLastGroup={false}
244         loadDuplications={[Function]}
245         locations={Array []}
246         locationsByLine={Object {}}
247         onIssueChange={[Function]}
248         onIssuePopupToggle={[Function]}
249         onLocationSelect={[Function]}
250         openIssuesByLine={Object {}}
251         renderDuplicationPopup={[Function]}
252         snippet={
253           Array [
254             Object {
255               "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
256               "coverageStatus": "covered",
257               "coveredConditions": 2,
258               "duplicated": false,
259               "isNew": true,
260               "line": 16,
261               "scmAuthor": "simon.brandhof@sonarsource.com",
262               "scmDate": "2018-12-11T10:48:39+0100",
263               "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
264             },
265           ]
266         }
267       />
268     </ContextProvider>
269   </DeferredSpinner>
270 </div>
271 `;