Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

HotspotActions-test.tsx.snap 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`should open when clicked 1`] = `
  3. <div
  4. className="dropdown big-spacer-left flex-0"
  5. >
  6. <Button
  7. onClick={[Function]}
  8. >
  9. hotspot.change_status.TO_REVIEW
  10. <DropdownIcon
  11. className="little-spacer-left"
  12. />
  13. </Button>
  14. <OutsideClickHandler
  15. onClickOutside={[Function]}
  16. >
  17. <DropdownOverlay
  18. placement="bottom-right"
  19. >
  20. <HotspotActionsForm
  21. hotspot={
  22. Object {
  23. "assignee": "assignee",
  24. "assigneeUser": Object {
  25. "active": true,
  26. "local": true,
  27. "login": "assignee",
  28. "name": "John Doe",
  29. },
  30. "author": "author",
  31. "authorUser": Object {
  32. "active": true,
  33. "local": true,
  34. "login": "author",
  35. "name": "John Doe",
  36. },
  37. "changelog": Array [],
  38. "comment": Array [],
  39. "component": Object {
  40. "breadcrumbs": Array [],
  41. "key": "my-project",
  42. "name": "MyProject",
  43. "organization": "foo",
  44. "qualifier": "FIL",
  45. "qualityGate": Object {
  46. "isDefault": true,
  47. "key": "30",
  48. "name": "Sonar way",
  49. },
  50. "qualityProfiles": Array [
  51. Object {
  52. "deleted": false,
  53. "key": "my-qp",
  54. "language": "ts",
  55. "name": "Sonar way",
  56. },
  57. ],
  58. "tags": Array [],
  59. },
  60. "creationDate": "2013-05-13T17:55:41+0200",
  61. "key": "key",
  62. "line": 142,
  63. "message": "'3' is a magic number.",
  64. "project": Object {
  65. "breadcrumbs": Array [],
  66. "key": "my-project",
  67. "name": "MyProject",
  68. "organization": "foo",
  69. "qualifier": "TRK",
  70. "qualityGate": Object {
  71. "isDefault": true,
  72. "key": "30",
  73. "name": "Sonar way",
  74. },
  75. "qualityProfiles": Array [
  76. Object {
  77. "deleted": false,
  78. "key": "my-qp",
  79. "language": "ts",
  80. "name": "Sonar way",
  81. },
  82. ],
  83. "tags": Array [],
  84. },
  85. "resolution": "FIXED",
  86. "rule": Object {
  87. "fixRecommendations": "<p>This a <strong>strong</strong> message about fixing !</p>",
  88. "key": "squid:S2077",
  89. "name": "That rule",
  90. "riskDescription": "<p>This a <strong>strong</strong> message about risk !</p>",
  91. "securityCategory": "sql-injection",
  92. "vulnerabilityDescription": "<p>This a <strong>strong</strong> message about vulnerability !</p>",
  93. "vulnerabilityProbability": "HIGH",
  94. },
  95. "status": "TO_REVIEW",
  96. "textRange": Object {
  97. "endLine": 142,
  98. "endOffset": 83,
  99. "startLine": 142,
  100. "startOffset": 26,
  101. },
  102. "updateDate": "2013-05-13T17:55:42+0200",
  103. "users": Array [
  104. Object {
  105. "active": true,
  106. "local": true,
  107. "login": "assignee",
  108. "name": "John Doe",
  109. },
  110. Object {
  111. "active": true,
  112. "local": true,
  113. "login": "author",
  114. "name": "John Doe",
  115. },
  116. ],
  117. }
  118. }
  119. onSubmit={[Function]}
  120. />
  121. </DropdownOverlay>
  122. </OutsideClickHandler>
  123. </div>
  124. `;
  125. exports[`should register an eventlistener: Dropdown closed 1`] = `
  126. <div
  127. className="dropdown big-spacer-left flex-0"
  128. >
  129. <Button
  130. onClick={[Function]}
  131. >
  132. hotspot.change_status.TO_REVIEW
  133. <DropdownIcon
  134. className="little-spacer-left"
  135. />
  136. </Button>
  137. </div>
  138. `;
  139. exports[`should register an eventlistener: Dropdown open 1`] = `
  140. <div
  141. className="dropdown big-spacer-left flex-0"
  142. >
  143. <Button
  144. onClick={[Function]}
  145. >
  146. hotspot.change_status.TO_REVIEW
  147. <DropdownIcon
  148. className="little-spacer-left"
  149. />
  150. </Button>
  151. <OutsideClickHandler
  152. onClickOutside={[Function]}
  153. >
  154. <DropdownOverlay
  155. placement="bottom-right"
  156. >
  157. <HotspotActionsForm
  158. hotspot={
  159. Object {
  160. "assignee": "assignee",
  161. "assigneeUser": Object {
  162. "active": true,
  163. "local": true,
  164. "login": "assignee",
  165. "name": "John Doe",
  166. },
  167. "author": "author",
  168. "authorUser": Object {
  169. "active": true,
  170. "local": true,
  171. "login": "author",
  172. "name": "John Doe",
  173. },
  174. "changelog": Array [],
  175. "comment": Array [],
  176. "component": Object {
  177. "breadcrumbs": Array [],
  178. "key": "my-project",
  179. "name": "MyProject",
  180. "organization": "foo",
  181. "qualifier": "FIL",
  182. "qualityGate": Object {
  183. "isDefault": true,
  184. "key": "30",
  185. "name": "Sonar way",
  186. },
  187. "qualityProfiles": Array [
  188. Object {
  189. "deleted": false,
  190. "key": "my-qp",
  191. "language": "ts",
  192. "name": "Sonar way",
  193. },
  194. ],
  195. "tags": Array [],
  196. },
  197. "creationDate": "2013-05-13T17:55:41+0200",
  198. "key": "key",
  199. "line": 142,
  200. "message": "'3' is a magic number.",
  201. "project": Object {
  202. "breadcrumbs": Array [],
  203. "key": "my-project",
  204. "name": "MyProject",
  205. "organization": "foo",
  206. "qualifier": "TRK",
  207. "qualityGate": Object {
  208. "isDefault": true,
  209. "key": "30",
  210. "name": "Sonar way",
  211. },
  212. "qualityProfiles": Array [
  213. Object {
  214. "deleted": false,
  215. "key": "my-qp",
  216. "language": "ts",
  217. "name": "Sonar way",
  218. },
  219. ],
  220. "tags": Array [],
  221. },
  222. "resolution": "FIXED",
  223. "rule": Object {
  224. "fixRecommendations": "<p>This a <strong>strong</strong> message about fixing !</p>",
  225. "key": "squid:S2077",
  226. "name": "That rule",
  227. "riskDescription": "<p>This a <strong>strong</strong> message about risk !</p>",
  228. "securityCategory": "sql-injection",
  229. "vulnerabilityDescription": "<p>This a <strong>strong</strong> message about vulnerability !</p>",
  230. "vulnerabilityProbability": "HIGH",
  231. },
  232. "status": "TO_REVIEW",
  233. "textRange": Object {
  234. "endLine": 142,
  235. "endOffset": 83,
  236. "startLine": 142,
  237. "startOffset": 26,
  238. },
  239. "updateDate": "2013-05-13T17:55:42+0200",
  240. "users": Array [
  241. Object {
  242. "active": true,
  243. "local": true,
  244. "login": "assignee",
  245. "name": "John Doe",
  246. },
  247. Object {
  248. "active": true,
  249. "local": true,
  250. "login": "author",
  251. "name": "John Doe",
  252. },
  253. ],
  254. }
  255. }
  256. onSubmit={[Function]}
  257. />
  258. </DropdownOverlay>
  259. </OutsideClickHandler>
  260. </div>
  261. `;
  262. exports[`should register an eventlistener: Dropdown still open 1`] = `
  263. <div
  264. className="dropdown big-spacer-left flex-0"
  265. >
  266. <Button
  267. onClick={[Function]}
  268. >
  269. hotspot.change_status.TO_REVIEW
  270. <DropdownIcon
  271. className="little-spacer-left"
  272. />
  273. </Button>
  274. <OutsideClickHandler
  275. onClickOutside={[Function]}
  276. >
  277. <DropdownOverlay
  278. placement="bottom-right"
  279. >
  280. <HotspotActionsForm
  281. hotspot={
  282. Object {
  283. "assignee": "assignee",
  284. "assigneeUser": Object {
  285. "active": true,
  286. "local": true,
  287. "login": "assignee",
  288. "name": "John Doe",
  289. },
  290. "author": "author",
  291. "authorUser": Object {
  292. "active": true,
  293. "local": true,
  294. "login": "author",
  295. "name": "John Doe",
  296. },
  297. "changelog": Array [],
  298. "comment": Array [],
  299. "component": Object {
  300. "breadcrumbs": Array [],
  301. "key": "my-project",
  302. "name": "MyProject",
  303. "organization": "foo",
  304. "qualifier": "FIL",
  305. "qualityGate": Object {
  306. "isDefault": true,
  307. "key": "30",
  308. "name": "Sonar way",
  309. },
  310. "qualityProfiles": Array [
  311. Object {
  312. "deleted": false,
  313. "key": "my-qp",
  314. "language": "ts",
  315. "name": "Sonar way",
  316. },
  317. ],
  318. "tags": Array [],
  319. },
  320. "creationDate": "2013-05-13T17:55:41+0200",
  321. "key": "key",
  322. "line": 142,
  323. "message": "'3' is a magic number.",
  324. "project": Object {
  325. "breadcrumbs": Array [],
  326. "key": "my-project",
  327. "name": "MyProject",
  328. "organization": "foo",
  329. "qualifier": "TRK",
  330. "qualityGate": Object {
  331. "isDefault": true,
  332. "key": "30",
  333. "name": "Sonar way",
  334. },
  335. "qualityProfiles": Array [
  336. Object {
  337. "deleted": false,
  338. "key": "my-qp",
  339. "language": "ts",
  340. "name": "Sonar way",
  341. },
  342. ],
  343. "tags": Array [],
  344. },
  345. "resolution": "FIXED",
  346. "rule": Object {
  347. "fixRecommendations": "<p>This a <strong>strong</strong> message about fixing !</p>",
  348. "key": "squid:S2077",
  349. "name": "That rule",
  350. "riskDescription": "<p>This a <strong>strong</strong> message about risk !</p>",
  351. "securityCategory": "sql-injection",
  352. "vulnerabilityDescription": "<p>This a <strong>strong</strong> message about vulnerability !</p>",
  353. "vulnerabilityProbability": "HIGH",
  354. },
  355. "status": "TO_REVIEW",
  356. "textRange": Object {
  357. "endLine": 142,
  358. "endOffset": 83,
  359. "startLine": 142,
  360. "startOffset": 26,
  361. },
  362. "updateDate": "2013-05-13T17:55:42+0200",
  363. "users": Array [
  364. Object {
  365. "active": true,
  366. "local": true,
  367. "login": "assignee",
  368. "name": "John Doe",
  369. },
  370. Object {
  371. "active": true,
  372. "local": true,
  373. "login": "author",
  374. "name": "John Doe",
  375. },
  376. ],
  377. }
  378. }
  379. onSubmit={[Function]}
  380. />
  381. </DropdownOverlay>
  382. </OutsideClickHandler>
  383. </div>
  384. `;
  385. exports[`should render correctly 1`] = `
  386. <div
  387. className="dropdown big-spacer-left flex-0"
  388. >
  389. <Button
  390. onClick={[Function]}
  391. >
  392. hotspot.change_status.TO_REVIEW
  393. <DropdownIcon
  394. className="little-spacer-left"
  395. />
  396. </Button>
  397. </div>
  398. `;