You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

code.test.ts.snap 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`selection creates a code control: generated code controls from code 1`] = `
  3. Object {
  4. "test-number-control": Object {
  5. "id": "test-number-control",
  6. "label": "x",
  7. "step": 1,
  8. "type": "number",
  9. "value": 0,
  10. },
  11. }
  12. `;
  13. exports[`selection generates a draw shape: generated draw from code 1`] = `
  14. Array [
  15. Object {
  16. "childIndex": 1,
  17. "id": "test-draw",
  18. "isAspectRatioLocked": false,
  19. "isGenerated": true,
  20. "isHidden": false,
  21. "isLocked": false,
  22. "name": "Test draw",
  23. "parentId": "page1",
  24. "point": Array [
  25. 0,
  26. 0,
  27. ],
  28. "points": Array [
  29. Array [
  30. 100,
  31. 100,
  32. ],
  33. Array [
  34. 200,
  35. 200,
  36. ],
  37. Array [
  38. 300,
  39. 300,
  40. ],
  41. ],
  42. "rotation": 0,
  43. "style": Object {
  44. "color": "Red",
  45. "dash": "Dotted",
  46. "isFilled": false,
  47. "size": "Medium",
  48. },
  49. "type": "draw",
  50. },
  51. ]
  52. `;
  53. exports[`selection generates a rectangle shape: generated rectangle from code 1`] = `
  54. Array [
  55. Object {
  56. "childIndex": 1,
  57. "id": "test-rectangle",
  58. "isAspectRatioLocked": false,
  59. "isGenerated": true,
  60. "isHidden": false,
  61. "isLocked": false,
  62. "name": "Test Rectangle",
  63. "parentId": "page1",
  64. "point": Array [
  65. 100,
  66. 100,
  67. ],
  68. "radius": 2,
  69. "rotation": 0,
  70. "size": Array [
  71. 200,
  72. 200,
  73. ],
  74. "style": Object {
  75. "color": "Red",
  76. "dash": "Dotted",
  77. "isFilled": false,
  78. "size": "Medium",
  79. },
  80. "type": "rectangle",
  81. },
  82. ]
  83. `;
  84. exports[`selection generates a text shape: generated draw from code 1`] = `
  85. Array [
  86. Object {
  87. "childIndex": 1,
  88. "id": "test-text",
  89. "isAspectRatioLocked": false,
  90. "isGenerated": true,
  91. "isHidden": false,
  92. "isLocked": false,
  93. "name": "Test text",
  94. "parentId": "page1",
  95. "point": Array [
  96. 100,
  97. 100,
  98. ],
  99. "rotation": 0,
  100. "scale": 1,
  101. "style": Object {
  102. "color": "Red",
  103. "dash": "Dotted",
  104. "isFilled": false,
  105. "size": "Large",
  106. },
  107. "text": "Hello world!",
  108. "type": "text",
  109. },
  110. ]
  111. `;
  112. exports[`selection generates an arrow shape: generated draw from code 1`] = `
  113. Array [
  114. Object {
  115. "bend": 0,
  116. "childIndex": 1,
  117. "decorations": Object {
  118. "end": "Arrow",
  119. "middle": null,
  120. "start": null,
  121. },
  122. "handles": Object {
  123. "bend": Object {
  124. "id": "bend",
  125. "index": 2,
  126. "point": Array [
  127. 0,
  128. 0,
  129. ],
  130. },
  131. "end": Object {
  132. "id": "end",
  133. "index": 1,
  134. "point": Array [
  135. 0,
  136. 0,
  137. ],
  138. },
  139. "start": Object {
  140. "id": "start",
  141. "index": 0,
  142. "point": Array [
  143. 0,
  144. 0,
  145. ],
  146. },
  147. },
  148. "id": "test-draw",
  149. "isAspectRatioLocked": false,
  150. "isGenerated": true,
  151. "isHidden": false,
  152. "isLocked": false,
  153. "name": "Test draw",
  154. "parentId": "page1",
  155. "point": Array [
  156. 0,
  157. 0,
  158. ],
  159. "points": Array [
  160. Array [
  161. 100,
  162. 100,
  163. ],
  164. Array [
  165. 200,
  166. 200,
  167. ],
  168. Array [
  169. 300,
  170. 300,
  171. ],
  172. ],
  173. "rotation": 0,
  174. "style": Object {
  175. "color": "Red",
  176. "dash": "Dotted",
  177. "isFilled": false,
  178. "size": "Medium",
  179. },
  180. "type": "arrow",
  181. },
  182. ]
  183. `;
  184. exports[`selection generates an ellipse shape: generated ellipse from code 1`] = `
  185. Array [
  186. Object {
  187. "childIndex": 1,
  188. "id": "test-ellipse",
  189. "isAspectRatioLocked": false,
  190. "isGenerated": true,
  191. "isHidden": false,
  192. "isLocked": false,
  193. "name": "Test ellipse",
  194. "parentId": "page1",
  195. "point": Array [
  196. 100,
  197. 100,
  198. ],
  199. "radiusX": 100,
  200. "radiusY": 200,
  201. "rotation": 0,
  202. "style": Object {
  203. "color": "Red",
  204. "dash": "Dotted",
  205. "isFilled": false,
  206. "size": "Medium",
  207. },
  208. "type": "ellipse",
  209. },
  210. ]
  211. `;
  212. exports[`selection generates shapes: generated rectangle from code 1`] = `
  213. Array [
  214. Object {
  215. "childIndex": 1,
  216. "id": "test-rectangle",
  217. "isAspectRatioLocked": false,
  218. "isGenerated": true,
  219. "isHidden": false,
  220. "isLocked": false,
  221. "name": "Test Rectangle",
  222. "parentId": "page1",
  223. "point": Array [
  224. 100,
  225. 100,
  226. ],
  227. "radius": 2,
  228. "rotation": 0,
  229. "size": Array [
  230. 200,
  231. 200,
  232. ],
  233. "style": Object {
  234. "color": "Red",
  235. "dash": "Dotted",
  236. "isFilled": false,
  237. "size": "Medium",
  238. },
  239. "type": "rectangle",
  240. },
  241. ]
  242. `;
  243. exports[`selection updates a code control: data in state after changing control 1`] = `
  244. Object {
  245. "test-number-control": Object {
  246. "id": "test-number-control",
  247. "label": "x",
  248. "step": 1,
  249. "type": "number",
  250. "value": 100,
  251. },
  252. "test-vector-control": Object {
  253. "id": "test-vector-control",
  254. "isNormalized": false,
  255. "label": "size",
  256. "type": "vector",
  257. "value": Array [
  258. 0,
  259. 0,
  260. ],
  261. },
  262. }
  263. `;
  264. exports[`selection updates a code control: rectangle in state after changing code control 1`] = `
  265. Object {
  266. "childIndex": 1,
  267. "id": "test-rectangle",
  268. "isAspectRatioLocked": false,
  269. "isGenerated": true,
  270. "isHidden": false,
  271. "isLocked": false,
  272. "name": "Test Rectangle",
  273. "parentId": "page1",
  274. "point": Array [
  275. 0,
  276. 100,
  277. ],
  278. "radius": 2,
  279. "rotation": 0,
  280. "size": Array [
  281. 0,
  282. 0,
  283. ],
  284. "style": Object {
  285. "color": "Red",
  286. "dash": "Dotted",
  287. "isFilled": false,
  288. "size": "Medium",
  289. },
  290. "type": "rectangle",
  291. }
  292. `;