]> source.dussan.org Git - sonarqube.git/blob
a4c84ff6a85043a630c9c100dee459a7719636ed
[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     timeout={100}
22   />
23 </div>
24 `;
25
26 exports[`should render correctly 2`] = `
27 <div>
28   <ContextProvider
29     key="1-0-0"
30     value={
31       Object {
32         "branchLike": undefined,
33         "file": Object {
34           "key": "main.js",
35           "measures": Object {
36             "coverage": "85.2",
37             "duplicationDensity": "1.0",
38             "issues": "12",
39             "lines": "56",
40           },
41           "path": "main.js",
42           "project": "my-project",
43           "projectName": "MyProject",
44           "q": "FIL",
45           "uuid": "foo-bar",
46         },
47       }
48     }
49   >
50     <ComponentSourceSnippetGroupViewer
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           "organization": "myorg",
115           "project": "myproject",
116           "projectKey": "foo",
117           "projectName": "Foo",
118           "projectOrganization": "org",
119           "rule": "javascript:S1067",
120           "ruleName": "foo",
121           "secondaryLocations": Array [
122             Object {
123               "component": "main.js",
124               "textRange": Object {
125                 "endLine": 2,
126                 "endOffset": 2,
127                 "startLine": 1,
128                 "startOffset": 1,
129               },
130             },
131             Object {
132               "component": "main.js",
133               "textRange": Object {
134                 "endLine": 2,
135                 "endOffset": 2,
136                 "startLine": 1,
137                 "startOffset": 1,
138               },
139             },
140           ],
141           "severity": "MAJOR",
142           "status": "OPEN",
143           "textRange": Object {
144             "endLine": 26,
145             "endOffset": 15,
146             "startLine": 25,
147             "startOffset": 0,
148           },
149           "transitions": Array [],
150           "type": "BUG",
151         }
152       }
153       issuesByLine={Object {}}
154       lastSnippetGroup={true}
155       loadDuplications={[Function]}
156       locations={
157         Array [
158           Object {
159             "component": "main.js",
160             "index": 0,
161             "textRange": Object {
162               "endLine": 2,
163               "endOffset": 2,
164               "startLine": 1,
165               "startOffset": 1,
166             },
167           },
168         ]
169       }
170       onIssueChange={[MockFunction]}
171       onIssuePopupToggle={[Function]}
172       onLinePopupToggle={[Function]}
173       onLocationSelect={[MockFunction]}
174       renderDuplicationPopup={[Function]}
175       scroll={[MockFunction]}
176       snippetGroup={
177         Object {
178           "component": Object {
179             "key": "main.js",
180             "measures": Object {
181               "coverage": "85.2",
182               "duplicationDensity": "1.0",
183               "issues": "12",
184               "lines": "56",
185             },
186             "path": "main.js",
187             "project": "my-project",
188             "projectName": "MyProject",
189             "q": "FIL",
190             "uuid": "foo-bar",
191           },
192           "locations": Array [
193             Object {
194               "component": "main.js",
195               "index": 0,
196               "textRange": Object {
197                 "endLine": 2,
198                 "endOffset": 2,
199                 "startLine": 1,
200                 "startOffset": 1,
201               },
202             },
203           ],
204           "sources": Object {
205             "16": Object {
206               "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
207               "coverageStatus": "covered",
208               "coveredConditions": 2,
209               "duplicated": false,
210               "isNew": true,
211               "line": 16,
212               "scmAuthor": "simon.brandhof@sonarsource.com",
213               "scmDate": "2018-12-11T10:48:39+0100",
214               "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
215             },
216           },
217         }
218       }
219     />
220   </ContextProvider>
221 </div>
222 `;