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