]> source.dussan.org Git - sonarqube.git/blob
002e5241a1591d5c9fb2721c05d5db749332a038
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly: default 1`] = `
4 <div>
5   <div
6     className="layout-page-header-panel layout-page-main-header"
7   >
8     <A11ySkipTarget
9       anchor="measures_main"
10     />
11     <div
12       className="layout-page-header-panel-inner layout-page-main-header-inner"
13     >
14       <div
15         className="layout-page-main-inner"
16       >
17         <MeasureContentHeader
18           left={
19             <Breadcrumbs
20               backToFirst={true}
21               className="text-ellipsis"
22               component={
23                 {
24                   "key": "foo",
25                   "measures": [
26                     {
27                       "bestValue": false,
28                       "metric": "bugs",
29                       "value": "12",
30                     },
31                   ],
32                   "name": "Foo",
33                   "qualifier": "TRK",
34                 }
35               }
36               handleSelect={[MockFunction]}
37               rootComponent={
38                 {
39                   "key": "foo",
40                   "measures": [
41                     {
42                       "bestValue": false,
43                       "metric": "bugs",
44                       "value": "12",
45                     },
46                   ],
47                   "name": "Foo",
48                   "qualifier": "TRK",
49                 }
50               }
51             />
52           }
53           right={
54             <PageActions
55               componentQualifier="TRK"
56               current={0}
57             />
58           }
59         />
60       </div>
61     </div>
62   </div>
63   <div
64     className="layout-page-main-inner measure-details-content"
65   >
66     <div
67       className="clearfix big-spacer-bottom"
68     />
69     <DeferredSpinner
70       loading={false}
71     />
72     <BubbleChart
73       componentKey="foo"
74       components={[]}
75       domain="Reliability"
76       metrics={
77         {
78           "bugs": {
79             "id": "bugs",
80             "key": "bugs",
81             "name": "bugs",
82             "type": "INT",
83           },
84           "ncloc": {
85             "id": "ncloc",
86             "key": "ncloc",
87             "name": "ncloc",
88             "type": "INT",
89           },
90           "reliability_rating": {
91             "id": "reliability_rating",
92             "key": "reliability_rating",
93             "name": "reliability_rating",
94             "type": "DATA",
95           },
96           "reliability_remediation_effort": {
97             "id": "reliability_remediation_effort",
98             "key": "reliability_remediation_effort",
99             "name": "reliability_remediation_effort",
100             "type": "INT",
101           },
102         }
103       }
104       updateSelected={[MockFunction]}
105     />
106   </div>
107 </div>
108 `;
109
110 exports[`should render correctly: has leak period 1`] = `
111 <div>
112   <div
113     className="layout-page-header-panel layout-page-main-header"
114   >
115     <A11ySkipTarget
116       anchor="measures_main"
117     />
118     <div
119       className="layout-page-header-panel-inner layout-page-main-header-inner"
120     >
121       <div
122         className="layout-page-main-inner"
123       >
124         <MeasureContentHeader
125           left={
126             <Breadcrumbs
127               backToFirst={true}
128               branchLike={
129                 {
130                   "analysisDate": "2018-01-01",
131                   "excludedFromPurge": true,
132                   "isMain": false,
133                   "name": "branch-6.7",
134                 }
135               }
136               className="text-ellipsis"
137               component={
138                 {
139                   "key": "foo",
140                   "measures": [
141                     {
142                       "bestValue": false,
143                       "metric": "bugs",
144                       "value": "12",
145                     },
146                   ],
147                   "name": "Foo",
148                   "qualifier": "TRK",
149                 }
150               }
151               handleSelect={[MockFunction]}
152               rootComponent={
153                 {
154                   "key": "foo",
155                   "measures": [
156                     {
157                       "bestValue": false,
158                       "metric": "bugs",
159                       "value": "12",
160                     },
161                   ],
162                   "name": "Foo",
163                   "qualifier": "TRK",
164                 }
165               }
166             />
167           }
168           right={
169             <PageActions
170               componentQualifier="TRK"
171               current={0}
172             />
173           }
174         />
175       </div>
176     </div>
177   </div>
178   <div
179     className="layout-page-main-inner measure-details-content"
180   >
181     <div
182       className="clearfix big-spacer-bottom"
183     >
184       <injectIntl(LeakPeriodLegend)
185         className="pull-right"
186         component={
187           {
188             "key": "foo",
189             "measures": [
190               {
191                 "bestValue": false,
192                 "metric": "bugs",
193                 "value": "12",
194               },
195             ],
196             "name": "Foo",
197             "qualifier": "TRK",
198           }
199         }
200         period={
201           {
202             "date": "2019-04-23T02:12:32+0100",
203             "index": 0,
204             "mode": "previous_version",
205           }
206         }
207       />
208     </div>
209     <DeferredSpinner
210       loading={false}
211     />
212     <BubbleChart
213       branchLike={
214         {
215           "analysisDate": "2018-01-01",
216           "excludedFromPurge": true,
217           "isMain": false,
218           "name": "branch-6.7",
219         }
220       }
221       componentKey="foo"
222       components={[]}
223       domain="Reliability"
224       metrics={
225         {
226           "bugs": {
227             "id": "bugs",
228             "key": "bugs",
229             "name": "bugs",
230             "type": "INT",
231           },
232           "ncloc": {
233             "id": "ncloc",
234             "key": "ncloc",
235             "name": "ncloc",
236             "type": "INT",
237           },
238           "reliability_rating": {
239             "id": "reliability_rating",
240             "key": "reliability_rating",
241             "name": "reliability_rating",
242             "type": "DATA",
243           },
244           "reliability_remediation_effort": {
245             "id": "reliability_remediation_effort",
246             "key": "reliability_remediation_effort",
247             "name": "reliability_remediation_effort",
248             "type": "INT",
249           },
250         }
251       }
252       updateSelected={[MockFunction]}
253     />
254   </div>
255 </div>
256 `;
257
258 exports[`should render correctly: is file 1`] = `
259 <div>
260   <div
261     className="layout-page-header-panel layout-page-main-header"
262   >
263     <A11ySkipTarget
264       anchor="measures_main"
265     />
266     <div
267       className="layout-page-header-panel-inner layout-page-main-header-inner"
268     >
269       <div
270         className="layout-page-main-inner"
271       >
272         <MeasureContentHeader
273           left={
274             <Breadcrumbs
275               backToFirst={true}
276               className="text-ellipsis"
277               component={
278                 {
279                   "key": "foo:src/index.tsx",
280                   "measures": [
281                     {
282                       "bestValue": false,
283                       "metric": "bugs",
284                       "value": "1",
285                     },
286                   ],
287                   "name": "index.tsx",
288                   "path": "src/index.tsx",
289                   "qualifier": "FIL",
290                 }
291               }
292               handleSelect={[MockFunction]}
293               rootComponent={
294                 {
295                   "key": "foo",
296                   "measures": [
297                     {
298                       "bestValue": false,
299                       "metric": "bugs",
300                       "value": "12",
301                     },
302                   ],
303                   "name": "Foo",
304                   "qualifier": "TRK",
305                 }
306               }
307             />
308           }
309           right={
310             <PageActions
311               componentQualifier="TRK"
312               current={0}
313             />
314           }
315         />
316       </div>
317     </div>
318   </div>
319   <div
320     className="layout-page-main-inner measure-details-content"
321   >
322     <div
323       className="clearfix big-spacer-bottom"
324     />
325     <DeferredSpinner
326       loading={false}
327     />
328     <div
329       className="measure-details-viewer"
330     >
331       <SourceViewer
332         component="foo:src/index.tsx"
333         displayAllIssues={false}
334         displayIssueLocationsCount={true}
335         displayIssueLocationsLink={true}
336         displayLocationMarkers={true}
337       />
338     </div>
339   </div>
340 </div>
341 `;
342
343 exports[`should render correctly: loading 1`] = `
344 <div>
345   <div
346     className="layout-page-header-panel layout-page-main-header"
347   >
348     <A11ySkipTarget
349       anchor="measures_main"
350     />
351     <div
352       className="layout-page-header-panel-inner layout-page-main-header-inner"
353     >
354       <div
355         className="layout-page-main-inner"
356       >
357         <MeasureContentHeader
358           left={
359             <Breadcrumbs
360               backToFirst={true}
361               className="text-ellipsis"
362               component={
363                 {
364                   "key": "foo",
365                   "measures": [
366                     {
367                       "bestValue": false,
368                       "metric": "bugs",
369                       "value": "12",
370                     },
371                   ],
372                   "name": "Foo",
373                   "qualifier": "TRK",
374                 }
375               }
376               handleSelect={[MockFunction]}
377               rootComponent={
378                 {
379                   "key": "foo",
380                   "measures": [
381                     {
382                       "bestValue": false,
383                       "metric": "bugs",
384                       "value": "12",
385                     },
386                   ],
387                   "name": "Foo",
388                   "qualifier": "TRK",
389                 }
390               }
391             />
392           }
393           right={
394             <PageActions
395               componentQualifier="TRK"
396               current={0}
397             />
398           }
399         />
400       </div>
401     </div>
402   </div>
403   <div
404     className="layout-page-main-inner measure-details-content"
405   >
406     <div
407       className="clearfix big-spacer-bottom"
408     />
409     <DeferredSpinner
410       loading={true}
411     />
412   </div>
413 </div>
414 `;