]> source.dussan.org Git - sonarqube.git/blob
5ad71478b287c403dbb45196fb9531e31cdf39f6
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render all tabs correctly 1`] = `
4 <Fragment>
5   <BoxedTabs
6     className="branch-like-tabs"
7     onSelect={[Function]}
8     selected={0}
9     tabs={
10       Array [
11         Object {
12           "key": 0,
13           "label": <React.Fragment>
14             <BranchIcon />
15             <span
16               className="spacer-left"
17             >
18               project_branch_pull_request.tabs.branches
19             </span>
20           </React.Fragment>,
21         },
22         Object {
23           "key": 1,
24           "label": <React.Fragment>
25             <PullRequestIcon />
26             <span
27               className="spacer-left"
28             >
29               project_branch_pull_request.tabs.pull_requests
30             </span>
31           </React.Fragment>,
32         },
33       ]
34     }
35   />
36   <Memo(BranchLikeTable)
37     branchLikes={
38       Array [
39         Object {
40           "analysisDate": "2018-01-01",
41           "excludedFromPurge": true,
42           "isMain": true,
43           "name": "master",
44         },
45         Object {
46           "analysisDate": "2018-01-01",
47           "excludedFromPurge": true,
48           "isMain": false,
49           "name": "branch-1",
50         },
51         Object {
52           "analysisDate": "2018-01-01",
53           "excludedFromPurge": true,
54           "isMain": false,
55           "name": "branch-11",
56         },
57         Object {
58           "analysisDate": "2018-01-01",
59           "excludedFromPurge": true,
60           "isMain": false,
61           "name": "branch-12",
62         },
63         Object {
64           "analysisDate": "2018-01-01",
65           "excludedFromPurge": true,
66           "isMain": false,
67           "name": "branch-2",
68         },
69         Object {
70           "analysisDate": "2018-01-01",
71           "excludedFromPurge": true,
72           "isMain": false,
73           "name": "branch-3",
74         },
75       ]
76     }
77     component={
78       Object {
79         "breadcrumbs": Array [],
80         "key": "my-project",
81         "name": "MyProject",
82         "qualifier": "TRK",
83         "qualityGate": Object {
84           "isDefault": true,
85           "key": "30",
86           "name": "Sonar way",
87         },
88         "qualityProfiles": Array [
89           Object {
90             "deleted": false,
91             "key": "my-qp",
92             "language": "ts",
93             "name": "Sonar way",
94           },
95         ],
96         "tags": Array [],
97       }
98     }
99     displayPurgeSetting={true}
100     onDelete={[Function]}
101     onRename={[Function]}
102     onUpdatePurgeSetting={[Function]}
103     title="project_branch_pull_request.table.branch"
104   />
105 </Fragment>
106 `;
107
108 exports[`should render all tabs correctly 2`] = `
109 <Fragment>
110   <BoxedTabs
111     className="branch-like-tabs"
112     onSelect={[Function]}
113     selected={1}
114     tabs={
115       Array [
116         Object {
117           "key": 0,
118           "label": <React.Fragment>
119             <BranchIcon />
120             <span
121               className="spacer-left"
122             >
123               project_branch_pull_request.tabs.branches
124             </span>
125           </React.Fragment>,
126         },
127         Object {
128           "key": 1,
129           "label": <React.Fragment>
130             <PullRequestIcon />
131             <span
132               className="spacer-left"
133             >
134               project_branch_pull_request.tabs.pull_requests
135             </span>
136           </React.Fragment>,
137         },
138       ]
139     }
140   />
141   <Memo(BranchLikeTable)
142     branchLikes={
143       Array [
144         Object {
145           "analysisDate": "2018-01-01",
146           "base": "master",
147           "branch": "feature/foo/bar",
148           "key": "1",
149           "target": "master",
150           "title": "PR-1",
151         },
152         Object {
153           "analysisDate": "2018-01-01",
154           "base": "master",
155           "branch": "feature/foo/bar",
156           "key": "2",
157           "target": "master",
158           "title": "PR-2",
159         },
160         Object {
161           "analysisDate": "2018-01-01",
162           "base": "master",
163           "branch": "feature/foo/bar",
164           "isOrphan": true,
165           "key": "2",
166           "target": "llb-100",
167           "title": "PR-2",
168         },
169       ]
170     }
171     component={
172       Object {
173         "breadcrumbs": Array [],
174         "key": "my-project",
175         "name": "MyProject",
176         "qualifier": "TRK",
177         "qualityGate": Object {
178           "isDefault": true,
179           "key": "30",
180           "name": "Sonar way",
181         },
182         "qualityProfiles": Array [
183           Object {
184             "deleted": false,
185             "key": "my-qp",
186             "language": "ts",
187             "name": "Sonar way",
188           },
189         ],
190         "tags": Array [],
191       }
192     }
193     displayPurgeSetting={false}
194     onDelete={[Function]}
195     onRename={[Function]}
196     onUpdatePurgeSetting={[Function]}
197     title="project_branch_pull_request.table.pull_request"
198   />
199 </Fragment>
200 `;
201
202 exports[`should render deletion modal correctly 1`] = `
203 <DeleteBranchModal
204   branchLike={
205     Object {
206       "analysisDate": "2018-01-01",
207       "base": "master",
208       "branch": "feature/foo/bar",
209       "key": "1001",
210       "target": "master",
211       "title": "Foo Bar feature",
212     }
213   }
214   component={
215     Object {
216       "breadcrumbs": Array [],
217       "key": "my-project",
218       "name": "MyProject",
219       "qualifier": "TRK",
220       "qualityGate": Object {
221         "isDefault": true,
222         "key": "30",
223         "name": "Sonar way",
224       },
225       "qualityProfiles": Array [
226         Object {
227           "deleted": false,
228           "key": "my-qp",
229           "language": "ts",
230           "name": "Sonar way",
231         },
232       ],
233       "tags": Array [],
234     }
235   }
236   onClose={[Function]}
237   onDelete={[Function]}
238 />
239 `;
240
241 exports[`should render renaming modal correctly 1`] = `
242 <RenameBranchModal
243   branch={
244     Object {
245       "analysisDate": "2018-01-01",
246       "excludedFromPurge": true,
247       "isMain": true,
248       "name": "master",
249     }
250   }
251   component={
252     Object {
253       "breadcrumbs": Array [],
254       "key": "my-project",
255       "name": "MyProject",
256       "qualifier": "TRK",
257       "qualityGate": Object {
258         "isDefault": true,
259         "key": "30",
260         "name": "Sonar way",
261       },
262       "qualityProfiles": Array [
263         Object {
264           "deleted": false,
265           "key": "my-qp",
266           "language": "ts",
267           "name": "Sonar way",
268         },
269       ],
270       "tags": Array [],
271     }
272   }
273   onClose={[Function]}
274   onRename={[Function]}
275 />
276 `;