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