]> source.dussan.org Git - sonarqube.git/blob
1be520d5214e6441710c335272dc34580d6d7b4e
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly: Admin 1`] = `
4 <div
5   className="layout-page-main-inner"
6 >
7   <Connect(withAppState(Conditions))
8     canEdit={false}
9     conditions={
10       Array [
11         Object {
12           "error": "10",
13           "id": 1,
14           "metric": "coverage",
15           "op": "LT",
16         },
17       ]
18     }
19     metrics={Object {}}
20     onAddCondition={[MockFunction]}
21     onRemoveCondition={[MockFunction]}
22     onSaveCondition={[MockFunction]}
23     qualityGate={
24       Object {
25         "conditions": Array [
26           Object {
27             "error": "10",
28             "id": 1,
29             "metric": "coverage",
30             "op": "LT",
31           },
32         ],
33         "id": "1",
34         "name": "qualitygate",
35       }
36     }
37   />
38   <div
39     className="display-flex-row huge-spacer-top"
40   >
41     <div
42       className="quality-gate-section width-50 big-padded-right"
43       id="quality-gate-projects"
44     >
45       <header
46         className="display-flex-center spacer-bottom"
47       >
48         <h3>
49           quality_gates.projects
50         </h3>
51         <HelpTooltip
52           className="spacer-left"
53           overlay={
54             <div
55               className="big-padded-top big-padded-bottom"
56             >
57               quality_gates.projects.help
58             </div>
59           }
60         />
61       </header>
62       <Projects
63         key="1"
64         qualityGate={
65           Object {
66             "conditions": Array [
67               Object {
68                 "error": "10",
69                 "id": 1,
70                 "metric": "coverage",
71                 "op": "LT",
72               },
73             ],
74             "id": "1",
75             "name": "qualitygate",
76           }
77         }
78       />
79     </div>
80     <div
81       className="width-50 big-padded-left"
82     >
83       <QualityGatePermissions
84         qualityGate={
85           Object {
86             "conditions": Array [
87               Object {
88                 "error": "10",
89                 "id": 1,
90                 "metric": "coverage",
91                 "op": "LT",
92               },
93             ],
94             "id": "1",
95             "name": "qualitygate",
96           }
97         }
98       />
99     </div>
100   </div>
101 </div>
102 `;
103
104 exports[`should render correctly: is default 1`] = `
105 <div
106   className="layout-page-main-inner"
107 >
108   <Connect(withAppState(Conditions))
109     canEdit={false}
110     conditions={
111       Array [
112         Object {
113           "error": "10",
114           "id": 1,
115           "metric": "coverage",
116           "op": "LT",
117         },
118       ]
119     }
120     metrics={Object {}}
121     onAddCondition={[MockFunction]}
122     onRemoveCondition={[MockFunction]}
123     onSaveCondition={[MockFunction]}
124     qualityGate={
125       Object {
126         "conditions": Array [
127           Object {
128             "error": "10",
129             "id": 1,
130             "metric": "coverage",
131             "op": "LT",
132           },
133         ],
134         "id": "1",
135         "name": "qualitygate",
136       }
137     }
138   />
139   <div
140     className="display-flex-row huge-spacer-top"
141   >
142     <div
143       className="quality-gate-section width-50 big-padded-right"
144       id="quality-gate-projects"
145     >
146       <header
147         className="display-flex-center spacer-bottom"
148       >
149         <h3>
150           quality_gates.projects
151         </h3>
152         <HelpTooltip
153           className="spacer-left"
154           overlay={
155             <div
156               className="big-padded-top big-padded-bottom"
157             >
158               quality_gates.projects.help
159             </div>
160           }
161         />
162       </header>
163       quality_gates.projects_for_default
164     </div>
165   </div>
166 </div>
167 `;
168
169 exports[`should render correctly: is default, no conditions 1`] = `
170 <div
171   className="layout-page-main-inner"
172 >
173   <Alert
174     className="big-spacer-bottom"
175     variant="warning"
176   >
177     quality_gates.is_default_no_conditions
178   </Alert>
179   <Connect(withAppState(Conditions))
180     canEdit={false}
181     conditions={Array []}
182     metrics={Object {}}
183     onAddCondition={[MockFunction]}
184     onRemoveCondition={[MockFunction]}
185     onSaveCondition={[MockFunction]}
186     qualityGate={
187       Object {
188         "conditions": Array [],
189         "id": "1",
190         "name": "qualitygate",
191       }
192     }
193   />
194   <div
195     className="display-flex-row huge-spacer-top"
196   >
197     <div
198       className="quality-gate-section width-50 big-padded-right"
199       id="quality-gate-projects"
200     >
201       <header
202         className="display-flex-center spacer-bottom"
203       >
204         <h3>
205           quality_gates.projects
206         </h3>
207         <HelpTooltip
208           className="spacer-left"
209           overlay={
210             <div
211               className="big-padded-top big-padded-bottom"
212             >
213               quality_gates.projects.help
214             </div>
215           }
216         />
217       </header>
218       quality_gates.projects_for_default
219     </div>
220   </div>
221 </div>
222 `;
223
224 exports[`should render correctly: is not default 1`] = `
225 <div
226   className="layout-page-main-inner"
227 >
228   <Connect(withAppState(Conditions))
229     canEdit={false}
230     conditions={
231       Array [
232         Object {
233           "error": "10",
234           "id": 1,
235           "metric": "coverage",
236           "op": "LT",
237         },
238       ]
239     }
240     metrics={Object {}}
241     onAddCondition={[MockFunction]}
242     onRemoveCondition={[MockFunction]}
243     onSaveCondition={[MockFunction]}
244     qualityGate={
245       Object {
246         "conditions": Array [
247           Object {
248             "error": "10",
249             "id": 1,
250             "metric": "coverage",
251             "op": "LT",
252           },
253         ],
254         "id": "1",
255         "name": "qualitygate",
256       }
257     }
258   />
259   <div
260     className="display-flex-row huge-spacer-top"
261   >
262     <div
263       className="quality-gate-section width-50 big-padded-right"
264       id="quality-gate-projects"
265     >
266       <header
267         className="display-flex-center spacer-bottom"
268       >
269         <h3>
270           quality_gates.projects
271         </h3>
272         <HelpTooltip
273           className="spacer-left"
274           overlay={
275             <div
276               className="big-padded-top big-padded-bottom"
277             >
278               quality_gates.projects.help
279             </div>
280           }
281         />
282       </header>
283       <Projects
284         key="1"
285         qualityGate={
286           Object {
287             "conditions": Array [
288               Object {
289                 "error": "10",
290                 "id": 1,
291                 "metric": "coverage",
292                 "op": "LT",
293               },
294             ],
295             "id": "1",
296             "name": "qualitygate",
297           }
298         }
299       />
300     </div>
301   </div>
302 </div>
303 `;