]> source.dussan.org Git - sonarqube.git/blob
609f69f5ca913b2e66b50d35754ad7f619c4abef
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly 1`] = `
4 <div
5   className="overview-panel big-spacer-top"
6   data-test="overview__activity-panel"
7 >
8   <h2
9     className="overview-panel-title"
10   >
11     overview.activity
12   </h2>
13   <div
14     className="overview-panel-content"
15   >
16     <div
17       className="display-flex-row"
18     >
19       <div
20         className="display-flex-column flex-1"
21       >
22         <div
23           className="overview-panel-padded display-flex-column flex-1"
24         >
25           <GraphsHeader
26             graph="issues"
27             metrics={
28               [
29                 {
30                   "id": "bugs",
31                   "key": "bugs",
32                   "name": "bugs",
33                   "type": "PERCENT",
34                 },
35               ]
36             }
37             updateGraph={[MockFunction]}
38           />
39           <GraphsHistory
40             analyses={[]}
41             ariaLabel="overview.activity.graph_shows_data_for_x.metric.bugs.name, metric.code_smells.name, metric.vulnerabilities.name"
42             canShowDataAsTable={false}
43             graph="issues"
44             graphs={
45               [
46                 [
47                   {
48                     "data": [
49                       {
50                         "x": 2016-10-27T14:33:50.000Z,
51                         "y": 20,
52                       },
53                     ],
54                     "name": "bugs",
55                     "translatedName": "bugs",
56                     "type": "PERCENT",
57                   },
58                 ],
59               ]
60             }
61             loading={false}
62             measuresHistory={
63               [
64                 {
65                   "bestValue": true,
66                   "history": [
67                     {
68                       "date": 2016-10-27T14:33:50.000Z,
69                       "value": "20",
70                     },
71                   ],
72                   "metric": "bugs",
73                   "period": {
74                     "bestValue": true,
75                     "index": 1,
76                     "value": "1.0",
77                   },
78                   "value": "1.0",
79                 },
80               ]
81             }
82             series={
83               [
84                 {
85                   "data": [
86                     {
87                       "x": 2016-10-27T14:33:50.000Z,
88                       "y": 20,
89                     },
90                   ],
91                   "name": "bugs",
92                   "translatedName": "bugs",
93                   "type": "PERCENT",
94                 },
95               ]
96             }
97           />
98         </div>
99         <div
100           className="overview-panel-padded bordered-top text-right"
101         >
102           <ActivityLink
103             branchLike={
104               {
105                 "analysisDate": "2018-01-01",
106                 "excludedFromPurge": true,
107                 "isMain": true,
108                 "name": "master",
109               }
110             }
111             component="my-project"
112             graph="issues"
113           />
114         </div>
115       </div>
116       <div
117         className="overview-panel-padded bordered-left width-30"
118       >
119         <div
120           data-test="overview__activity-analyses"
121         >
122           <DeferredSpinner
123             className="spacer-top spacer-left"
124             loading={false}
125           >
126             <ul
127               className="spacer-top spacer-left"
128             >
129               <Memo(Analysis)
130                 analysis={
131                   {
132                     "date": "2017-03-01T09:36:01+0100",
133                     "events": [
134                       {
135                         "category": "QUALITY_GATE",
136                         "description": "Lorem ipsum dolor sit amet",
137                         "key": "E11",
138                         "name": "Lorem ipsum",
139                         "qualityGate": {
140                           "failing": [
141                             {
142                               "branch": "master",
143                               "key": "foo",
144                               "name": "Foo",
145                             },
146                             {
147                               "branch": "feature/bar",
148                               "key": "bar",
149                               "name": "Bar",
150                             },
151                           ],
152                           "status": "ERROR",
153                           "stillFailing": true,
154                         },
155                       },
156                     ],
157                     "key": "foo",
158                     "projectVersion": "1.0",
159                   }
160                 }
161                 key="foo"
162                 qualifier="TRK"
163               />
164             </ul>
165           </DeferredSpinner>
166         </div>
167       </div>
168     </div>
169   </div>
170 </div>
171 `;
172
173 exports[`should render correctly 2`] = `
174 <div
175   className="overview-panel big-spacer-top"
176   data-test="overview__activity-panel"
177 >
178   <h2
179     className="overview-panel-title"
180   >
181     overview.activity
182   </h2>
183   <div
184     className="overview-panel-content"
185   >
186     <div
187       className="display-flex-row"
188     >
189       <div
190         className="display-flex-column flex-1"
191       >
192         <div
193           className="overview-panel-padded display-flex-column flex-1"
194         >
195           <GraphsHeader
196             graph="issues"
197             metrics={
198               [
199                 {
200                   "id": "bugs",
201                   "key": "bugs",
202                   "name": "bugs",
203                   "type": "PERCENT",
204                 },
205               ]
206             }
207             updateGraph={[MockFunction]}
208           />
209           <GraphsHistory
210             analyses={[]}
211             ariaLabel="overview.activity.graph_shows_data_for_x.metric.bugs.name, metric.code_smells.name, metric.vulnerabilities.name"
212             canShowDataAsTable={false}
213             graph="issues"
214             graphs={
215               [
216                 [
217                   {
218                     "data": [
219                       {
220                         "x": 2016-10-27T14:33:50.000Z,
221                         "y": 20,
222                       },
223                     ],
224                     "name": "bugs",
225                     "translatedName": "bugs",
226                     "type": "PERCENT",
227                   },
228                 ],
229               ]
230             }
231             loading={true}
232             measuresHistory={
233               [
234                 {
235                   "bestValue": true,
236                   "history": [
237                     {
238                       "date": 2016-10-27T14:33:50.000Z,
239                       "value": "20",
240                     },
241                   ],
242                   "metric": "bugs",
243                   "period": {
244                     "bestValue": true,
245                     "index": 1,
246                     "value": "1.0",
247                   },
248                   "value": "1.0",
249                 },
250               ]
251             }
252             series={
253               [
254                 {
255                   "data": [
256                     {
257                       "x": 2016-10-27T14:33:50.000Z,
258                       "y": 20,
259                     },
260                   ],
261                   "name": "bugs",
262                   "translatedName": "bugs",
263                   "type": "PERCENT",
264                 },
265               ]
266             }
267           />
268         </div>
269         <div
270           className="overview-panel-padded bordered-top text-right"
271         >
272           <ActivityLink
273             branchLike={
274               {
275                 "analysisDate": "2018-01-01",
276                 "excludedFromPurge": true,
277                 "isMain": true,
278                 "name": "master",
279               }
280             }
281             component="my-project"
282             graph="issues"
283           />
284         </div>
285       </div>
286       <div
287         className="overview-panel-padded bordered-left width-30"
288       >
289         <div
290           data-test="overview__activity-analyses"
291         >
292           <DeferredSpinner
293             className="spacer-top spacer-left"
294             loading={true}
295           >
296             <p
297               className="spacer-top spacer-left note"
298             >
299               no_results
300             </p>
301           </DeferredSpinner>
302         </div>
303       </div>
304     </div>
305   </div>
306 </div>
307 `;