]> source.dussan.org Git - sonarqube.git/blob
c9336052d04bd502877a542b8592783d4a5d9a5b
[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         "newCode": 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 2`] = `
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     <DeferredSpinner
48       className="huge-spacer-left big-spacer-top"
49       loading={false}
50       timeout={100}
51     >
52       <div
53         className="display-flex-column display-flex-center"
54       >
55         <img
56           alt="hotspots.page"
57           className="huge-spacer-top"
58           height={166}
59           src="/images/hotspot-large.svg"
60         />
61         <h1
62           className="huge-spacer-top"
63         >
64           hotspots.no_hotspots.title
65         </h1>
66         <div
67           className="abs-width-400 text-center big-spacer-top"
68         >
69           hotspots.no_hotspots.description
70         </div>
71         <Link
72           className="big-spacer-top"
73           onlyActiveOnIndex={false}
74           style={Object {}}
75           target="_blank"
76           to={
77             Object {
78               "pathname": "/documentation/user-guide/security-hotspots/",
79             }
80           }
81         >
82           hotspots.learn_more
83         </Link>
84       </div>
85     </DeferredSpinner>
86   </div>
87 </div>
88 `;
89
90 exports[`should render correctly with hotspots 1`] = `
91 <div>
92   <div
93     className="wrapper"
94     style={
95       Object {
96         "top": 0,
97       }
98     }
99   >
100     <Suggestions
101       suggestions="security_hotspots"
102     />
103     <HelmetWrapper
104       defer={true}
105       encodeSpecialCharacters={true}
106       title="hotspots.page"
107     />
108     <A11ySkipTarget
109       anchor="security_hotspots_main"
110     />
111     <DeferredSpinner
112       className="huge-spacer-left big-spacer-top"
113       loading={false}
114       timeout={100}
115     >
116       <div
117         className="layout-page"
118       >
119         <div
120           className="sidebar"
121         >
122           <HotspotList
123             hotspots={
124               Array [
125                 Object {
126                   "author": "Developer 1",
127                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
128                   "creationDate": "2013-05-13T17:55:39+0200",
129                   "key": "h1",
130                   "line": 81,
131                   "message": "'3' is a magic number.",
132                   "project": "com.github.kevinsawicki:http-request",
133                   "resolution": undefined,
134                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
135                   "securityCategory": "command-injection",
136                   "status": "TO_REVIEW",
137                   "updateDate": "2013-05-13T17:55:39+0200",
138                   "vulnerabilityProbability": "HIGH",
139                 },
140                 Object {
141                   "author": "Developer 1",
142                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
143                   "creationDate": "2013-05-13T17:55:39+0200",
144                   "key": "h2",
145                   "line": 81,
146                   "message": "'3' is a magic number.",
147                   "project": "com.github.kevinsawicki:http-request",
148                   "resolution": undefined,
149                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
150                   "securityCategory": "command-injection",
151                   "status": "TO_REVIEW",
152                   "updateDate": "2013-05-13T17:55:39+0200",
153                   "vulnerabilityProbability": "HIGH",
154                 },
155               ]
156             }
157             hotspotsTotal={2}
158             isStaticListOfHotspots={true}
159             loadingMore={false}
160             onHotspotClick={[MockFunction]}
161             onLoadMore={[MockFunction]}
162             securityCategories={Object {}}
163             statusFilter="TO_REVIEW"
164           />
165         </div>
166         <div
167           className="main"
168         />
169       </div>
170     </DeferredSpinner>
171   </div>
172 </div>
173 `;
174
175 exports[`should render correctly with hotspots 2`] = `
176 <div>
177   <div
178     className="wrapper"
179     style={
180       Object {
181         "top": 0,
182       }
183     }
184   >
185     <Suggestions
186       suggestions="security_hotspots"
187     />
188     <HelmetWrapper
189       defer={true}
190       encodeSpecialCharacters={true}
191       title="hotspots.page"
192     />
193     <A11ySkipTarget
194       anchor="security_hotspots_main"
195     />
196     <DeferredSpinner
197       className="huge-spacer-left big-spacer-top"
198       loading={false}
199       timeout={100}
200     >
201       <div
202         className="layout-page"
203       >
204         <div
205           className="sidebar"
206         >
207           <HotspotList
208             hotspots={
209               Array [
210                 Object {
211                   "author": "Developer 1",
212                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
213                   "creationDate": "2013-05-13T17:55:39+0200",
214                   "key": "h1",
215                   "line": 81,
216                   "message": "'3' is a magic number.",
217                   "project": "com.github.kevinsawicki:http-request",
218                   "resolution": undefined,
219                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
220                   "securityCategory": "command-injection",
221                   "status": "TO_REVIEW",
222                   "updateDate": "2013-05-13T17:55:39+0200",
223                   "vulnerabilityProbability": "HIGH",
224                 },
225                 Object {
226                   "author": "Developer 1",
227                   "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
228                   "creationDate": "2013-05-13T17:55:39+0200",
229                   "key": "h2",
230                   "line": 81,
231                   "message": "'3' is a magic number.",
232                   "project": "com.github.kevinsawicki:http-request",
233                   "resolution": undefined,
234                   "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
235                   "securityCategory": "command-injection",
236                   "status": "TO_REVIEW",
237                   "updateDate": "2013-05-13T17:55:39+0200",
238                   "vulnerabilityProbability": "HIGH",
239                 },
240               ]
241             }
242             hotspotsTotal={3}
243             isStaticListOfHotspots={true}
244             loadingMore={false}
245             onHotspotClick={[MockFunction]}
246             onLoadMore={[MockFunction]}
247             securityCategories={Object {}}
248             selectedHotspotKey="h2"
249             statusFilter="TO_REVIEW"
250           />
251         </div>
252         <div
253           className="main"
254         >
255           <HotspotViewer
256             hotspotKey="h2"
257             onUpdateHotspot={[MockFunction]}
258             securityCategories={Object {}}
259           />
260         </div>
261       </div>
262     </DeferredSpinner>
263   </div>
264 </div>
265 `;