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