]> source.dussan.org Git - sonarqube.git/blob
3f0251dba3a6a0b07bdd56a465d3957ca04ecc7f
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`renderOption should render correctly: branch 1`] = `
4 <Option
5   data={
6     {
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     {
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     {
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     {
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       className="little-spacer-top spacer-bottom"
113       components={
114         {
115           "Option": [Function],
116         }
117       }
118       onChange={[Function]}
119       options={
120         [
121           {
122             "isMain": true,
123             "label": "master",
124             "value": "master",
125           },
126         ]
127       }
128       value={
129         {
130           "isMain": true,
131           "label": "master",
132           "value": "master",
133         }
134       }
135     />
136   </div>
137 </RadioCard>
138 `;
139
140 exports[`should render correctly: Branch level 1`] = `
141 <RadioCard
142   onClick={[Function]}
143   selected={true}
144   title="baseline.reference_branch"
145 >
146   <p>
147     baseline.reference_branch.description
148   </p>
149   <div
150     className="big-spacer-top display-flex-column"
151   >
152     <MandatoryFieldsExplanation
153       className="spacer-bottom"
154     />
155     <label
156       className="text-middle"
157       htmlFor="reference_branch"
158     >
159       <strong>
160         baseline.reference_branch.choose
161       </strong>
162       <MandatoryFieldMarker />
163     </label>
164     <Select
165       className="little-spacer-top spacer-bottom"
166       components={
167         {
168           "Option": [Function],
169         }
170       }
171       onChange={[Function]}
172       options={
173         [
174           {
175             "isMain": true,
176             "label": "master",
177             "value": "master",
178           },
179           {
180             "isMain": false,
181             "label": "branch-7.9",
182             "value": "branch-7.9",
183           },
184         ]
185       }
186       value={
187         {
188           "isMain": true,
189           "label": "master",
190           "value": "master",
191         }
192       }
193     />
194   </div>
195 </RadioCard>
196 `;
197
198 exports[`should render correctly: Project level 1`] = `
199 <RadioCard
200   onClick={[Function]}
201   selected={true}
202   title="baseline.reference_branch"
203 >
204   <p>
205     baseline.reference_branch.description
206   </p>
207   <p
208     className="spacer-top"
209   >
210     baseline.reference_branch.description2
211   </p>
212   <div
213     className="big-spacer-top display-flex-column"
214   >
215     <MandatoryFieldsExplanation
216       className="spacer-bottom"
217     />
218     <label
219       className="text-middle"
220       htmlFor="reference_branch"
221     >
222       <strong>
223         baseline.reference_branch.choose
224       </strong>
225       <MandatoryFieldMarker />
226     </label>
227     <Select
228       className="little-spacer-top spacer-bottom"
229       components={
230         {
231           "Option": [Function],
232         }
233       }
234       onChange={[Function]}
235       options={
236         [
237           {
238             "isMain": true,
239             "label": "master",
240             "value": "master",
241           },
242           {
243             "isMain": false,
244             "label": "branch-7.9",
245             "value": "branch-7.9",
246           },
247         ]
248       }
249       value={
250         {
251           "isMain": true,
252           "label": "master",
253           "value": "master",
254         }
255       }
256     />
257   </div>
258 </RadioCard>
259 `;