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