]> source.dussan.org Git - sonarqube.git/blob
0aba55e85eb9643c446076e134af52dcbeac5b40
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly 1`] = `
4 <div
5   id="security_hotspots"
6 >
7   <Connect(withCurrentUser(FilterBar))
8     component={
9       Object {
10         "breadcrumbs": Array [],
11         "key": "my-project",
12         "name": "MyProject",
13         "organization": "foo",
14         "qualifier": "TRK",
15         "qualityGate": Object {
16           "isDefault": true,
17           "key": "30",
18           "name": "Sonar way",
19         },
20         "qualityProfiles": Array [
21           Object {
22             "deleted": false,
23             "key": "my-qp",
24             "language": "ts",
25             "name": "Sonar way",
26           },
27         ],
28         "tags": Array [],
29       }
30     }
31     filters={
32       Object {
33         "assignedToMe": false,
34         "sinceLeakPeriod": false,
35         "status": "TO_REVIEW",
36       }
37     }
38     isStaticListOfHotspots={true}
39     loadingMeasure={false}
40     onBranch={false}
41     onChangeFilters={[MockFunction]}
42     onShowAllHotspots={[MockFunction]}
43   />
44   <ScreenPositionHelper>
45     <Component />
46   </ScreenPositionHelper>
47 </div>
48 `;
49
50 exports[`should render correctly with hotspots 1`] = `
51 <div>
52   <div
53     className="wrapper"
54     style={
55       Object {
56         "top": 0,
57       }
58     }
59   >
60     <Suggestions
61       suggestions="security_hotspots"
62     />
63     <Helmet
64       defer={true}
65       encodeSpecialCharacters={true}
66       title="hotspots.page"
67     />
68     <A11ySkipTarget
69       anchor="security_hotspots_main"
70     />
71     <EmptyHotspotsPage
72       filtered={false}
73       isStaticListOfHotspots={true}
74     />
75   </div>
76 </div>
77 `;
78
79 exports[`should render correctly with hotspots 2`] = `
80 <div>
81   <div
82     className="wrapper"
83     style={
84       Object {
85         "top": 0,
86       }
87     }
88   >
89     <Suggestions
90       suggestions="security_hotspots"
91     />
92     <Helmet
93       defer={true}
94       encodeSpecialCharacters={true}
95       title="hotspots.page"
96     />
97     <A11ySkipTarget
98       anchor="security_hotspots_main"
99     />
100     <div
101       className="layout-page"
102     >
103       <div
104         className="sidebar"
105       >
106         <HotspotList
107           hotspots={
108             Array [
109               Object {
110                 "author": "Developer 1",
111                 "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
112                 "creationDate": "2013-05-13T17:55:39+0200",
113                 "key": "h1",
114                 "line": 81,
115                 "message": "'3' is a magic number.",
116                 "project": "com.github.kevinsawicki:http-request",
117                 "resolution": undefined,
118                 "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
119                 "securityCategory": "command-injection",
120                 "status": "TO_REVIEW",
121                 "updateDate": "2013-05-13T17:55:39+0200",
122                 "vulnerabilityProbability": "HIGH",
123               },
124               Object {
125                 "author": "Developer 1",
126                 "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
127                 "creationDate": "2013-05-13T17:55:39+0200",
128                 "key": "h2",
129                 "line": 81,
130                 "message": "'3' is a magic number.",
131                 "project": "com.github.kevinsawicki:http-request",
132                 "resolution": undefined,
133                 "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
134                 "securityCategory": "command-injection",
135                 "status": "TO_REVIEW",
136                 "updateDate": "2013-05-13T17:55:39+0200",
137                 "vulnerabilityProbability": "HIGH",
138               },
139             ]
140           }
141           hotspotsTotal={3}
142           isStaticListOfHotspots={true}
143           loadingMore={false}
144           onHotspotClick={[MockFunction]}
145           onLoadMore={[MockFunction]}
146           securityCategories={Object {}}
147           selectedHotspot={
148             Object {
149               "author": "Developer 1",
150               "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
151               "creationDate": "2013-05-13T17:55:39+0200",
152               "key": "h2",
153               "line": 81,
154               "message": "'3' is a magic number.",
155               "project": "com.github.kevinsawicki:http-request",
156               "resolution": undefined,
157               "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
158               "securityCategory": "command-injection",
159               "status": "TO_REVIEW",
160               "updateDate": "2013-05-13T17:55:39+0200",
161               "vulnerabilityProbability": "HIGH",
162             }
163           }
164           statusFilter="TO_REVIEW"
165         />
166       </div>
167       <div
168         className="main"
169       >
170         <HotspotViewer
171           component={
172             Object {
173               "breadcrumbs": Array [],
174               "key": "my-project",
175               "name": "MyProject",
176               "organization": "foo",
177               "qualifier": "TRK",
178               "qualityGate": Object {
179                 "isDefault": true,
180                 "key": "30",
181                 "name": "Sonar way",
182               },
183               "qualityProfiles": Array [
184                 Object {
185                   "deleted": false,
186                   "key": "my-qp",
187                   "language": "ts",
188                   "name": "Sonar way",
189                 },
190               ],
191               "tags": Array [],
192             }
193           }
194           hotspotKey="h2"
195           onUpdateHotspot={[MockFunction]}
196           securityCategories={Object {}}
197         />
198       </div>
199     </div>
200   </div>
201 </div>
202 `;
203
204 exports[`should render correctly: no hotspots 1`] = `
205 <div>
206   <div
207     className="wrapper"
208     style={
209       Object {
210         "top": 0,
211       }
212     }
213   >
214     <Suggestions
215       suggestions="security_hotspots"
216     />
217     <Helmet
218       defer={true}
219       encodeSpecialCharacters={true}
220       title="hotspots.page"
221     />
222     <A11ySkipTarget
223       anchor="security_hotspots_main"
224     />
225     <EmptyHotspotsPage
226       filtered={false}
227       isStaticListOfHotspots={true}
228     />
229   </div>
230 </div>
231 `;
232
233 exports[`should render correctly: no hotspots with filters 1`] = `
234 <div>
235   <div
236     className="wrapper"
237     style={
238       Object {
239         "top": 0,
240       }
241     }
242   >
243     <Suggestions
244       suggestions="security_hotspots"
245     />
246     <Helmet
247       defer={true}
248       encodeSpecialCharacters={true}
249       title="hotspots.page"
250     />
251     <A11ySkipTarget
252       anchor="security_hotspots_main"
253     />
254     <EmptyHotspotsPage
255       filtered={true}
256       isStaticListOfHotspots={true}
257     />
258   </div>
259 </div>
260 `;