restore.test.ts.snap 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`restoreElements should restore arrow element correctly 1`] = `
  3. Object {
  4. "angle": 0,
  5. "backgroundColor": "transparent",
  6. "boundElements": Array [],
  7. "endArrowhead": null,
  8. "endBinding": null,
  9. "fillStyle": "hachure",
  10. "groupIds": Array [],
  11. "height": 100,
  12. "id": "id-arrow01",
  13. "isDeleted": false,
  14. "lastCommittedPoint": null,
  15. "link": null,
  16. "locked": false,
  17. "opacity": 100,
  18. "points": Array [
  19. Array [
  20. 0,
  21. 0,
  22. ],
  23. Array [
  24. 100,
  25. 100,
  26. ],
  27. ],
  28. "roughness": 1,
  29. "roundness": Object {
  30. "type": 2,
  31. },
  32. "seed": Any<Number>,
  33. "startArrowhead": null,
  34. "startBinding": null,
  35. "strokeColor": "#1e1e1e",
  36. "strokeStyle": "solid",
  37. "strokeWidth": 1,
  38. "type": "arrow",
  39. "updated": 1,
  40. "version": 1,
  41. "versionNonce": 0,
  42. "width": 100,
  43. "x": 0,
  44. "y": 0,
  45. }
  46. `;
  47. exports[`restoreElements should restore correctly with rectangle, ellipse and diamond elements 1`] = `
  48. Object {
  49. "angle": 0,
  50. "backgroundColor": "blue",
  51. "boundElements": Array [],
  52. "fillStyle": "cross-hatch",
  53. "groupIds": Array [
  54. "1",
  55. "2",
  56. "3",
  57. ],
  58. "height": 200,
  59. "id": "1",
  60. "isDeleted": false,
  61. "link": null,
  62. "locked": false,
  63. "opacity": 10,
  64. "roughness": 2,
  65. "roundness": Object {
  66. "type": 3,
  67. },
  68. "seed": Any<Number>,
  69. "strokeColor": "red",
  70. "strokeStyle": "dashed",
  71. "strokeWidth": 2,
  72. "type": "rectangle",
  73. "updated": 1,
  74. "version": 1,
  75. "versionNonce": 0,
  76. "width": 100,
  77. "x": 10,
  78. "y": 20,
  79. }
  80. `;
  81. exports[`restoreElements should restore correctly with rectangle, ellipse and diamond elements 2`] = `
  82. Object {
  83. "angle": 0,
  84. "backgroundColor": "blue",
  85. "boundElements": Array [],
  86. "fillStyle": "cross-hatch",
  87. "groupIds": Array [
  88. "1",
  89. "2",
  90. "3",
  91. ],
  92. "height": 200,
  93. "id": "2",
  94. "isDeleted": false,
  95. "link": null,
  96. "locked": false,
  97. "opacity": 10,
  98. "roughness": 2,
  99. "roundness": Object {
  100. "type": 3,
  101. },
  102. "seed": Any<Number>,
  103. "strokeColor": "red",
  104. "strokeStyle": "dashed",
  105. "strokeWidth": 2,
  106. "type": "ellipse",
  107. "updated": 1,
  108. "version": 1,
  109. "versionNonce": 0,
  110. "width": 100,
  111. "x": 10,
  112. "y": 20,
  113. }
  114. `;
  115. exports[`restoreElements should restore correctly with rectangle, ellipse and diamond elements 3`] = `
  116. Object {
  117. "angle": 0,
  118. "backgroundColor": "blue",
  119. "boundElements": Array [],
  120. "fillStyle": "cross-hatch",
  121. "groupIds": Array [
  122. "1",
  123. "2",
  124. "3",
  125. ],
  126. "height": 200,
  127. "id": "3",
  128. "isDeleted": false,
  129. "link": null,
  130. "locked": false,
  131. "opacity": 10,
  132. "roughness": 2,
  133. "roundness": Object {
  134. "type": 3,
  135. },
  136. "seed": Any<Number>,
  137. "strokeColor": "red",
  138. "strokeStyle": "dashed",
  139. "strokeWidth": 2,
  140. "type": "diamond",
  141. "updated": 1,
  142. "version": 1,
  143. "versionNonce": 0,
  144. "width": 100,
  145. "x": 10,
  146. "y": 20,
  147. }
  148. `;
  149. exports[`restoreElements should restore freedraw element correctly 1`] = `
  150. Object {
  151. "angle": 0,
  152. "backgroundColor": "transparent",
  153. "boundElements": Array [],
  154. "fillStyle": "hachure",
  155. "groupIds": Array [],
  156. "height": 0,
  157. "id": "id-freedraw01",
  158. "isDeleted": false,
  159. "lastCommittedPoint": null,
  160. "link": null,
  161. "locked": false,
  162. "opacity": 100,
  163. "points": Array [],
  164. "pressures": Array [],
  165. "roughness": 1,
  166. "roundness": Object {
  167. "type": 3,
  168. },
  169. "seed": Any<Number>,
  170. "simulatePressure": true,
  171. "strokeColor": "#1e1e1e",
  172. "strokeStyle": "solid",
  173. "strokeWidth": 1,
  174. "type": "freedraw",
  175. "updated": 1,
  176. "version": 1,
  177. "versionNonce": 0,
  178. "width": 0,
  179. "x": 0,
  180. "y": 0,
  181. }
  182. `;
  183. exports[`restoreElements should restore line and draw elements correctly 1`] = `
  184. Object {
  185. "angle": 0,
  186. "backgroundColor": "transparent",
  187. "boundElements": Array [],
  188. "endArrowhead": null,
  189. "endBinding": null,
  190. "fillStyle": "hachure",
  191. "groupIds": Array [],
  192. "height": 100,
  193. "id": "id-line01",
  194. "isDeleted": false,
  195. "lastCommittedPoint": null,
  196. "link": null,
  197. "locked": false,
  198. "opacity": 100,
  199. "points": Array [
  200. Array [
  201. 0,
  202. 0,
  203. ],
  204. Array [
  205. 100,
  206. 100,
  207. ],
  208. ],
  209. "roughness": 1,
  210. "roundness": Object {
  211. "type": 2,
  212. },
  213. "seed": Any<Number>,
  214. "startArrowhead": null,
  215. "startBinding": null,
  216. "strokeColor": "#1e1e1e",
  217. "strokeStyle": "solid",
  218. "strokeWidth": 1,
  219. "type": "line",
  220. "updated": 1,
  221. "version": 1,
  222. "versionNonce": 0,
  223. "width": 100,
  224. "x": 0,
  225. "y": 0,
  226. }
  227. `;
  228. exports[`restoreElements should restore line and draw elements correctly 2`] = `
  229. Object {
  230. "angle": 0,
  231. "backgroundColor": "transparent",
  232. "boundElements": Array [],
  233. "endArrowhead": null,
  234. "endBinding": null,
  235. "fillStyle": "hachure",
  236. "groupIds": Array [],
  237. "height": 100,
  238. "id": "id-draw01",
  239. "isDeleted": false,
  240. "lastCommittedPoint": null,
  241. "link": null,
  242. "locked": false,
  243. "opacity": 100,
  244. "points": Array [
  245. Array [
  246. 0,
  247. 0,
  248. ],
  249. Array [
  250. 100,
  251. 100,
  252. ],
  253. ],
  254. "roughness": 1,
  255. "roundness": Object {
  256. "type": 2,
  257. },
  258. "seed": Any<Number>,
  259. "startArrowhead": null,
  260. "startBinding": null,
  261. "strokeColor": "#1e1e1e",
  262. "strokeStyle": "solid",
  263. "strokeWidth": 1,
  264. "type": "line",
  265. "updated": 1,
  266. "version": 1,
  267. "versionNonce": 0,
  268. "width": 100,
  269. "x": 0,
  270. "y": 0,
  271. }
  272. `;
  273. exports[`restoreElements should restore text element correctly passing value for each attribute 1`] = `
  274. Object {
  275. "angle": 0,
  276. "backgroundColor": "transparent",
  277. "baseline": 0,
  278. "boundElements": Array [],
  279. "containerId": null,
  280. "fillStyle": "hachure",
  281. "fontFamily": 1,
  282. "fontSize": 14,
  283. "groupIds": Array [],
  284. "height": 100,
  285. "id": "id-text01",
  286. "isDeleted": false,
  287. "lineHeight": 1.25,
  288. "link": null,
  289. "locked": false,
  290. "opacity": 100,
  291. "originalText": "text",
  292. "roughness": 1,
  293. "roundness": Object {
  294. "type": 3,
  295. },
  296. "seed": Any<Number>,
  297. "strokeColor": "#1e1e1e",
  298. "strokeStyle": "solid",
  299. "strokeWidth": 1,
  300. "text": "text",
  301. "textAlign": "center",
  302. "type": "text",
  303. "updated": 1,
  304. "version": 1,
  305. "versionNonce": 0,
  306. "verticalAlign": "middle",
  307. "width": 100,
  308. "x": -20,
  309. "y": -8.75,
  310. }
  311. `;
  312. exports[`restoreElements should restore text element correctly with unknown font family, null text and undefined alignment 1`] = `
  313. Object {
  314. "angle": 0,
  315. "backgroundColor": "transparent",
  316. "baseline": 0,
  317. "boundElements": Array [],
  318. "containerId": null,
  319. "fillStyle": "hachure",
  320. "fontFamily": 1,
  321. "fontSize": 10,
  322. "groupIds": Array [],
  323. "height": 100,
  324. "id": "id-text01",
  325. "isDeleted": false,
  326. "lineHeight": 1.25,
  327. "link": null,
  328. "locked": false,
  329. "opacity": 100,
  330. "originalText": "test",
  331. "roughness": 1,
  332. "roundness": Object {
  333. "type": 3,
  334. },
  335. "seed": Any<Number>,
  336. "strokeColor": "#1e1e1e",
  337. "strokeStyle": "solid",
  338. "strokeWidth": 1,
  339. "text": "",
  340. "textAlign": "left",
  341. "type": "text",
  342. "updated": 1,
  343. "version": 1,
  344. "versionNonce": 0,
  345. "verticalAlign": "top",
  346. "width": 100,
  347. "x": 0,
  348. "y": 0,
  349. }
  350. `;