]> source.dussan.org Git - sonarqube.git/blob
17e692d4ad3231a8ae177d6d263ab4eed4c8d9f4
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should not render drilldown for estimated duplications 1`] = `
4 <div
5   id="component-measures"
6 >
7   <Suggestions
8     suggestions="component_measures"
9   />
10   <Helmet
11     defer={false}
12     encodeSpecialCharacters={true}
13     prioritizeSeoTags={false}
14     title="Coverage"
15   />
16   <div
17     className="layout-page"
18   >
19     <ScreenPositionHelper
20       className="layout-page-side-outer"
21     >
22       <Component />
23     </ScreenPositionHelper>
24     <div
25       className="layout-page-main"
26     >
27       <div
28         className="layout-page-main-inner"
29       >
30         <div
31           className="note"
32         >
33           component_measures.details_are_not_available
34         </div>
35       </div>
36     </div>
37   </div>
38 </div>
39 `;
40
41 exports[`should render a message when there are no measures 1`] = `
42 <div
43   id="component-measures"
44 >
45   <Suggestions
46     suggestions="component_measures"
47   />
48   <Helmet
49     defer={false}
50     encodeSpecialCharacters={true}
51     prioritizeSeoTags={false}
52     title="Coverage"
53   />
54   <MeasuresEmpty />
55 </div>
56 `;
57
58 exports[`should render a warning message when user does not have access to all projects whithin a Portfolio: Measure menu with warning (ScreenPositionHelper) 1`] = `
59 <div
60   className="layout-page-side-outer"
61 >
62   <div
63     className="layout-page-side"
64     style={
65       {
66         "top": 0,
67       }
68     }
69   >
70     <div
71       className="layout-page-side-inner"
72     >
73       <Alert
74         className="big-spacer-top big-spacer-right big-spacer-left it__portfolio_warning"
75         variant="warning"
76       >
77         <Styled(div)>
78           component_measures.not_all_measures_are_shown
79           <HelpTooltip
80             ariaLabel="component_measures.not_all_measures_are_shown.help"
81             className="spacer-left"
82             overlay="component_measures.not_all_measures_are_shown.help"
83           />
84         </Styled(div)>
85       </Alert>
86       <div
87         className="layout-page-filters"
88       >
89         <Sidebar
90           measures={
91             [
92               {
93                 "leak": undefined,
94                 "metric": {
95                   "domain": "Coverage",
96                   "id": "2",
97                   "key": "coverage",
98                   "name": "Coverage",
99                   "type": "PERCENT",
100                 },
101                 "value": "80.0",
102               },
103             ]
104           }
105           selectedMetric="coverage"
106           showFullMeasures={true}
107           updateQuery={[Function]}
108         />
109       </div>
110     </div>
111   </div>
112 </div>
113 `;
114
115 exports[`should render correctly 1`] = `
116 <div
117   id="component-measures"
118 >
119   <Suggestions
120     suggestions="component_measures"
121   />
122   <Helmet
123     defer={false}
124     encodeSpecialCharacters={true}
125     prioritizeSeoTags={false}
126     title="Coverage"
127   />
128   <div
129     className="layout-page"
130   >
131     <ScreenPositionHelper
132       className="layout-page-side-outer"
133     >
134       <Component />
135     </ScreenPositionHelper>
136     <MeasureContent
137       branchLike={
138         {
139           "analysisDate": "2018-01-01",
140           "excludedFromPurge": true,
141           "isMain": true,
142           "name": "master",
143         }
144       }
145       metrics={
146         {
147           "coverage": {
148             "domain": "Coverage",
149             "id": "2",
150             "key": "coverage",
151             "name": "Coverage",
152             "type": "PERCENT",
153           },
154           "duplicated_lines_density": {
155             "domain": "Duplications",
156             "id": "3",
157             "key": "duplicated_lines_density",
158             "name": "Duplicated Lines (%)",
159             "type": "PERCENT",
160           },
161           "lines_to_cover": {
162             "domain": "Coverage",
163             "id": "1",
164             "key": "lines_to_cover",
165             "name": "Lines to Cover",
166             "type": "INT",
167           },
168           "new_bugs": {
169             "domain": "Reliability",
170             "id": "4",
171             "key": "new_bugs",
172             "name": "New Bugs",
173             "type": "INT",
174           },
175         }
176       }
177       onIssueChange={[Function]}
178       requestedMetric={
179         {
180           "domain": "Coverage",
181           "id": "2",
182           "key": "coverage",
183           "name": "Coverage",
184           "type": "PERCENT",
185         }
186       }
187       rootComponent={
188         {
189           "breadcrumbs": [],
190           "key": "foo",
191           "name": "Foo",
192           "qualifier": "TRK",
193           "qualityGate": {
194             "isDefault": true,
195             "key": "30",
196             "name": "Sonar way",
197           },
198           "qualityProfiles": [
199             {
200               "deleted": false,
201               "key": "my-qp",
202               "language": "ts",
203               "name": "Sonar way",
204             },
205           ],
206           "tags": [],
207         }
208       }
209       router={
210         {
211           "createHref": [MockFunction],
212           "createPath": [MockFunction],
213           "go": [MockFunction],
214           "goBack": [MockFunction],
215           "goForward": [MockFunction],
216           "isActive": [MockFunction],
217           "push": [MockFunction],
218           "replace": [MockFunction],
219           "setRouteLeaveHook": [MockFunction],
220         }
221       }
222       selected=""
223       updateQuery={[Function]}
224       view="tree"
225     />
226   </div>
227 </div>
228 `;