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