Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

SecurityHotspotsAppRenderer-test.tsx.snap 6.5KB

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