]> source.dussan.org Git - sonarqube.git/blob
df18a2f2f5ac01ffc27944ba7992274bd46cbb43
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly 1`] = `
4 <DropdownOverlay
5   className="branch-like-navigation-menu"
6   noPadding={true}
7 >
8   <div
9     className="search-box-container"
10   >
11     <SearchBox
12       autoFocus={true}
13       onChange={[Function]}
14       onKeyDown={[Function]}
15       placeholder="branch_like_navigation.search_for_branch_like"
16       value=""
17     />
18   </div>
19   <div
20     className="item-list-container"
21   >
22     <Memo(MenuItemList)
23       branchLikeTree={
24         Object {
25           "branchTree": Array [
26             Object {
27               "branch": Object {
28                 "analysisDate": "2018-01-01",
29                 "excludedFromPurge": true,
30                 "isMain": false,
31                 "name": "branch-1",
32               },
33               "pullRequests": Array [],
34             },
35             Object {
36               "branch": Object {
37                 "analysisDate": "2018-01-01",
38                 "excludedFromPurge": true,
39                 "isMain": false,
40                 "name": "branch-11",
41               },
42               "pullRequests": Array [],
43             },
44             Object {
45               "branch": Object {
46                 "analysisDate": "2018-01-01",
47                 "excludedFromPurge": true,
48                 "isMain": false,
49                 "name": "branch-12",
50               },
51               "pullRequests": Array [],
52             },
53             Object {
54               "branch": Object {
55                 "analysisDate": "2018-01-01",
56                 "excludedFromPurge": true,
57                 "isMain": false,
58                 "name": "branch-2",
59               },
60               "pullRequests": Array [],
61             },
62             Object {
63               "branch": Object {
64                 "analysisDate": "2018-01-01",
65                 "excludedFromPurge": true,
66                 "isMain": false,
67                 "name": "branch-3",
68               },
69               "pullRequests": Array [],
70             },
71           ],
72           "mainBranchTree": Object {
73             "branch": Object {
74               "analysisDate": "2018-01-01",
75               "excludedFromPurge": true,
76               "isMain": true,
77               "name": "master",
78             },
79             "pullRequests": Array [
80               Object {
81                 "analysisDate": "2018-01-01",
82                 "base": "master",
83                 "branch": "feature/foo/bar",
84                 "key": "2",
85                 "target": "master",
86                 "title": "PR-2",
87               },
88               Object {
89                 "analysisDate": "2018-01-01",
90                 "base": "master",
91                 "branch": "feature/foo/bar",
92                 "key": "1",
93                 "target": "master",
94                 "title": "PR-1",
95               },
96             ],
97           },
98           "orphanPullRequests": Array [
99             Object {
100               "analysisDate": "2018-01-01",
101               "base": "master",
102               "branch": "feature/foo/bar",
103               "isOrphan": true,
104               "key": "2",
105               "target": "llb-100",
106               "title": "PR-2",
107             },
108           ],
109           "parentlessPullRequests": Array [],
110         }
111       }
112       component={
113         Object {
114           "breadcrumbs": Array [],
115           "key": "my-project",
116           "name": "MyProject",
117           "qualifier": "TRK",
118           "qualityGate": Object {
119             "isDefault": true,
120             "key": "30",
121             "name": "Sonar way",
122           },
123           "qualityProfiles": Array [
124             Object {
125               "deleted": false,
126               "key": "my-qp",
127               "language": "ts",
128               "name": "Sonar way",
129             },
130           ],
131           "tags": Array [],
132         }
133       }
134       hasResults={true}
135       onSelect={[Function]}
136       selectedBranchLike={
137         Object {
138           "analysisDate": "2018-01-01",
139           "excludedFromPurge": true,
140           "isMain": true,
141           "name": "master",
142         }
143       }
144     />
145   </div>
146   <div
147     className="hint-container text-right"
148   >
149     <Link
150       onClick={[Function]}
151       to={
152         Object {
153           "pathname": "/project/branches",
154           "search": "?id=my-project",
155         }
156       }
157     >
158       branch_like_navigation.manage
159     </Link>
160   </div>
161 </DropdownOverlay>
162 `;
163
164 exports[`should render correctly with no current branch like 1`] = `
165 <DropdownOverlay
166   className="branch-like-navigation-menu"
167   noPadding={true}
168 >
169   <div
170     className="search-box-container"
171   >
172     <SearchBox
173       autoFocus={true}
174       onChange={[Function]}
175       onKeyDown={[Function]}
176       placeholder="branch_like_navigation.search_for_branch_like"
177       value=""
178     />
179   </div>
180   <div
181     className="item-list-container"
182   >
183     <Memo(MenuItemList)
184       branchLikeTree={
185         Object {
186           "branchTree": Array [
187             Object {
188               "branch": Object {
189                 "analysisDate": "2018-01-01",
190                 "excludedFromPurge": true,
191                 "isMain": false,
192                 "name": "branch-1",
193               },
194               "pullRequests": Array [],
195             },
196             Object {
197               "branch": Object {
198                 "analysisDate": "2018-01-01",
199                 "excludedFromPurge": true,
200                 "isMain": false,
201                 "name": "branch-11",
202               },
203               "pullRequests": Array [],
204             },
205             Object {
206               "branch": Object {
207                 "analysisDate": "2018-01-01",
208                 "excludedFromPurge": true,
209                 "isMain": false,
210                 "name": "branch-12",
211               },
212               "pullRequests": Array [],
213             },
214             Object {
215               "branch": Object {
216                 "analysisDate": "2018-01-01",
217                 "excludedFromPurge": true,
218                 "isMain": false,
219                 "name": "branch-2",
220               },
221               "pullRequests": Array [],
222             },
223             Object {
224               "branch": Object {
225                 "analysisDate": "2018-01-01",
226                 "excludedFromPurge": true,
227                 "isMain": false,
228                 "name": "branch-3",
229               },
230               "pullRequests": Array [],
231             },
232           ],
233           "mainBranchTree": Object {
234             "branch": Object {
235               "analysisDate": "2018-01-01",
236               "excludedFromPurge": true,
237               "isMain": true,
238               "name": "master",
239             },
240             "pullRequests": Array [
241               Object {
242                 "analysisDate": "2018-01-01",
243                 "base": "master",
244                 "branch": "feature/foo/bar",
245                 "key": "2",
246                 "target": "master",
247                 "title": "PR-2",
248               },
249               Object {
250                 "analysisDate": "2018-01-01",
251                 "base": "master",
252                 "branch": "feature/foo/bar",
253                 "key": "1",
254                 "target": "master",
255                 "title": "PR-1",
256               },
257             ],
258           },
259           "orphanPullRequests": Array [
260             Object {
261               "analysisDate": "2018-01-01",
262               "base": "master",
263               "branch": "feature/foo/bar",
264               "isOrphan": true,
265               "key": "2",
266               "target": "llb-100",
267               "title": "PR-2",
268             },
269           ],
270           "parentlessPullRequests": Array [],
271         }
272       }
273       component={
274         Object {
275           "breadcrumbs": Array [],
276           "key": "my-project",
277           "name": "MyProject",
278           "qualifier": "TRK",
279           "qualityGate": Object {
280             "isDefault": true,
281             "key": "30",
282             "name": "Sonar way",
283           },
284           "qualityProfiles": Array [
285             Object {
286               "deleted": false,
287               "key": "my-qp",
288               "language": "ts",
289               "name": "Sonar way",
290             },
291           ],
292           "tags": Array [],
293         }
294       }
295       hasResults={true}
296       onSelect={[Function]}
297       selectedBranchLike={
298         Object {
299           "analysisDate": "2018-01-01",
300           "excludedFromPurge": true,
301           "isMain": false,
302           "name": "branch-11",
303         }
304       }
305     />
306   </div>
307   <div
308     className="hint-container text-right"
309   >
310     <Link
311       onClick={[Function]}
312       to={
313         Object {
314           "pathname": "/project/branches",
315           "search": "?id=my-project",
316         }
317       }
318     >
319       branch_like_navigation.manage
320     </Link>
321   </div>
322 </DropdownOverlay>
323 `;