]> source.dussan.org Git - sonarqube.git/blob
bd7828441133e36661ebd5dfa52fd8b5688a82a5
[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": "1",
85                 "target": "master",
86                 "title": "PR-1",
87               },
88               Object {
89                 "analysisDate": "2018-01-01",
90                 "base": "master",
91                 "branch": "feature/foo/bar",
92                 "key": "2",
93                 "target": "master",
94                 "title": "PR-2",
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       onlyActiveOnIndex={false}
152       style={Object {}}
153       to={
154         Object {
155           "pathname": "/project/branches",
156           "query": Object {
157             "id": "my-project",
158           },
159         }
160       }
161     >
162       branch_like_navigation.manage
163     </Link>
164   </div>
165 </DropdownOverlay>
166 `;
167
168 exports[`should render correctly with no current branch like 1`] = `
169 <DropdownOverlay
170   className="branch-like-navigation-menu"
171   noPadding={true}
172 >
173   <div
174     className="search-box-container"
175   >
176     <SearchBox
177       autoFocus={true}
178       onChange={[Function]}
179       onKeyDown={[Function]}
180       placeholder="branch_like_navigation.search_for_branch_like"
181       value=""
182     />
183   </div>
184   <div
185     className="item-list-container"
186   >
187     <Memo(MenuItemList)
188       branchLikeTree={
189         Object {
190           "branchTree": Array [
191             Object {
192               "branch": Object {
193                 "analysisDate": "2018-01-01",
194                 "excludedFromPurge": true,
195                 "isMain": false,
196                 "name": "branch-1",
197               },
198               "pullRequests": Array [],
199             },
200             Object {
201               "branch": Object {
202                 "analysisDate": "2018-01-01",
203                 "excludedFromPurge": true,
204                 "isMain": false,
205                 "name": "branch-11",
206               },
207               "pullRequests": Array [],
208             },
209             Object {
210               "branch": Object {
211                 "analysisDate": "2018-01-01",
212                 "excludedFromPurge": true,
213                 "isMain": false,
214                 "name": "branch-12",
215               },
216               "pullRequests": Array [],
217             },
218             Object {
219               "branch": Object {
220                 "analysisDate": "2018-01-01",
221                 "excludedFromPurge": true,
222                 "isMain": false,
223                 "name": "branch-2",
224               },
225               "pullRequests": Array [],
226             },
227             Object {
228               "branch": Object {
229                 "analysisDate": "2018-01-01",
230                 "excludedFromPurge": true,
231                 "isMain": false,
232                 "name": "branch-3",
233               },
234               "pullRequests": Array [],
235             },
236           ],
237           "mainBranchTree": Object {
238             "branch": Object {
239               "analysisDate": "2018-01-01",
240               "excludedFromPurge": true,
241               "isMain": true,
242               "name": "master",
243             },
244             "pullRequests": Array [
245               Object {
246                 "analysisDate": "2018-01-01",
247                 "base": "master",
248                 "branch": "feature/foo/bar",
249                 "key": "1",
250                 "target": "master",
251                 "title": "PR-1",
252               },
253               Object {
254                 "analysisDate": "2018-01-01",
255                 "base": "master",
256                 "branch": "feature/foo/bar",
257                 "key": "2",
258                 "target": "master",
259                 "title": "PR-2",
260               },
261             ],
262           },
263           "orphanPullRequests": Array [
264             Object {
265               "analysisDate": "2018-01-01",
266               "base": "master",
267               "branch": "feature/foo/bar",
268               "isOrphan": true,
269               "key": "2",
270               "target": "llb-100",
271               "title": "PR-2",
272             },
273           ],
274           "parentlessPullRequests": Array [],
275         }
276       }
277       component={
278         Object {
279           "breadcrumbs": Array [],
280           "key": "my-project",
281           "name": "MyProject",
282           "qualifier": "TRK",
283           "qualityGate": Object {
284             "isDefault": true,
285             "key": "30",
286             "name": "Sonar way",
287           },
288           "qualityProfiles": Array [
289             Object {
290               "deleted": false,
291               "key": "my-qp",
292               "language": "ts",
293               "name": "Sonar way",
294             },
295           ],
296           "tags": Array [],
297         }
298       }
299       hasResults={true}
300       onSelect={[Function]}
301       selectedBranchLike={
302         Object {
303           "analysisDate": "2018-01-01",
304           "excludedFromPurge": true,
305           "isMain": false,
306           "name": "branch-11",
307         }
308       }
309     />
310   </div>
311   <div
312     className="hint-container text-right"
313   >
314     <Link
315       onClick={[Function]}
316       onlyActiveOnIndex={false}
317       style={Object {}}
318       to={
319         Object {
320           "pathname": "/project/branches",
321           "query": Object {
322             "id": "my-project",
323           },
324         }
325       }
326     >
327       branch_like_navigation.manage
328     </Link>
329   </div>
330 </DropdownOverlay>
331 `;