]> source.dussan.org Git - sonarqube.git/blob
3d4be8af2fadcf66cf25cad03c88e742e962802e
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly the graph and legends 1`] = `
4 <div
5   className="project-activity-layout-page-main-inner boxed-group boxed-group-inner"
6 >
7   <ProjectActivityGraphsHeader
8     addCustomMetric={[Function]}
9     graph="overview"
10     metrics={
11       Array [
12         Object {
13           "key": "code_smells",
14           "name": "Code Smells",
15           "type": "INT",
16         },
17       ]
18     }
19     metricsTypeFilter={null}
20     updateGraph={[Function]}
21   />
22   <GraphsHistory
23     analyses={
24       Array [
25         Object {
26           "date": "2016-10-27T16:33:50+0200",
27           "events": Array [
28             Object {
29               "category": "VERSION",
30               "key": "E1",
31               "name": "6.5-SNAPSHOT",
32             },
33           ],
34           "key": "A1",
35         },
36         Object {
37           "date": "2016-10-27T12:21:15+0200",
38           "events": Array [],
39           "key": "A2",
40         },
41         Object {
42           "date": "2016-10-26T12:17:29+0200",
43           "events": Array [
44             Object {
45               "category": "VERSION",
46               "key": "E2",
47               "name": "6.4",
48             },
49             Object {
50               "category": "OTHER",
51               "key": "E3",
52               "name": "foo",
53             },
54           ],
55           "key": "A3",
56         },
57       ]
58     }
59     eventFilter=""
60     graph="overview"
61     graphEndDate={null}
62     graphStartDate={null}
63     leakPeriodDate="2017-05-16T13:50:02+0200"
64     measuresHistory={
65       Array [
66         Object {
67           "history": Array [
68             Object {
69               "date": 2016-10-26T10:17:29.000Z,
70               "value": "2286",
71             },
72             Object {
73               "date": 2016-10-27T10:21:15.000Z,
74               "value": "1749",
75             },
76             Object {
77               "date": 2016-10-27T14:33:50.000Z,
78               "value": "500",
79             },
80           ],
81           "metric": "code_smells",
82         },
83       ]
84     }
85     metricsType="INT"
86     removeCustomMetric={[Function]}
87     series={
88       Array [
89         Object {
90           "data": Array [
91             Object {
92               "x": 2016-10-26T10:17:29.000Z,
93               "y": 2286,
94             },
95             Object {
96               "x": 2016-10-27T10:21:15.000Z,
97               "y": 1749,
98             },
99             Object {
100               "x": 2016-10-27T14:33:50.000Z,
101               "y": 500,
102             },
103           ],
104           "name": "code_smells",
105           "translatedName": "Code Smells",
106           "type": "INT",
107         },
108       ]
109     }
110     updateGraphZoom={[Function]}
111     updateSelectedDate={[Function]}
112   />
113   <GraphsZoom
114     graphEndDate={null}
115     graphStartDate={null}
116     leakPeriodDate="2017-05-16T13:50:02+0200"
117     loading={false}
118     metricsType="INT"
119     series={
120       Array [
121         Object {
122           "data": Array [
123             Object {
124               "x": 2016-10-26T10:17:29.000Z,
125               "y": 2286,
126             },
127             Object {
128               "x": 2016-10-27T10:21:15.000Z,
129               "y": 1749,
130             },
131             Object {
132               "x": 2016-10-27T14:33:50.000Z,
133               "y": 500,
134             },
135           ],
136           "name": "code_smells",
137           "translatedName": "Code Smells",
138           "type": "INT",
139         },
140       ]
141     }
142     showAreas={false}
143     updateGraphZoom={[Function]}
144   />
145 </div>
146 `;
147
148 exports[`should render correctly with filter history on dates 1`] = `
149 Object {
150   "graphEndDate": null,
151   "graphStartDate": "2016-10-27T12:21:15+0200",
152   "graphs": Array [
153     Array [
154       Object {
155         "data": Array [
156           Object {
157             "x": 2016-10-26T10:17:29.000Z,
158             "y": 2286,
159           },
160           Object {
161             "x": 2016-10-27T10:21:15.000Z,
162             "y": 1749,
163           },
164           Object {
165             "x": 2016-10-27T14:33:50.000Z,
166             "y": 500,
167           },
168         ],
169         "name": "code_smells",
170         "translatedName": "Code Smells",
171         "type": "INT",
172       },
173     ],
174   ],
175   "series": Array [
176     Object {
177       "data": Array [
178         Object {
179           "x": 2016-10-26T10:17:29.000Z,
180           "y": 2286,
181         },
182         Object {
183           "x": 2016-10-27T10:21:15.000Z,
184           "y": 1749,
185         },
186         Object {
187           "x": 2016-10-27T14:33:50.000Z,
188           "y": 500,
189         },
190       ],
191       "name": "code_smells",
192       "translatedName": "Code Smells",
193       "type": "INT",
194     },
195   ],
196 }
197 `;
198
199 exports[`should show that there is no history data 1`] = `
200 <div
201   className="project-activity-layout-page-main-inner boxed-group boxed-group-inner"
202 >
203   <ProjectActivityGraphsHeader
204     addCustomMetric={[Function]}
205     graph="overview"
206     metrics={
207       Array [
208         Object {
209           "key": "code_smells",
210           "name": "Code Smells",
211           "type": "INT",
212         },
213       ]
214     }
215     metricsTypeFilter={null}
216     updateGraph={[Function]}
217   />
218   <div
219     className="project-activity-graph-container"
220   >
221     <div
222       className="note text-center"
223     >
224       component_measures.no_history
225     </div>
226   </div>
227   <GraphsZoom
228     graphEndDate={null}
229     graphStartDate={null}
230     leakPeriodDate="2017-05-16T13:50:02+0200"
231     loading={false}
232     metricsType="INT"
233     series={
234       Array [
235         Object {
236           "data": Array [],
237           "name": "code_smells",
238           "translatedName": "Code Smells",
239           "type": "INT",
240         },
241       ]
242     }
243     showAreas={false}
244     updateGraphZoom={[Function]}
245   />
246 </div>
247 `;
248
249 exports[`should show that there is no history data 2`] = `
250 <div
251   className="project-activity-layout-page-main-inner boxed-group boxed-group-inner"
252 >
253   <ProjectActivityGraphsHeader
254     addCustomMetric={[Function]}
255     graph="custom"
256     metrics={
257       Array [
258         Object {
259           "key": "code_smells",
260           "name": "Code Smells",
261           "type": "INT",
262         },
263       ]
264     }
265     metricsTypeFilter={null}
266     selectedMetrics={
267       Array [
268         "code_smells",
269       ]
270     }
271     updateGraph={[Function]}
272   />
273   <div
274     className="project-activity-graph-container"
275   >
276     <div
277       className="note text-center"
278     >
279       project_activity.graphs.custom.no_history
280     </div>
281   </div>
282   <GraphsZoom
283     graphEndDate={null}
284     graphStartDate={null}
285     leakPeriodDate="2017-05-16T13:50:02+0200"
286     loading={false}
287     metricsType="INT"
288     series={
289       Array [
290         Object {
291           "data": Array [
292             Object {
293               "x": 2016-10-26T10:17:29.000Z,
294               "y": NaN,
295             },
296           ],
297           "name": "code_smells",
298           "translatedName": "Code Smells",
299           "type": "INT",
300         },
301       ]
302     }
303     showAreas={false}
304     updateGraphZoom={[Function]}
305   />
306 </div>
307 `;