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