]> source.dussan.org Git - sonarqube.git/blob
8069b500e197dea5e6dc92a6839fe53f0712fa29
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly for a branch 1`] = `
4 <Fragment>
5   <div
6     className="display-flex-center flex-0 small"
7   >
8     <span
9       className="header-meta-warnings"
10     >
11       <ComponentNavWarnings
12         componentKey="my-project"
13         isBranch={true}
14         onWarningDismiss={[MockFunction]}
15         warnings={
16           Array [
17             Object {
18               "dismissable": false,
19               "key": "foo",
20               "message": "ERROR_1",
21             },
22             Object {
23               "dismissable": false,
24               "key": "foo",
25               "message": "ERROR_2",
26             },
27           ]
28         }
29       />
30     </span>
31     <span
32       className="spacer-left nowrap note"
33     >
34       <DateTimeFormatter
35         date="2017-01-02T00:00:00.000Z"
36       />
37     </span>
38     <span
39       className="spacer-left nowrap note"
40     >
41       version 0.0.1
42     </span>
43     <withCurrentUserContext(HomePageSelect)
44       className="spacer-left"
45       currentPage={
46         Object {
47           "branch": "branch-6.7",
48           "component": "my-project",
49           "type": "PROJECT",
50         }
51       }
52     />
53   </div>
54 </Fragment>
55 `;
56
57 exports[`should render correctly for a main project branch 1`] = `
58 <Fragment>
59   <div
60     className="display-flex-center flex-0 small"
61   >
62     <span
63       className="header-meta-warnings"
64     >
65       <ComponentNavWarnings
66         componentKey="my-project"
67         isBranch={true}
68         onWarningDismiss={[MockFunction]}
69         warnings={
70           Array [
71             Object {
72               "dismissable": false,
73               "key": "foo",
74               "message": "ERROR_1",
75             },
76             Object {
77               "dismissable": false,
78               "key": "foo",
79               "message": "ERROR_2",
80             },
81           ]
82         }
83       />
84     </span>
85     <span
86       className="spacer-left nowrap note"
87     >
88       <DateTimeFormatter
89         date="2017-01-02T00:00:00.000Z"
90       />
91     </span>
92     <span
93       className="spacer-left nowrap note"
94     >
95       version 0.0.1
96     </span>
97     <withCurrentUserContext(HomePageSelect)
98       className="spacer-left"
99       currentPage={
100         Object {
101           "branch": undefined,
102           "component": "my-project",
103           "type": "PROJECT",
104         }
105       }
106     />
107   </div>
108 </Fragment>
109 `;
110
111 exports[`should render correctly for a portfolio 1`] = `
112 <Fragment>
113   <div
114     className="display-flex-center flex-0 small"
115   >
116     <span
117       className="header-meta-warnings"
118     >
119       <ComponentNavWarnings
120         componentKey="foo"
121         isBranch={true}
122         onWarningDismiss={[MockFunction]}
123         warnings={
124           Array [
125             Object {
126               "dismissable": false,
127               "key": "foo",
128               "message": "ERROR_1",
129             },
130             Object {
131               "dismissable": false,
132               "key": "foo",
133               "message": "ERROR_2",
134             },
135           ]
136         }
137       />
138     </span>
139     <withCurrentUserContext(HomePageSelect)
140       className="spacer-left"
141       currentPage={
142         Object {
143           "component": "foo",
144           "type": "PORTFOLIO",
145         }
146       }
147     />
148   </div>
149 </Fragment>
150 `;
151
152 exports[`should render correctly for a pull request 1`] = `
153 <Fragment>
154   <div
155     className="display-flex-center flex-0 small"
156   >
157     <span
158       className="header-meta-warnings"
159     >
160       <ComponentNavWarnings
161         componentKey="my-project"
162         isBranch={false}
163         onWarningDismiss={[MockFunction]}
164         warnings={
165           Array [
166             Object {
167               "dismissable": false,
168               "key": "foo",
169               "message": "ERROR_1",
170             },
171             Object {
172               "dismissable": false,
173               "key": "foo",
174               "message": "ERROR_2",
175             },
176           ]
177         }
178       />
179     </span>
180     <span
181       className="spacer-left nowrap note"
182     >
183       <DateTimeFormatter
184         date="2017-01-02T00:00:00.000Z"
185       />
186     </span>
187   </div>
188   <div
189     className="navbar-context-meta-secondary display-inline-flex-center"
190   >
191     <a
192       className="display-inline-flex-center big-spacer-right"
193       href="https://example.com/pull/1234"
194       rel="noopener noreferrer"
195       target="_blank"
196     >
197       branches.see_the_pr
198       <DetachIcon
199         className="little-spacer-left"
200         size={12}
201       />
202     </a>
203     <withBranchStatus(BranchStatus)
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           "url": "https://example.com/pull/1234",
213         }
214       }
215       component={
216         Object {
217           "analysisDate": "2017-01-02T00:00:00.000Z",
218           "breadcrumbs": Array [],
219           "key": "my-project",
220           "name": "MyProject",
221           "qualifier": "TRK",
222           "qualityGate": Object {
223             "isDefault": true,
224             "key": "30",
225             "name": "Sonar way",
226           },
227           "qualityProfiles": Array [
228             Object {
229               "deleted": false,
230               "key": "my-qp",
231               "language": "ts",
232               "name": "Sonar way",
233             },
234           ],
235           "tags": Array [],
236           "version": "0.0.1",
237         }
238       }
239     />
240   </div>
241 </Fragment>
242 `;