restore.test.ts.snap 7.1 KB

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