]> source.dussan.org Git - sonarqube.git/blob
293440a0cfb0b4be419edbbd9664c61be651da37
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly for applications 1`] = `
4 <div
5   className="overview-panel"
6   data-test="overview__quality-gate-panel"
7 >
8   <div
9     className="display-flex-center spacer-bottom"
10   >
11     <h2
12       className="overview-panel-title null-spacer-bottom"
13     >
14       overview.quality_gate
15        
16     </h2>
17     <HelpTooltip
18       className="little-spacer-left"
19       overlay={
20         <div
21           className="big-padded-top big-padded-bottom"
22         >
23           overview.quality_gate.help
24         </div>
25       }
26     />
27   </div>
28   <div>
29     <div
30       className="overview-quality-gate-badge-large failed"
31     >
32       <div
33         className="big-spacer-bottom huge h3"
34       >
35         metric.level.ERROR
36       </div>
37       <span
38         className="small"
39       >
40         overview.X_conditions_failed.3
41       </span>
42     </div>
43     <div
44       data-test="overview__quality-gate-conditions"
45     >
46       <Memo(QualityGatePanelSection)
47         component={
48           {
49             "breadcrumbs": [],
50             "key": "my-project",
51             "name": "MyProject",
52             "qualifier": "APP",
53             "qualityGate": {
54               "isDefault": true,
55               "key": "30",
56               "name": "Sonar way",
57             },
58             "qualityProfiles": [
59               {
60                 "deleted": false,
61                 "key": "my-qp",
62                 "language": "ts",
63                 "name": "Sonar way",
64               },
65             ],
66             "tags": [],
67           }
68         }
69         key="foo"
70         qgStatus={
71           {
72             "caycStatus": "compliant",
73             "failedConditions": [
74               {
75                 "actual": "10",
76                 "error": "0",
77                 "level": "ERROR",
78                 "measure": {
79                   "bestValue": true,
80                   "leak": "1",
81                   "metric": {
82                     "id": "coverage",
83                     "key": "coverage",
84                     "name": "coverage",
85                     "type": "PERCENT",
86                   },
87                   "period": {
88                     "bestValue": true,
89                     "index": 1,
90                     "value": "1.0",
91                   },
92                   "value": "1.0",
93                 },
94                 "metric": "foo",
95                 "op": "GT",
96               },
97             ],
98             "ignoredConditions": false,
99             "key": "foo",
100             "name": "Foo",
101             "status": "ERROR",
102           }
103         }
104       />
105       <Memo(QualityGatePanelSection)
106         component={
107           {
108             "breadcrumbs": [],
109             "key": "my-project",
110             "name": "MyProject",
111             "qualifier": "APP",
112             "qualityGate": {
113               "isDefault": true,
114               "key": "30",
115               "name": "Sonar way",
116             },
117             "qualityProfiles": [
118               {
119                 "deleted": false,
120                 "key": "my-qp",
121                 "language": "ts",
122                 "name": "Sonar way",
123               },
124             ],
125             "tags": [],
126           }
127         }
128         key="foo"
129         qgStatus={
130           {
131             "caycStatus": "compliant",
132             "failedConditions": [
133               {
134                 "actual": "10",
135                 "error": "0",
136                 "level": "ERROR",
137                 "measure": {
138                   "bestValue": true,
139                   "leak": "1",
140                   "metric": {
141                     "id": "coverage",
142                     "key": "coverage",
143                     "name": "coverage",
144                     "type": "PERCENT",
145                   },
146                   "period": {
147                     "bestValue": true,
148                     "index": 1,
149                     "value": "1.0",
150                   },
151                   "value": "1.0",
152                 },
153                 "metric": "foo",
154                 "op": "GT",
155               },
156               {
157                 "actual": "10",
158                 "error": "0",
159                 "level": "ERROR",
160                 "measure": {
161                   "bestValue": true,
162                   "leak": "1",
163                   "metric": {
164                     "id": "new_code_smells",
165                     "key": "new_code_smells",
166                     "name": "new_code_smells",
167                     "type": "PERCENT",
168                   },
169                   "period": {
170                     "bestValue": true,
171                     "index": 1,
172                     "value": "1.0",
173                   },
174                   "value": "1.0",
175                 },
176                 "metric": "new_code_smells",
177                 "op": "GT",
178               },
179             ],
180             "ignoredConditions": false,
181             "key": "foo",
182             "name": "Foo",
183             "status": "ERROR",
184           }
185         }
186       />
187     </div>
188   </div>
189   <withCurrentUserContext(SonarLintPromotion)
190     qgConditions={
191       [
192         {
193           "actual": "10",
194           "error": "0",
195           "level": "ERROR",
196           "measure": {
197             "bestValue": true,
198             "leak": "1",
199             "metric": {
200               "id": "coverage",
201               "key": "coverage",
202               "name": "coverage",
203               "type": "PERCENT",
204             },
205             "period": {
206               "bestValue": true,
207               "index": 1,
208               "value": "1.0",
209             },
210             "value": "1.0",
211           },
212           "metric": "foo",
213           "op": "GT",
214         },
215         {
216           "actual": "10",
217           "error": "0",
218           "level": "ERROR",
219           "measure": {
220             "bestValue": true,
221             "leak": "1",
222             "metric": {
223               "id": "coverage",
224               "key": "coverage",
225               "name": "coverage",
226               "type": "PERCENT",
227             },
228             "period": {
229               "bestValue": true,
230               "index": 1,
231               "value": "1.0",
232             },
233             "value": "1.0",
234           },
235           "metric": "foo",
236           "op": "GT",
237         },
238         {
239           "actual": "10",
240           "error": "0",
241           "level": "ERROR",
242           "measure": {
243             "bestValue": true,
244             "leak": "1",
245             "metric": {
246               "id": "new_code_smells",
247               "key": "new_code_smells",
248               "name": "new_code_smells",
249               "type": "PERCENT",
250             },
251             "period": {
252               "bestValue": true,
253               "index": 1,
254               "value": "1.0",
255             },
256             "value": "1.0",
257           },
258           "metric": "new_code_smells",
259           "op": "GT",
260         },
261       ]
262     }
263   />
264 </div>
265 `;
266
267 exports[`should render correctly for applications 2`] = `
268 <div
269   className="overview-panel"
270   data-test="overview__quality-gate-panel"
271 >
272   <div
273     className="display-flex-center spacer-bottom"
274   >
275     <h2
276       className="overview-panel-title null-spacer-bottom"
277     >
278       overview.quality_gate
279        
280     </h2>
281     <HelpTooltip
282       className="little-spacer-left"
283       overlay={
284         <div
285           className="big-padded-top big-padded-bottom"
286         >
287           overview.quality_gate.help
288         </div>
289       }
290     />
291   </div>
292   <div>
293     <div
294       className="overview-quality-gate-badge-large failed"
295     >
296       <div
297         className="big-spacer-bottom huge h3"
298       >
299         metric.level.ERROR
300       </div>
301       <span
302         className="small"
303       >
304         overview.X_conditions_failed.1
305       </span>
306     </div>
307     <div
308       data-test="overview__quality-gate-conditions"
309     >
310       <Memo(QualityGatePanelSection)
311         component={
312           {
313             "breadcrumbs": [],
314             "key": "my-project",
315             "name": "MyProject",
316             "qualifier": "APP",
317             "qualityGate": {
318               "isDefault": true,
319               "key": "30",
320               "name": "Sonar way",
321             },
322             "qualityProfiles": [
323               {
324                 "deleted": false,
325                 "key": "my-qp",
326                 "language": "ts",
327                 "name": "Sonar way",
328               },
329             ],
330             "tags": [],
331           }
332         }
333         key="foo"
334         qgStatus={
335           {
336             "caycStatus": "compliant",
337             "failedConditions": [
338               {
339                 "actual": "10",
340                 "error": "0",
341                 "level": "ERROR",
342                 "measure": {
343                   "bestValue": true,
344                   "leak": "1",
345                   "metric": {
346                     "id": "coverage",
347                     "key": "coverage",
348                     "name": "coverage",
349                     "type": "PERCENT",
350                   },
351                   "period": {
352                     "bestValue": true,
353                     "index": 1,
354                     "value": "1.0",
355                   },
356                   "value": "1.0",
357                 },
358                 "metric": "foo",
359                 "op": "GT",
360               },
361             ],
362             "ignoredConditions": false,
363             "key": "foo",
364             "name": "Foo",
365             "status": "ERROR",
366           }
367         }
368       />
369       <Memo(QualityGatePanelSection)
370         component={
371           {
372             "breadcrumbs": [],
373             "key": "my-project",
374             "name": "MyProject",
375             "qualifier": "APP",
376             "qualityGate": {
377               "isDefault": true,
378               "key": "30",
379               "name": "Sonar way",
380             },
381             "qualityProfiles": [
382               {
383                 "deleted": false,
384                 "key": "my-qp",
385                 "language": "ts",
386                 "name": "Sonar way",
387               },
388             ],
389             "tags": [],
390           }
391         }
392         key="foo"
393         qgStatus={
394           {
395             "caycStatus": "compliant",
396             "failedConditions": [],
397             "ignoredConditions": false,
398             "key": "foo",
399             "name": "Foo",
400             "status": "OK",
401           }
402         }
403       />
404     </div>
405   </div>
406   <withCurrentUserContext(SonarLintPromotion)
407     qgConditions={
408       [
409         {
410           "actual": "10",
411           "error": "0",
412           "level": "ERROR",
413           "measure": {
414             "bestValue": true,
415             "leak": "1",
416             "metric": {
417               "id": "coverage",
418               "key": "coverage",
419               "name": "coverage",
420               "type": "PERCENT",
421             },
422             "period": {
423               "bestValue": true,
424               "index": 1,
425               "value": "1.0",
426             },
427             "value": "1.0",
428           },
429           "metric": "foo",
430           "op": "GT",
431         },
432       ]
433     }
434   />
435 </div>
436 `;
437
438 exports[`should render correctly for projects 1`] = `
439 <div
440   className="overview-panel"
441   data-test="overview__quality-gate-panel"
442 >
443   <div
444     className="display-flex-center spacer-bottom"
445   >
446     <h2
447       className="overview-panel-title null-spacer-bottom"
448     >
449       overview.quality_gate
450        
451     </h2>
452     <HelpTooltip
453       className="little-spacer-left"
454       overlay={
455         <div
456           className="big-padded-top big-padded-bottom"
457         >
458           overview.quality_gate.help
459         </div>
460       }
461     />
462   </div>
463   <div>
464     <div
465       className="overview-quality-gate-badge-large failed"
466     >
467       <div
468         className="big-spacer-bottom huge h3"
469       >
470         metric.level.ERROR
471       </div>
472       <span
473         className="small"
474       >
475         overview.X_conditions_failed.1
476       </span>
477     </div>
478     <div
479       data-test="overview__quality-gate-conditions"
480     >
481       <Memo(QualityGatePanelSection)
482         component={
483           {
484             "breadcrumbs": [],
485             "key": "my-project",
486             "name": "MyProject",
487             "qualifier": "TRK",
488             "qualityGate": {
489               "isDefault": true,
490               "key": "30",
491               "name": "Sonar way",
492             },
493             "qualityProfiles": [
494               {
495                 "deleted": false,
496                 "key": "my-qp",
497                 "language": "ts",
498                 "name": "Sonar way",
499               },
500             ],
501             "tags": [],
502           }
503         }
504         key="foo"
505         qgStatus={
506           {
507             "caycStatus": "compliant",
508             "failedConditions": [
509               {
510                 "actual": "10",
511                 "error": "0",
512                 "level": "ERROR",
513                 "measure": {
514                   "bestValue": true,
515                   "leak": "1",
516                   "metric": {
517                     "id": "coverage",
518                     "key": "coverage",
519                     "name": "coverage",
520                     "type": "PERCENT",
521                   },
522                   "period": {
523                     "bestValue": true,
524                     "index": 1,
525                     "value": "1.0",
526                   },
527                   "value": "1.0",
528                 },
529                 "metric": "foo",
530                 "op": "GT",
531               },
532             ],
533             "ignoredConditions": false,
534             "key": "foo",
535             "name": "Foo",
536             "status": "ERROR",
537           }
538         }
539       />
540     </div>
541   </div>
542   <withCurrentUserContext(SonarLintPromotion)
543     qgConditions={
544       [
545         {
546           "actual": "10",
547           "error": "0",
548           "level": "ERROR",
549           "measure": {
550             "bestValue": true,
551             "leak": "1",
552             "metric": {
553               "id": "coverage",
554               "key": "coverage",
555               "name": "coverage",
556               "type": "PERCENT",
557             },
558             "period": {
559               "bestValue": true,
560               "index": 1,
561               "value": "1.0",
562             },
563             "value": "1.0",
564           },
565           "metric": "foo",
566           "op": "GT",
567         },
568       ]
569     }
570   />
571 </div>
572 `;
573
574 exports[`should render correctly for projects 2`] = `
575 <div
576   className="overview-panel"
577   data-test="overview__quality-gate-panel"
578 >
579   <div
580     className="display-flex-center spacer-bottom"
581   >
582     <h2
583       className="overview-panel-title null-spacer-bottom"
584     >
585       overview.quality_gate
586        
587     </h2>
588     <HelpTooltip
589       className="little-spacer-left"
590       overlay={
591         <div
592           className="big-padded-top big-padded-bottom"
593         >
594           overview.quality_gate.help
595         </div>
596       }
597     />
598   </div>
599   <div>
600     <div
601       className="overview-quality-gate-badge-large success"
602     >
603       <div
604         className="big-spacer-bottom huge h3"
605       >
606         metric.level.OK
607       </div>
608       <span
609         className="small"
610       >
611         overview.quality_gate_all_conditions_passed
612       </span>
613     </div>
614   </div>
615   <withCurrentUserContext(SonarLintPromotion)
616     qgConditions={[]}
617   />
618 </div>
619 `;
620
621 exports[`should render correctly for projects 3`] = `
622 <div
623   className="overview-panel"
624   data-test="overview__quality-gate-panel"
625 >
626   <div
627     className="display-flex-center spacer-bottom"
628   >
629     <h2
630       className="overview-panel-title null-spacer-bottom"
631     >
632       overview.quality_gate
633        
634     </h2>
635     <HelpTooltip
636       className="little-spacer-left"
637       overlay={
638         <div
639           className="big-padded-top big-padded-bottom"
640         >
641           overview.quality_gate.help
642         </div>
643       }
644     />
645   </div>
646   <Alert
647     className="big-spacer-bottom"
648     display="inline"
649     variant="info"
650   >
651     <span
652       className="text-middle"
653     >
654       overview.quality_gate.ignored_conditions
655     </span>
656     <HelpTooltip
657       className="spacer-left"
658       overlay="overview.quality_gate.ignored_conditions.tooltip"
659     />
660   </Alert>
661   <div>
662     <div
663       className="overview-quality-gate-badge-large failed"
664     >
665       <div
666         className="big-spacer-bottom huge h3"
667       >
668         metric.level.ERROR
669       </div>
670       <span
671         className="small"
672       >
673         overview.X_conditions_failed.1
674       </span>
675     </div>
676     <div
677       data-test="overview__quality-gate-conditions"
678     >
679       <Memo(QualityGatePanelSection)
680         component={
681           {
682             "breadcrumbs": [],
683             "key": "my-project",
684             "name": "MyProject",
685             "qualifier": "TRK",
686             "qualityGate": {
687               "isDefault": true,
688               "key": "30",
689               "name": "Sonar way",
690             },
691             "qualityProfiles": [
692               {
693                 "deleted": false,
694                 "key": "my-qp",
695                 "language": "ts",
696                 "name": "Sonar way",
697               },
698             ],
699             "tags": [],
700           }
701         }
702         key="foo"
703         qgStatus={
704           {
705             "caycStatus": "compliant",
706             "failedConditions": [
707               {
708                 "actual": "10",
709                 "error": "0",
710                 "level": "ERROR",
711                 "measure": {
712                   "bestValue": true,
713                   "leak": "1",
714                   "metric": {
715                     "id": "coverage",
716                     "key": "coverage",
717                     "name": "coverage",
718                     "type": "PERCENT",
719                   },
720                   "period": {
721                     "bestValue": true,
722                     "index": 1,
723                     "value": "1.0",
724                   },
725                   "value": "1.0",
726                 },
727                 "metric": "foo",
728                 "op": "GT",
729               },
730             ],
731             "ignoredConditions": true,
732             "key": "foo",
733             "name": "Foo",
734             "status": "ERROR",
735           }
736         }
737       />
738     </div>
739   </div>
740   <withCurrentUserContext(SonarLintPromotion)
741     qgConditions={
742       [
743         {
744           "actual": "10",
745           "error": "0",
746           "level": "ERROR",
747           "measure": {
748             "bestValue": true,
749             "leak": "1",
750             "metric": {
751               "id": "coverage",
752               "key": "coverage",
753               "name": "coverage",
754               "type": "PERCENT",
755             },
756             "period": {
757               "bestValue": true,
758               "index": 1,
759               "value": "1.0",
760             },
761             "value": "1.0",
762           },
763           "metric": "foo",
764           "op": "GT",
765         },
766       ]
767     }
768   />
769 </div>
770 `;