]> source.dussan.org Git - sonarqube.git/blob
d4f3b6d553441a4aa2ace6bc480f2805e29363e6
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`renderOption should render correctly: branch 1`] = `
4 <Option
5   data={
6     Object {
7       "isMain": false,
8       "label": "branch-7.4",
9       "value": "branch-7.4",
10     }
11   }
12 >
13   <React.Fragment>
14     <span>
15       branch-7.4
16     </span>
17   </React.Fragment>
18 </Option>
19 `;
20
21 exports[`renderOption should render correctly: branch doesn't exist 1`] = `
22 <Option
23   data={
24     Object {
25       "isInvalid": true,
26       "isMain": false,
27       "value": "branch-nope",
28     }
29   }
30 >
31   <Tooltip
32     overlay="baseline.reference_branch.does_not_exist.branch-nope"
33   >
34     <span>
35       branch-nope
36        
37       <AlertErrorIcon />
38     </span>
39   </Tooltip>
40 </Option>
41 `;
42
43 exports[`renderOption should render correctly: disabled 1`] = `
44 <Option
45   data={
46     Object {
47       "isDisabled": true,
48       "isMain": false,
49       "label": "disabled",
50       "value": "disabled",
51     }
52   }
53 >
54   <React.Fragment>
55     <span
56       title="baseline.reference_branch.cannot_be_itself"
57     >
58       disabled
59     </span>
60   </React.Fragment>
61 </Option>
62 `;
63
64 exports[`renderOption should render correctly: main 1`] = `
65 <Option
66   data={
67     Object {
68       "isMain": true,
69       "label": "master",
70       "value": "master",
71     }
72   }
73 >
74   <React.Fragment>
75     <span>
76       master
77     </span>
78     <div
79       className="badge spacer-left"
80     >
81       branches.main_branch
82     </div>
83   </React.Fragment>
84 </Option>
85 `;
86
87 exports[`should render correctly: Branch level - no other branches 1`] = `
88 <RadioCard
89   onClick={[Function]}
90   selected={true}
91   title="baseline.reference_branch"
92 >
93   <p>
94     baseline.reference_branch.description
95   </p>
96   <div
97     className="big-spacer-top display-flex-column"
98   >
99     <MandatoryFieldsExplanation
100       className="spacer-bottom"
101     />
102     <label
103       className="text-middle"
104       htmlFor="reference_branch"
105     >
106       <strong>
107         baseline.reference_branch.choose
108       </strong>
109       <MandatoryFieldMarker />
110     </label>
111     <Select
112       autofocus={false}
113       className="little-spacer-top spacer-bottom"
114       components={
115         Object {
116           "Option": [Function],
117         }
118       }
119       onChange={[Function]}
120       options={
121         Array [
122           Object {
123             "isMain": true,
124             "label": "master",
125             "value": "master",
126           },
127         ]
128       }
129       value={
130         Object {
131           "isMain": true,
132           "label": "master",
133           "value": "master",
134         }
135       }
136     />
137   </div>
138 </RadioCard>
139 `;
140
141 exports[`should render correctly: Branch level 1`] = `
142 <RadioCard
143   onClick={[Function]}
144   selected={true}
145   title="baseline.reference_branch"
146 >
147   <p>
148     baseline.reference_branch.description
149   </p>
150   <div
151     className="big-spacer-top display-flex-column"
152   >
153     <MandatoryFieldsExplanation
154       className="spacer-bottom"
155     />
156     <label
157       className="text-middle"
158       htmlFor="reference_branch"
159     >
160       <strong>
161         baseline.reference_branch.choose
162       </strong>
163       <MandatoryFieldMarker />
164     </label>
165     <Select
166       autofocus={false}
167       className="little-spacer-top spacer-bottom"
168       components={
169         Object {
170           "Option": [Function],
171         }
172       }
173       onChange={[Function]}
174       options={
175         Array [
176           Object {
177             "isMain": true,
178             "label": "master",
179             "value": "master",
180           },
181           Object {
182             "isMain": false,
183             "label": "branch-7.9",
184             "value": "branch-7.9",
185           },
186         ]
187       }
188       value={
189         Object {
190           "isMain": true,
191           "label": "master",
192           "value": "master",
193         }
194       }
195     />
196   </div>
197 </RadioCard>
198 `;
199
200 exports[`should render correctly: Project level 1`] = `
201 <RadioCard
202   onClick={[Function]}
203   selected={true}
204   title="baseline.reference_branch"
205 >
206   <p>
207     baseline.reference_branch.description
208   </p>
209   <p
210     className="spacer-top"
211   >
212     baseline.reference_branch.description2
213   </p>
214   <div
215     className="big-spacer-top display-flex-column"
216   >
217     <MandatoryFieldsExplanation
218       className="spacer-bottom"
219     />
220     <label
221       className="text-middle"
222       htmlFor="reference_branch"
223     >
224       <strong>
225         baseline.reference_branch.choose
226       </strong>
227       <MandatoryFieldMarker />
228     </label>
229     <Select
230       autofocus={false}
231       className="little-spacer-top spacer-bottom"
232       components={
233         Object {
234           "Option": [Function],
235         }
236       }
237       onChange={[Function]}
238       options={
239         Array [
240           Object {
241             "isMain": true,
242             "label": "master",
243             "value": "master",
244           },
245           Object {
246             "isMain": false,
247             "label": "branch-7.9",
248             "value": "branch-7.9",
249           },
250         ]
251       }
252       value={
253         Object {
254           "isMain": true,
255           "label": "master",
256           "value": "master",
257         }
258       }
259     />
260   </div>
261 </RadioCard>
262 `;