contextmenu.test.tsx.snap 110 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`contextMenu element selecting 'Add to library' in context menu adds element to library: [end of test] appState 1`] = `
  3. Object {
  4. "collaborators": Map {},
  5. "currentChartType": "bar",
  6. "currentItemBackgroundColor": "transparent",
  7. "currentItemEndArrowhead": "arrow",
  8. "currentItemFillStyle": "hachure",
  9. "currentItemFontFamily": 1,
  10. "currentItemFontSize": 20,
  11. "currentItemLinearStrokeSharpness": "round",
  12. "currentItemOpacity": 100,
  13. "currentItemRoughness": 1,
  14. "currentItemStartArrowhead": null,
  15. "currentItemStrokeColor": "#000000",
  16. "currentItemStrokeSharpness": "sharp",
  17. "currentItemStrokeStyle": "solid",
  18. "currentItemStrokeWidth": 1,
  19. "currentItemTextAlign": "left",
  20. "cursorButton": "up",
  21. "draggingElement": null,
  22. "editingElement": null,
  23. "editingGroupId": null,
  24. "editingLinearElement": null,
  25. "elementLocked": false,
  26. "elementType": "selection",
  27. "errorMessage": null,
  28. "exportBackground": true,
  29. "exportEmbedScene": false,
  30. "exportWithDarkMode": false,
  31. "fileHandle": null,
  32. "gridSize": null,
  33. "height": 100,
  34. "isBindingEnabled": true,
  35. "isLibraryOpen": false,
  36. "isLoading": false,
  37. "isResizing": false,
  38. "isRotating": false,
  39. "lastPointerDownWith": "mouse",
  40. "multiElement": null,
  41. "name": "Untitled-201933152653",
  42. "offsetLeft": 20,
  43. "offsetTop": 10,
  44. "openMenu": null,
  45. "pasteDialog": Object {
  46. "data": null,
  47. "shown": false,
  48. },
  49. "previousSelectedElementIds": Object {},
  50. "resizingElement": null,
  51. "scrollX": 0,
  52. "scrollY": 0,
  53. "scrolledOutside": false,
  54. "selectedElementIds": Object {
  55. "id0": true,
  56. },
  57. "selectedGroupIds": Object {},
  58. "selectionElement": null,
  59. "shouldCacheIgnoreZoom": false,
  60. "showHelpDialog": false,
  61. "showStats": false,
  62. "startBoundElement": null,
  63. "suggestedBindings": Array [],
  64. "theme": "light",
  65. "toastMessage": null,
  66. "viewBackgroundColor": "#ffffff",
  67. "viewModeEnabled": false,
  68. "width": 200,
  69. "zenModeEnabled": false,
  70. "zoom": Object {
  71. "translation": Object {
  72. "x": 0,
  73. "y": 0,
  74. },
  75. "value": 1,
  76. },
  77. }
  78. `;
  79. exports[`contextMenu element selecting 'Add to library' in context menu adds element to library: [end of test] element 0 1`] = `
  80. Object {
  81. "angle": 0,
  82. "backgroundColor": "transparent",
  83. "boundElementIds": null,
  84. "fillStyle": "hachure",
  85. "groupIds": Array [],
  86. "height": 20,
  87. "id": "id0",
  88. "isDeleted": false,
  89. "opacity": 100,
  90. "roughness": 1,
  91. "seed": 1278240551,
  92. "strokeColor": "#000000",
  93. "strokeSharpness": "sharp",
  94. "strokeStyle": "solid",
  95. "strokeWidth": 1,
  96. "type": "rectangle",
  97. "version": 2,
  98. "versionNonce": 449462985,
  99. "width": 20,
  100. "x": -10,
  101. "y": 0,
  102. }
  103. `;
  104. exports[`contextMenu element selecting 'Add to library' in context menu adds element to library: [end of test] history 1`] = `
  105. Object {
  106. "recording": false,
  107. "redoStack": Array [],
  108. "stateHistory": Array [
  109. Object {
  110. "appState": Object {
  111. "editingGroupId": null,
  112. "editingLinearElement": null,
  113. "name": "Untitled-201933152653",
  114. "selectedElementIds": Object {},
  115. "viewBackgroundColor": "#ffffff",
  116. },
  117. "elements": Array [],
  118. },
  119. Object {
  120. "appState": Object {
  121. "editingGroupId": null,
  122. "editingLinearElement": null,
  123. "name": "Untitled-201933152653",
  124. "selectedElementIds": Object {
  125. "id0": true,
  126. },
  127. "viewBackgroundColor": "#ffffff",
  128. },
  129. "elements": Array [
  130. Object {
  131. "angle": 0,
  132. "backgroundColor": "transparent",
  133. "boundElementIds": null,
  134. "fillStyle": "hachure",
  135. "groupIds": Array [],
  136. "height": 20,
  137. "id": "id0",
  138. "isDeleted": false,
  139. "opacity": 100,
  140. "roughness": 1,
  141. "seed": 1278240551,
  142. "strokeColor": "#000000",
  143. "strokeSharpness": "sharp",
  144. "strokeStyle": "solid",
  145. "strokeWidth": 1,
  146. "type": "rectangle",
  147. "version": 2,
  148. "versionNonce": 449462985,
  149. "width": 20,
  150. "x": -10,
  151. "y": 0,
  152. },
  153. ],
  154. },
  155. ],
  156. }
  157. `;
  158. exports[`contextMenu element selecting 'Add to library' in context menu adds element to library: [end of test] number of elements 1`] = `1`;
  159. exports[`contextMenu element selecting 'Add to library' in context menu adds element to library: [end of test] number of renders 1`] = `9`;
  160. exports[`contextMenu element selecting 'Bring forward' in context menu brings element forward: [end of test] appState 1`] = `
  161. Object {
  162. "collaborators": Map {},
  163. "currentChartType": "bar",
  164. "currentItemBackgroundColor": "transparent",
  165. "currentItemEndArrowhead": "arrow",
  166. "currentItemFillStyle": "hachure",
  167. "currentItemFontFamily": 1,
  168. "currentItemFontSize": 20,
  169. "currentItemLinearStrokeSharpness": "round",
  170. "currentItemOpacity": 100,
  171. "currentItemRoughness": 1,
  172. "currentItemStartArrowhead": null,
  173. "currentItemStrokeColor": "#000000",
  174. "currentItemStrokeSharpness": "sharp",
  175. "currentItemStrokeStyle": "solid",
  176. "currentItemStrokeWidth": 1,
  177. "currentItemTextAlign": "left",
  178. "cursorButton": "up",
  179. "draggingElement": null,
  180. "editingElement": null,
  181. "editingGroupId": null,
  182. "editingLinearElement": null,
  183. "elementLocked": false,
  184. "elementType": "selection",
  185. "errorMessage": null,
  186. "exportBackground": true,
  187. "exportEmbedScene": false,
  188. "exportWithDarkMode": false,
  189. "fileHandle": null,
  190. "gridSize": null,
  191. "height": 100,
  192. "isBindingEnabled": true,
  193. "isLibraryOpen": false,
  194. "isLoading": false,
  195. "isResizing": false,
  196. "isRotating": false,
  197. "lastPointerDownWith": "mouse",
  198. "multiElement": null,
  199. "name": "Untitled-201933152653",
  200. "offsetLeft": 20,
  201. "offsetTop": 10,
  202. "openMenu": null,
  203. "pasteDialog": Object {
  204. "data": null,
  205. "shown": false,
  206. },
  207. "previousSelectedElementIds": Object {},
  208. "resizingElement": null,
  209. "scrollX": 0,
  210. "scrollY": 0,
  211. "scrolledOutside": false,
  212. "selectedElementIds": Object {
  213. "id0": true,
  214. },
  215. "selectedGroupIds": Object {},
  216. "selectionElement": null,
  217. "shouldCacheIgnoreZoom": false,
  218. "showHelpDialog": false,
  219. "showStats": false,
  220. "startBoundElement": null,
  221. "suggestedBindings": Array [],
  222. "theme": "light",
  223. "toastMessage": null,
  224. "viewBackgroundColor": "#ffffff",
  225. "viewModeEnabled": false,
  226. "width": 200,
  227. "zenModeEnabled": false,
  228. "zoom": Object {
  229. "translation": Object {
  230. "x": 0,
  231. "y": 0,
  232. },
  233. "value": 1,
  234. },
  235. }
  236. `;
  237. exports[`contextMenu element selecting 'Bring forward' in context menu brings element forward: [end of test] element 0 1`] = `
  238. Object {
  239. "angle": 0,
  240. "backgroundColor": "transparent",
  241. "boundElementIds": null,
  242. "fillStyle": "hachure",
  243. "groupIds": Array [],
  244. "height": 20,
  245. "id": "id1",
  246. "isDeleted": false,
  247. "opacity": 100,
  248. "roughness": 1,
  249. "seed": 453191,
  250. "strokeColor": "#000000",
  251. "strokeSharpness": "sharp",
  252. "strokeStyle": "solid",
  253. "strokeWidth": 1,
  254. "type": "rectangle",
  255. "version": 2,
  256. "versionNonce": 401146281,
  257. "width": 20,
  258. "x": 20,
  259. "y": 30,
  260. }
  261. `;
  262. exports[`contextMenu element selecting 'Bring forward' in context menu brings element forward: [end of test] element 1 1`] = `
  263. Object {
  264. "angle": 0,
  265. "backgroundColor": "transparent",
  266. "boundElementIds": null,
  267. "fillStyle": "hachure",
  268. "groupIds": Array [],
  269. "height": 20,
  270. "id": "id0",
  271. "isDeleted": false,
  272. "opacity": 100,
  273. "roughness": 1,
  274. "seed": 1278240551,
  275. "strokeColor": "#000000",
  276. "strokeSharpness": "sharp",
  277. "strokeStyle": "solid",
  278. "strokeWidth": 1,
  279. "type": "rectangle",
  280. "version": 3,
  281. "versionNonce": 2019559783,
  282. "width": 20,
  283. "x": -10,
  284. "y": 0,
  285. }
  286. `;
  287. exports[`contextMenu element selecting 'Bring forward' in context menu brings element forward: [end of test] history 1`] = `
  288. Object {
  289. "recording": false,
  290. "redoStack": Array [],
  291. "stateHistory": Array [
  292. Object {
  293. "appState": Object {
  294. "editingGroupId": null,
  295. "editingLinearElement": null,
  296. "name": "Untitled-201933152653",
  297. "selectedElementIds": Object {},
  298. "viewBackgroundColor": "#ffffff",
  299. },
  300. "elements": Array [],
  301. },
  302. Object {
  303. "appState": Object {
  304. "editingGroupId": null,
  305. "editingLinearElement": null,
  306. "name": "Untitled-201933152653",
  307. "selectedElementIds": Object {
  308. "id0": true,
  309. },
  310. "viewBackgroundColor": "#ffffff",
  311. },
  312. "elements": Array [
  313. Object {
  314. "angle": 0,
  315. "backgroundColor": "transparent",
  316. "boundElementIds": null,
  317. "fillStyle": "hachure",
  318. "groupIds": Array [],
  319. "height": 20,
  320. "id": "id0",
  321. "isDeleted": false,
  322. "opacity": 100,
  323. "roughness": 1,
  324. "seed": 1278240551,
  325. "strokeColor": "#000000",
  326. "strokeSharpness": "sharp",
  327. "strokeStyle": "solid",
  328. "strokeWidth": 1,
  329. "type": "rectangle",
  330. "version": 2,
  331. "versionNonce": 449462985,
  332. "width": 20,
  333. "x": -10,
  334. "y": 0,
  335. },
  336. ],
  337. },
  338. Object {
  339. "appState": Object {
  340. "editingGroupId": null,
  341. "editingLinearElement": null,
  342. "name": "Untitled-201933152653",
  343. "selectedElementIds": Object {
  344. "id1": true,
  345. },
  346. "viewBackgroundColor": "#ffffff",
  347. },
  348. "elements": Array [
  349. Object {
  350. "angle": 0,
  351. "backgroundColor": "transparent",
  352. "boundElementIds": null,
  353. "fillStyle": "hachure",
  354. "groupIds": Array [],
  355. "height": 20,
  356. "id": "id0",
  357. "isDeleted": false,
  358. "opacity": 100,
  359. "roughness": 1,
  360. "seed": 1278240551,
  361. "strokeColor": "#000000",
  362. "strokeSharpness": "sharp",
  363. "strokeStyle": "solid",
  364. "strokeWidth": 1,
  365. "type": "rectangle",
  366. "version": 2,
  367. "versionNonce": 449462985,
  368. "width": 20,
  369. "x": -10,
  370. "y": 0,
  371. },
  372. Object {
  373. "angle": 0,
  374. "backgroundColor": "transparent",
  375. "boundElementIds": null,
  376. "fillStyle": "hachure",
  377. "groupIds": Array [],
  378. "height": 20,
  379. "id": "id1",
  380. "isDeleted": false,
  381. "opacity": 100,
  382. "roughness": 1,
  383. "seed": 453191,
  384. "strokeColor": "#000000",
  385. "strokeSharpness": "sharp",
  386. "strokeStyle": "solid",
  387. "strokeWidth": 1,
  388. "type": "rectangle",
  389. "version": 2,
  390. "versionNonce": 401146281,
  391. "width": 20,
  392. "x": 20,
  393. "y": 30,
  394. },
  395. ],
  396. },
  397. Object {
  398. "appState": Object {
  399. "editingGroupId": null,
  400. "editingLinearElement": null,
  401. "name": "Untitled-201933152653",
  402. "selectedElementIds": Object {
  403. "id0": true,
  404. },
  405. "viewBackgroundColor": "#ffffff",
  406. },
  407. "elements": Array [
  408. Object {
  409. "angle": 0,
  410. "backgroundColor": "transparent",
  411. "boundElementIds": null,
  412. "fillStyle": "hachure",
  413. "groupIds": Array [],
  414. "height": 20,
  415. "id": "id1",
  416. "isDeleted": false,
  417. "opacity": 100,
  418. "roughness": 1,
  419. "seed": 453191,
  420. "strokeColor": "#000000",
  421. "strokeSharpness": "sharp",
  422. "strokeStyle": "solid",
  423. "strokeWidth": 1,
  424. "type": "rectangle",
  425. "version": 2,
  426. "versionNonce": 401146281,
  427. "width": 20,
  428. "x": 20,
  429. "y": 30,
  430. },
  431. Object {
  432. "angle": 0,
  433. "backgroundColor": "transparent",
  434. "boundElementIds": null,
  435. "fillStyle": "hachure",
  436. "groupIds": Array [],
  437. "height": 20,
  438. "id": "id0",
  439. "isDeleted": false,
  440. "opacity": 100,
  441. "roughness": 1,
  442. "seed": 1278240551,
  443. "strokeColor": "#000000",
  444. "strokeSharpness": "sharp",
  445. "strokeStyle": "solid",
  446. "strokeWidth": 1,
  447. "type": "rectangle",
  448. "version": 3,
  449. "versionNonce": 2019559783,
  450. "width": 20,
  451. "x": -10,
  452. "y": 0,
  453. },
  454. ],
  455. },
  456. ],
  457. }
  458. `;
  459. exports[`contextMenu element selecting 'Bring forward' in context menu brings element forward: [end of test] number of elements 1`] = `2`;
  460. exports[`contextMenu element selecting 'Bring forward' in context menu brings element forward: [end of test] number of renders 1`] = `15`;
  461. exports[`contextMenu element selecting 'Bring to front' in context menu brings element to front: [end of test] appState 1`] = `
  462. Object {
  463. "collaborators": Map {},
  464. "currentChartType": "bar",
  465. "currentItemBackgroundColor": "transparent",
  466. "currentItemEndArrowhead": "arrow",
  467. "currentItemFillStyle": "hachure",
  468. "currentItemFontFamily": 1,
  469. "currentItemFontSize": 20,
  470. "currentItemLinearStrokeSharpness": "round",
  471. "currentItemOpacity": 100,
  472. "currentItemRoughness": 1,
  473. "currentItemStartArrowhead": null,
  474. "currentItemStrokeColor": "#000000",
  475. "currentItemStrokeSharpness": "sharp",
  476. "currentItemStrokeStyle": "solid",
  477. "currentItemStrokeWidth": 1,
  478. "currentItemTextAlign": "left",
  479. "cursorButton": "up",
  480. "draggingElement": null,
  481. "editingElement": null,
  482. "editingGroupId": null,
  483. "editingLinearElement": null,
  484. "elementLocked": false,
  485. "elementType": "selection",
  486. "errorMessage": null,
  487. "exportBackground": true,
  488. "exportEmbedScene": false,
  489. "exportWithDarkMode": false,
  490. "fileHandle": null,
  491. "gridSize": null,
  492. "height": 100,
  493. "isBindingEnabled": true,
  494. "isLibraryOpen": false,
  495. "isLoading": false,
  496. "isResizing": false,
  497. "isRotating": false,
  498. "lastPointerDownWith": "mouse",
  499. "multiElement": null,
  500. "name": "Untitled-201933152653",
  501. "offsetLeft": 20,
  502. "offsetTop": 10,
  503. "openMenu": null,
  504. "pasteDialog": Object {
  505. "data": null,
  506. "shown": false,
  507. },
  508. "previousSelectedElementIds": Object {},
  509. "resizingElement": null,
  510. "scrollX": 0,
  511. "scrollY": 0,
  512. "scrolledOutside": false,
  513. "selectedElementIds": Object {
  514. "id0": true,
  515. },
  516. "selectedGroupIds": Object {},
  517. "selectionElement": null,
  518. "shouldCacheIgnoreZoom": false,
  519. "showHelpDialog": false,
  520. "showStats": false,
  521. "startBoundElement": null,
  522. "suggestedBindings": Array [],
  523. "theme": "light",
  524. "toastMessage": null,
  525. "viewBackgroundColor": "#ffffff",
  526. "viewModeEnabled": false,
  527. "width": 200,
  528. "zenModeEnabled": false,
  529. "zoom": Object {
  530. "translation": Object {
  531. "x": 0,
  532. "y": 0,
  533. },
  534. "value": 1,
  535. },
  536. }
  537. `;
  538. exports[`contextMenu element selecting 'Bring to front' in context menu brings element to front: [end of test] element 0 1`] = `
  539. Object {
  540. "angle": 0,
  541. "backgroundColor": "transparent",
  542. "boundElementIds": null,
  543. "fillStyle": "hachure",
  544. "groupIds": Array [],
  545. "height": 20,
  546. "id": "id1",
  547. "isDeleted": false,
  548. "opacity": 100,
  549. "roughness": 1,
  550. "seed": 453191,
  551. "strokeColor": "#000000",
  552. "strokeSharpness": "sharp",
  553. "strokeStyle": "solid",
  554. "strokeWidth": 1,
  555. "type": "rectangle",
  556. "version": 2,
  557. "versionNonce": 401146281,
  558. "width": 20,
  559. "x": 20,
  560. "y": 30,
  561. }
  562. `;
  563. exports[`contextMenu element selecting 'Bring to front' in context menu brings element to front: [end of test] element 1 1`] = `
  564. Object {
  565. "angle": 0,
  566. "backgroundColor": "transparent",
  567. "boundElementIds": null,
  568. "fillStyle": "hachure",
  569. "groupIds": Array [],
  570. "height": 20,
  571. "id": "id0",
  572. "isDeleted": false,
  573. "opacity": 100,
  574. "roughness": 1,
  575. "seed": 1278240551,
  576. "strokeColor": "#000000",
  577. "strokeSharpness": "sharp",
  578. "strokeStyle": "solid",
  579. "strokeWidth": 1,
  580. "type": "rectangle",
  581. "version": 3,
  582. "versionNonce": 2019559783,
  583. "width": 20,
  584. "x": -10,
  585. "y": 0,
  586. }
  587. `;
  588. exports[`contextMenu element selecting 'Bring to front' in context menu brings element to front: [end of test] history 1`] = `
  589. Object {
  590. "recording": false,
  591. "redoStack": Array [],
  592. "stateHistory": Array [
  593. Object {
  594. "appState": Object {
  595. "editingGroupId": null,
  596. "editingLinearElement": null,
  597. "name": "Untitled-201933152653",
  598. "selectedElementIds": Object {},
  599. "viewBackgroundColor": "#ffffff",
  600. },
  601. "elements": Array [],
  602. },
  603. Object {
  604. "appState": Object {
  605. "editingGroupId": null,
  606. "editingLinearElement": null,
  607. "name": "Untitled-201933152653",
  608. "selectedElementIds": Object {
  609. "id0": true,
  610. },
  611. "viewBackgroundColor": "#ffffff",
  612. },
  613. "elements": Array [
  614. Object {
  615. "angle": 0,
  616. "backgroundColor": "transparent",
  617. "boundElementIds": null,
  618. "fillStyle": "hachure",
  619. "groupIds": Array [],
  620. "height": 20,
  621. "id": "id0",
  622. "isDeleted": false,
  623. "opacity": 100,
  624. "roughness": 1,
  625. "seed": 1278240551,
  626. "strokeColor": "#000000",
  627. "strokeSharpness": "sharp",
  628. "strokeStyle": "solid",
  629. "strokeWidth": 1,
  630. "type": "rectangle",
  631. "version": 2,
  632. "versionNonce": 449462985,
  633. "width": 20,
  634. "x": -10,
  635. "y": 0,
  636. },
  637. ],
  638. },
  639. Object {
  640. "appState": Object {
  641. "editingGroupId": null,
  642. "editingLinearElement": null,
  643. "name": "Untitled-201933152653",
  644. "selectedElementIds": Object {
  645. "id1": true,
  646. },
  647. "viewBackgroundColor": "#ffffff",
  648. },
  649. "elements": Array [
  650. Object {
  651. "angle": 0,
  652. "backgroundColor": "transparent",
  653. "boundElementIds": null,
  654. "fillStyle": "hachure",
  655. "groupIds": Array [],
  656. "height": 20,
  657. "id": "id0",
  658. "isDeleted": false,
  659. "opacity": 100,
  660. "roughness": 1,
  661. "seed": 1278240551,
  662. "strokeColor": "#000000",
  663. "strokeSharpness": "sharp",
  664. "strokeStyle": "solid",
  665. "strokeWidth": 1,
  666. "type": "rectangle",
  667. "version": 2,
  668. "versionNonce": 449462985,
  669. "width": 20,
  670. "x": -10,
  671. "y": 0,
  672. },
  673. Object {
  674. "angle": 0,
  675. "backgroundColor": "transparent",
  676. "boundElementIds": null,
  677. "fillStyle": "hachure",
  678. "groupIds": Array [],
  679. "height": 20,
  680. "id": "id1",
  681. "isDeleted": false,
  682. "opacity": 100,
  683. "roughness": 1,
  684. "seed": 453191,
  685. "strokeColor": "#000000",
  686. "strokeSharpness": "sharp",
  687. "strokeStyle": "solid",
  688. "strokeWidth": 1,
  689. "type": "rectangle",
  690. "version": 2,
  691. "versionNonce": 401146281,
  692. "width": 20,
  693. "x": 20,
  694. "y": 30,
  695. },
  696. ],
  697. },
  698. Object {
  699. "appState": Object {
  700. "editingGroupId": null,
  701. "editingLinearElement": null,
  702. "name": "Untitled-201933152653",
  703. "selectedElementIds": Object {
  704. "id0": true,
  705. },
  706. "viewBackgroundColor": "#ffffff",
  707. },
  708. "elements": Array [
  709. Object {
  710. "angle": 0,
  711. "backgroundColor": "transparent",
  712. "boundElementIds": null,
  713. "fillStyle": "hachure",
  714. "groupIds": Array [],
  715. "height": 20,
  716. "id": "id1",
  717. "isDeleted": false,
  718. "opacity": 100,
  719. "roughness": 1,
  720. "seed": 453191,
  721. "strokeColor": "#000000",
  722. "strokeSharpness": "sharp",
  723. "strokeStyle": "solid",
  724. "strokeWidth": 1,
  725. "type": "rectangle",
  726. "version": 2,
  727. "versionNonce": 401146281,
  728. "width": 20,
  729. "x": 20,
  730. "y": 30,
  731. },
  732. Object {
  733. "angle": 0,
  734. "backgroundColor": "transparent",
  735. "boundElementIds": null,
  736. "fillStyle": "hachure",
  737. "groupIds": Array [],
  738. "height": 20,
  739. "id": "id0",
  740. "isDeleted": false,
  741. "opacity": 100,
  742. "roughness": 1,
  743. "seed": 1278240551,
  744. "strokeColor": "#000000",
  745. "strokeSharpness": "sharp",
  746. "strokeStyle": "solid",
  747. "strokeWidth": 1,
  748. "type": "rectangle",
  749. "version": 3,
  750. "versionNonce": 2019559783,
  751. "width": 20,
  752. "x": -10,
  753. "y": 0,
  754. },
  755. ],
  756. },
  757. ],
  758. }
  759. `;
  760. exports[`contextMenu element selecting 'Bring to front' in context menu brings element to front: [end of test] number of elements 1`] = `2`;
  761. exports[`contextMenu element selecting 'Bring to front' in context menu brings element to front: [end of test] number of renders 1`] = `15`;
  762. exports[`contextMenu element selecting 'Copy styles' in context menu copies styles: [end of test] appState 1`] = `
  763. Object {
  764. "collaborators": Map {},
  765. "currentChartType": "bar",
  766. "currentItemBackgroundColor": "transparent",
  767. "currentItemEndArrowhead": "arrow",
  768. "currentItemFillStyle": "hachure",
  769. "currentItemFontFamily": 1,
  770. "currentItemFontSize": 20,
  771. "currentItemLinearStrokeSharpness": "round",
  772. "currentItemOpacity": 100,
  773. "currentItemRoughness": 1,
  774. "currentItemStartArrowhead": null,
  775. "currentItemStrokeColor": "#000000",
  776. "currentItemStrokeSharpness": "sharp",
  777. "currentItemStrokeStyle": "solid",
  778. "currentItemStrokeWidth": 1,
  779. "currentItemTextAlign": "left",
  780. "cursorButton": "up",
  781. "draggingElement": null,
  782. "editingElement": null,
  783. "editingGroupId": null,
  784. "editingLinearElement": null,
  785. "elementLocked": false,
  786. "elementType": "selection",
  787. "errorMessage": null,
  788. "exportBackground": true,
  789. "exportEmbedScene": false,
  790. "exportWithDarkMode": false,
  791. "fileHandle": null,
  792. "gridSize": null,
  793. "height": 100,
  794. "isBindingEnabled": true,
  795. "isLibraryOpen": false,
  796. "isLoading": false,
  797. "isResizing": false,
  798. "isRotating": false,
  799. "lastPointerDownWith": "mouse",
  800. "multiElement": null,
  801. "name": "Untitled-201933152653",
  802. "offsetLeft": 20,
  803. "offsetTop": 10,
  804. "openMenu": null,
  805. "pasteDialog": Object {
  806. "data": null,
  807. "shown": false,
  808. },
  809. "previousSelectedElementIds": Object {},
  810. "resizingElement": null,
  811. "scrollX": 0,
  812. "scrollY": 0,
  813. "scrolledOutside": false,
  814. "selectedElementIds": Object {
  815. "id0": true,
  816. },
  817. "selectedGroupIds": Object {},
  818. "selectionElement": null,
  819. "shouldCacheIgnoreZoom": false,
  820. "showHelpDialog": false,
  821. "showStats": false,
  822. "startBoundElement": null,
  823. "suggestedBindings": Array [],
  824. "theme": "light",
  825. "toastMessage": "Copied styles.",
  826. "viewBackgroundColor": "#ffffff",
  827. "viewModeEnabled": false,
  828. "width": 200,
  829. "zenModeEnabled": false,
  830. "zoom": Object {
  831. "translation": Object {
  832. "x": 0,
  833. "y": 0,
  834. },
  835. "value": 1,
  836. },
  837. }
  838. `;
  839. exports[`contextMenu element selecting 'Copy styles' in context menu copies styles: [end of test] element 0 1`] = `
  840. Object {
  841. "angle": 0,
  842. "backgroundColor": "transparent",
  843. "boundElementIds": null,
  844. "fillStyle": "hachure",
  845. "groupIds": Array [],
  846. "height": 20,
  847. "id": "id0",
  848. "isDeleted": false,
  849. "opacity": 100,
  850. "roughness": 1,
  851. "seed": 449462985,
  852. "strokeColor": "#000000",
  853. "strokeSharpness": "sharp",
  854. "strokeStyle": "solid",
  855. "strokeWidth": 1,
  856. "type": "rectangle",
  857. "version": 2,
  858. "versionNonce": 453191,
  859. "width": 20,
  860. "x": -10,
  861. "y": 0,
  862. }
  863. `;
  864. exports[`contextMenu element selecting 'Copy styles' in context menu copies styles: [end of test] history 1`] = `
  865. Object {
  866. "recording": false,
  867. "redoStack": Array [],
  868. "stateHistory": Array [
  869. Object {
  870. "appState": Object {
  871. "editingGroupId": null,
  872. "editingLinearElement": null,
  873. "name": "Untitled-201933152653",
  874. "selectedElementIds": Object {},
  875. "viewBackgroundColor": "#ffffff",
  876. },
  877. "elements": Array [],
  878. },
  879. Object {
  880. "appState": Object {
  881. "editingGroupId": null,
  882. "editingLinearElement": null,
  883. "name": "Untitled-201933152653",
  884. "selectedElementIds": Object {
  885. "id0": true,
  886. },
  887. "viewBackgroundColor": "#ffffff",
  888. },
  889. "elements": Array [
  890. Object {
  891. "angle": 0,
  892. "backgroundColor": "transparent",
  893. "boundElementIds": null,
  894. "fillStyle": "hachure",
  895. "groupIds": Array [],
  896. "height": 20,
  897. "id": "id0",
  898. "isDeleted": false,
  899. "opacity": 100,
  900. "roughness": 1,
  901. "seed": 449462985,
  902. "strokeColor": "#000000",
  903. "strokeSharpness": "sharp",
  904. "strokeStyle": "solid",
  905. "strokeWidth": 1,
  906. "type": "rectangle",
  907. "version": 2,
  908. "versionNonce": 453191,
  909. "width": 20,
  910. "x": -10,
  911. "y": 0,
  912. },
  913. ],
  914. },
  915. ],
  916. }
  917. `;
  918. exports[`contextMenu element selecting 'Copy styles' in context menu copies styles: [end of test] number of elements 1`] = `1`;
  919. exports[`contextMenu element selecting 'Copy styles' in context menu copies styles: [end of test] number of renders 1`] = `10`;
  920. exports[`contextMenu element selecting 'Delete' in context menu deletes element: [end of test] appState 1`] = `
  921. Object {
  922. "collaborators": Map {},
  923. "currentChartType": "bar",
  924. "currentItemBackgroundColor": "transparent",
  925. "currentItemEndArrowhead": "arrow",
  926. "currentItemFillStyle": "hachure",
  927. "currentItemFontFamily": 1,
  928. "currentItemFontSize": 20,
  929. "currentItemLinearStrokeSharpness": "round",
  930. "currentItemOpacity": 100,
  931. "currentItemRoughness": 1,
  932. "currentItemStartArrowhead": null,
  933. "currentItemStrokeColor": "#000000",
  934. "currentItemStrokeSharpness": "sharp",
  935. "currentItemStrokeStyle": "solid",
  936. "currentItemStrokeWidth": 1,
  937. "currentItemTextAlign": "left",
  938. "cursorButton": "up",
  939. "draggingElement": null,
  940. "editingElement": null,
  941. "editingGroupId": null,
  942. "editingLinearElement": null,
  943. "elementLocked": false,
  944. "elementType": "selection",
  945. "errorMessage": null,
  946. "exportBackground": true,
  947. "exportEmbedScene": false,
  948. "exportWithDarkMode": false,
  949. "fileHandle": null,
  950. "gridSize": null,
  951. "height": 100,
  952. "isBindingEnabled": true,
  953. "isLibraryOpen": false,
  954. "isLoading": false,
  955. "isResizing": false,
  956. "isRotating": false,
  957. "lastPointerDownWith": "mouse",
  958. "multiElement": null,
  959. "name": "Untitled-201933152653",
  960. "offsetLeft": 20,
  961. "offsetTop": 10,
  962. "openMenu": null,
  963. "pasteDialog": Object {
  964. "data": null,
  965. "shown": false,
  966. },
  967. "previousSelectedElementIds": Object {},
  968. "resizingElement": null,
  969. "scrollX": 0,
  970. "scrollY": 0,
  971. "scrolledOutside": false,
  972. "selectedElementIds": Object {},
  973. "selectedGroupIds": Object {},
  974. "selectionElement": null,
  975. "shouldCacheIgnoreZoom": false,
  976. "showHelpDialog": false,
  977. "showStats": false,
  978. "startBoundElement": null,
  979. "suggestedBindings": Array [],
  980. "theme": "light",
  981. "toastMessage": null,
  982. "viewBackgroundColor": "#ffffff",
  983. "viewModeEnabled": false,
  984. "width": 200,
  985. "zenModeEnabled": false,
  986. "zoom": Object {
  987. "translation": Object {
  988. "x": 0,
  989. "y": 0,
  990. },
  991. "value": 1,
  992. },
  993. }
  994. `;
  995. exports[`contextMenu element selecting 'Delete' in context menu deletes element: [end of test] element 0 1`] = `
  996. Object {
  997. "angle": 0,
  998. "backgroundColor": "transparent",
  999. "boundElementIds": null,
  1000. "fillStyle": "hachure",
  1001. "groupIds": Array [],
  1002. "height": 20,
  1003. "id": "id0",
  1004. "isDeleted": true,
  1005. "opacity": 100,
  1006. "roughness": 1,
  1007. "seed": 1278240551,
  1008. "strokeColor": "#000000",
  1009. "strokeSharpness": "sharp",
  1010. "strokeStyle": "solid",
  1011. "strokeWidth": 1,
  1012. "type": "rectangle",
  1013. "version": 3,
  1014. "versionNonce": 453191,
  1015. "width": 20,
  1016. "x": -10,
  1017. "y": 0,
  1018. }
  1019. `;
  1020. exports[`contextMenu element selecting 'Delete' in context menu deletes element: [end of test] history 1`] = `
  1021. Object {
  1022. "recording": false,
  1023. "redoStack": Array [],
  1024. "stateHistory": Array [
  1025. Object {
  1026. "appState": Object {
  1027. "editingGroupId": null,
  1028. "editingLinearElement": null,
  1029. "name": "Untitled-201933152653",
  1030. "selectedElementIds": Object {},
  1031. "viewBackgroundColor": "#ffffff",
  1032. },
  1033. "elements": Array [],
  1034. },
  1035. Object {
  1036. "appState": Object {
  1037. "editingGroupId": null,
  1038. "editingLinearElement": null,
  1039. "name": "Untitled-201933152653",
  1040. "selectedElementIds": Object {
  1041. "id0": true,
  1042. },
  1043. "viewBackgroundColor": "#ffffff",
  1044. },
  1045. "elements": Array [
  1046. Object {
  1047. "angle": 0,
  1048. "backgroundColor": "transparent",
  1049. "boundElementIds": null,
  1050. "fillStyle": "hachure",
  1051. "groupIds": Array [],
  1052. "height": 20,
  1053. "id": "id0",
  1054. "isDeleted": false,
  1055. "opacity": 100,
  1056. "roughness": 1,
  1057. "seed": 1278240551,
  1058. "strokeColor": "#000000",
  1059. "strokeSharpness": "sharp",
  1060. "strokeStyle": "solid",
  1061. "strokeWidth": 1,
  1062. "type": "rectangle",
  1063. "version": 2,
  1064. "versionNonce": 449462985,
  1065. "width": 20,
  1066. "x": -10,
  1067. "y": 0,
  1068. },
  1069. ],
  1070. },
  1071. Object {
  1072. "appState": Object {
  1073. "editingGroupId": null,
  1074. "editingLinearElement": null,
  1075. "name": "Untitled-201933152653",
  1076. "selectedElementIds": Object {},
  1077. "viewBackgroundColor": "#ffffff",
  1078. },
  1079. "elements": Array [
  1080. Object {
  1081. "angle": 0,
  1082. "backgroundColor": "transparent",
  1083. "boundElementIds": null,
  1084. "fillStyle": "hachure",
  1085. "groupIds": Array [],
  1086. "height": 20,
  1087. "id": "id0",
  1088. "isDeleted": true,
  1089. "opacity": 100,
  1090. "roughness": 1,
  1091. "seed": 1278240551,
  1092. "strokeColor": "#000000",
  1093. "strokeSharpness": "sharp",
  1094. "strokeStyle": "solid",
  1095. "strokeWidth": 1,
  1096. "type": "rectangle",
  1097. "version": 3,
  1098. "versionNonce": 453191,
  1099. "width": 20,
  1100. "x": -10,
  1101. "y": 0,
  1102. },
  1103. ],
  1104. },
  1105. ],
  1106. }
  1107. `;
  1108. exports[`contextMenu element selecting 'Delete' in context menu deletes element: [end of test] number of elements 1`] = `1`;
  1109. exports[`contextMenu element selecting 'Delete' in context menu deletes element: [end of test] number of renders 1`] = `10`;
  1110. exports[`contextMenu element selecting 'Duplicate' in context menu duplicates element: [end of test] appState 1`] = `
  1111. Object {
  1112. "collaborators": Map {},
  1113. "currentChartType": "bar",
  1114. "currentItemBackgroundColor": "transparent",
  1115. "currentItemEndArrowhead": "arrow",
  1116. "currentItemFillStyle": "hachure",
  1117. "currentItemFontFamily": 1,
  1118. "currentItemFontSize": 20,
  1119. "currentItemLinearStrokeSharpness": "round",
  1120. "currentItemOpacity": 100,
  1121. "currentItemRoughness": 1,
  1122. "currentItemStartArrowhead": null,
  1123. "currentItemStrokeColor": "#000000",
  1124. "currentItemStrokeSharpness": "sharp",
  1125. "currentItemStrokeStyle": "solid",
  1126. "currentItemStrokeWidth": 1,
  1127. "currentItemTextAlign": "left",
  1128. "cursorButton": "up",
  1129. "draggingElement": null,
  1130. "editingElement": null,
  1131. "editingGroupId": null,
  1132. "editingLinearElement": null,
  1133. "elementLocked": false,
  1134. "elementType": "selection",
  1135. "errorMessage": null,
  1136. "exportBackground": true,
  1137. "exportEmbedScene": false,
  1138. "exportWithDarkMode": false,
  1139. "fileHandle": null,
  1140. "gridSize": null,
  1141. "height": 100,
  1142. "isBindingEnabled": true,
  1143. "isLibraryOpen": false,
  1144. "isLoading": false,
  1145. "isResizing": false,
  1146. "isRotating": false,
  1147. "lastPointerDownWith": "mouse",
  1148. "multiElement": null,
  1149. "name": "Untitled-201933152653",
  1150. "offsetLeft": 20,
  1151. "offsetTop": 10,
  1152. "openMenu": null,
  1153. "pasteDialog": Object {
  1154. "data": null,
  1155. "shown": false,
  1156. },
  1157. "previousSelectedElementIds": Object {},
  1158. "resizingElement": null,
  1159. "scrollX": 0,
  1160. "scrollY": 0,
  1161. "scrolledOutside": false,
  1162. "selectedElementIds": Object {
  1163. "id0_copy": true,
  1164. },
  1165. "selectedGroupIds": Object {},
  1166. "selectionElement": null,
  1167. "shouldCacheIgnoreZoom": false,
  1168. "showHelpDialog": false,
  1169. "showStats": false,
  1170. "startBoundElement": null,
  1171. "suggestedBindings": Array [],
  1172. "theme": "light",
  1173. "toastMessage": null,
  1174. "viewBackgroundColor": "#ffffff",
  1175. "viewModeEnabled": false,
  1176. "width": 200,
  1177. "zenModeEnabled": false,
  1178. "zoom": Object {
  1179. "translation": Object {
  1180. "x": 0,
  1181. "y": 0,
  1182. },
  1183. "value": 1,
  1184. },
  1185. }
  1186. `;
  1187. exports[`contextMenu element selecting 'Duplicate' in context menu duplicates element: [end of test] element 0 1`] = `
  1188. Object {
  1189. "angle": 0,
  1190. "backgroundColor": "transparent",
  1191. "boundElementIds": null,
  1192. "fillStyle": "hachure",
  1193. "groupIds": Array [],
  1194. "height": 20,
  1195. "id": "id0",
  1196. "isDeleted": false,
  1197. "opacity": 100,
  1198. "roughness": 1,
  1199. "seed": 1278240551,
  1200. "strokeColor": "#000000",
  1201. "strokeSharpness": "sharp",
  1202. "strokeStyle": "solid",
  1203. "strokeWidth": 1,
  1204. "type": "rectangle",
  1205. "version": 2,
  1206. "versionNonce": 449462985,
  1207. "width": 20,
  1208. "x": -10,
  1209. "y": 0,
  1210. }
  1211. `;
  1212. exports[`contextMenu element selecting 'Duplicate' in context menu duplicates element: [end of test] element 1 1`] = `
  1213. Object {
  1214. "angle": 0,
  1215. "backgroundColor": "transparent",
  1216. "boundElementIds": null,
  1217. "fillStyle": "hachure",
  1218. "groupIds": Array [],
  1219. "height": 20,
  1220. "id": "id0_copy",
  1221. "isDeleted": false,
  1222. "opacity": 100,
  1223. "roughness": 1,
  1224. "seed": 453191,
  1225. "strokeColor": "#000000",
  1226. "strokeSharpness": "sharp",
  1227. "strokeStyle": "solid",
  1228. "strokeWidth": 1,
  1229. "type": "rectangle",
  1230. "version": 2,
  1231. "versionNonce": 449462985,
  1232. "width": 20,
  1233. "x": 0,
  1234. "y": 10,
  1235. }
  1236. `;
  1237. exports[`contextMenu element selecting 'Duplicate' in context menu duplicates element: [end of test] history 1`] = `
  1238. Object {
  1239. "recording": false,
  1240. "redoStack": Array [],
  1241. "stateHistory": Array [
  1242. Object {
  1243. "appState": Object {
  1244. "editingGroupId": null,
  1245. "editingLinearElement": null,
  1246. "name": "Untitled-201933152653",
  1247. "selectedElementIds": Object {},
  1248. "viewBackgroundColor": "#ffffff",
  1249. },
  1250. "elements": Array [],
  1251. },
  1252. Object {
  1253. "appState": Object {
  1254. "editingGroupId": null,
  1255. "editingLinearElement": null,
  1256. "name": "Untitled-201933152653",
  1257. "selectedElementIds": Object {
  1258. "id0": true,
  1259. },
  1260. "viewBackgroundColor": "#ffffff",
  1261. },
  1262. "elements": Array [
  1263. Object {
  1264. "angle": 0,
  1265. "backgroundColor": "transparent",
  1266. "boundElementIds": null,
  1267. "fillStyle": "hachure",
  1268. "groupIds": Array [],
  1269. "height": 20,
  1270. "id": "id0",
  1271. "isDeleted": false,
  1272. "opacity": 100,
  1273. "roughness": 1,
  1274. "seed": 1278240551,
  1275. "strokeColor": "#000000",
  1276. "strokeSharpness": "sharp",
  1277. "strokeStyle": "solid",
  1278. "strokeWidth": 1,
  1279. "type": "rectangle",
  1280. "version": 2,
  1281. "versionNonce": 449462985,
  1282. "width": 20,
  1283. "x": -10,
  1284. "y": 0,
  1285. },
  1286. ],
  1287. },
  1288. Object {
  1289. "appState": Object {
  1290. "editingGroupId": null,
  1291. "editingLinearElement": null,
  1292. "name": "Untitled-201933152653",
  1293. "selectedElementIds": Object {
  1294. "id0_copy": true,
  1295. },
  1296. "viewBackgroundColor": "#ffffff",
  1297. },
  1298. "elements": Array [
  1299. Object {
  1300. "angle": 0,
  1301. "backgroundColor": "transparent",
  1302. "boundElementIds": null,
  1303. "fillStyle": "hachure",
  1304. "groupIds": Array [],
  1305. "height": 20,
  1306. "id": "id0",
  1307. "isDeleted": false,
  1308. "opacity": 100,
  1309. "roughness": 1,
  1310. "seed": 1278240551,
  1311. "strokeColor": "#000000",
  1312. "strokeSharpness": "sharp",
  1313. "strokeStyle": "solid",
  1314. "strokeWidth": 1,
  1315. "type": "rectangle",
  1316. "version": 2,
  1317. "versionNonce": 449462985,
  1318. "width": 20,
  1319. "x": -10,
  1320. "y": 0,
  1321. },
  1322. Object {
  1323. "angle": 0,
  1324. "backgroundColor": "transparent",
  1325. "boundElementIds": null,
  1326. "fillStyle": "hachure",
  1327. "groupIds": Array [],
  1328. "height": 20,
  1329. "id": "id0_copy",
  1330. "isDeleted": false,
  1331. "opacity": 100,
  1332. "roughness": 1,
  1333. "seed": 453191,
  1334. "strokeColor": "#000000",
  1335. "strokeSharpness": "sharp",
  1336. "strokeStyle": "solid",
  1337. "strokeWidth": 1,
  1338. "type": "rectangle",
  1339. "version": 2,
  1340. "versionNonce": 449462985,
  1341. "width": 20,
  1342. "x": 0,
  1343. "y": 10,
  1344. },
  1345. ],
  1346. },
  1347. ],
  1348. }
  1349. `;
  1350. exports[`contextMenu element selecting 'Duplicate' in context menu duplicates element: [end of test] number of elements 1`] = `2`;
  1351. exports[`contextMenu element selecting 'Duplicate' in context menu duplicates element: [end of test] number of renders 1`] = `10`;
  1352. exports[`contextMenu element selecting 'Group selection' in context menu groups selected elements: [end of test] appState 1`] = `
  1353. Object {
  1354. "collaborators": Map {},
  1355. "currentChartType": "bar",
  1356. "currentItemBackgroundColor": "transparent",
  1357. "currentItemEndArrowhead": "arrow",
  1358. "currentItemFillStyle": "hachure",
  1359. "currentItemFontFamily": 1,
  1360. "currentItemFontSize": 20,
  1361. "currentItemLinearStrokeSharpness": "round",
  1362. "currentItemOpacity": 100,
  1363. "currentItemRoughness": 1,
  1364. "currentItemStartArrowhead": null,
  1365. "currentItemStrokeColor": "#000000",
  1366. "currentItemStrokeSharpness": "sharp",
  1367. "currentItemStrokeStyle": "solid",
  1368. "currentItemStrokeWidth": 1,
  1369. "currentItemTextAlign": "left",
  1370. "cursorButton": "up",
  1371. "draggingElement": null,
  1372. "editingElement": null,
  1373. "editingGroupId": null,
  1374. "editingLinearElement": null,
  1375. "elementLocked": false,
  1376. "elementType": "selection",
  1377. "errorMessage": null,
  1378. "exportBackground": true,
  1379. "exportEmbedScene": false,
  1380. "exportWithDarkMode": false,
  1381. "fileHandle": null,
  1382. "gridSize": null,
  1383. "height": 100,
  1384. "isBindingEnabled": true,
  1385. "isLibraryOpen": false,
  1386. "isLoading": false,
  1387. "isResizing": false,
  1388. "isRotating": false,
  1389. "lastPointerDownWith": "mouse",
  1390. "multiElement": null,
  1391. "name": "Untitled-201933152653",
  1392. "offsetLeft": 20,
  1393. "offsetTop": 10,
  1394. "openMenu": null,
  1395. "pasteDialog": Object {
  1396. "data": null,
  1397. "shown": false,
  1398. },
  1399. "previousSelectedElementIds": Object {
  1400. "id1": true,
  1401. },
  1402. "resizingElement": null,
  1403. "scrollX": 0,
  1404. "scrollY": 0,
  1405. "scrolledOutside": false,
  1406. "selectedElementIds": Object {
  1407. "id0": true,
  1408. "id1": true,
  1409. "id2": true,
  1410. },
  1411. "selectedGroupIds": Object {
  1412. "id3": true,
  1413. },
  1414. "selectionElement": null,
  1415. "shouldCacheIgnoreZoom": false,
  1416. "showHelpDialog": false,
  1417. "showStats": false,
  1418. "startBoundElement": null,
  1419. "suggestedBindings": Array [],
  1420. "theme": "light",
  1421. "toastMessage": null,
  1422. "viewBackgroundColor": "#ffffff",
  1423. "viewModeEnabled": false,
  1424. "width": 200,
  1425. "zenModeEnabled": false,
  1426. "zoom": Object {
  1427. "translation": Object {
  1428. "x": 0,
  1429. "y": 0,
  1430. },
  1431. "value": 1,
  1432. },
  1433. }
  1434. `;
  1435. exports[`contextMenu element selecting 'Group selection' in context menu groups selected elements: [end of test] element 0 1`] = `
  1436. Object {
  1437. "angle": 0,
  1438. "backgroundColor": "transparent",
  1439. "boundElementIds": null,
  1440. "fillStyle": "hachure",
  1441. "groupIds": Array [
  1442. "id3",
  1443. ],
  1444. "height": 20,
  1445. "id": "id0",
  1446. "isDeleted": false,
  1447. "opacity": 100,
  1448. "roughness": 1,
  1449. "seed": 1278240551,
  1450. "strokeColor": "#000000",
  1451. "strokeSharpness": "sharp",
  1452. "strokeStyle": "solid",
  1453. "strokeWidth": 1,
  1454. "type": "rectangle",
  1455. "version": 3,
  1456. "versionNonce": 1150084233,
  1457. "width": 20,
  1458. "x": -10,
  1459. "y": 0,
  1460. }
  1461. `;
  1462. exports[`contextMenu element selecting 'Group selection' in context menu groups selected elements: [end of test] element 1 1`] = `
  1463. Object {
  1464. "angle": 0,
  1465. "backgroundColor": "transparent",
  1466. "boundElementIds": null,
  1467. "fillStyle": "hachure",
  1468. "groupIds": Array [
  1469. "id3",
  1470. ],
  1471. "height": 20,
  1472. "id": "id1",
  1473. "isDeleted": false,
  1474. "opacity": 100,
  1475. "roughness": 1,
  1476. "seed": 453191,
  1477. "strokeColor": "#000000",
  1478. "strokeSharpness": "sharp",
  1479. "strokeStyle": "solid",
  1480. "strokeWidth": 1,
  1481. "type": "rectangle",
  1482. "version": 3,
  1483. "versionNonce": 1116226695,
  1484. "width": 20,
  1485. "x": 20,
  1486. "y": 30,
  1487. }
  1488. `;
  1489. exports[`contextMenu element selecting 'Group selection' in context menu groups selected elements: [end of test] history 1`] = `
  1490. Object {
  1491. "recording": false,
  1492. "redoStack": Array [],
  1493. "stateHistory": Array [
  1494. Object {
  1495. "appState": Object {
  1496. "editingGroupId": null,
  1497. "editingLinearElement": null,
  1498. "name": "Untitled-201933152653",
  1499. "selectedElementIds": Object {},
  1500. "viewBackgroundColor": "#ffffff",
  1501. },
  1502. "elements": Array [],
  1503. },
  1504. Object {
  1505. "appState": Object {
  1506. "editingGroupId": null,
  1507. "editingLinearElement": null,
  1508. "name": "Untitled-201933152653",
  1509. "selectedElementIds": Object {
  1510. "id0": true,
  1511. },
  1512. "viewBackgroundColor": "#ffffff",
  1513. },
  1514. "elements": Array [
  1515. Object {
  1516. "angle": 0,
  1517. "backgroundColor": "transparent",
  1518. "boundElementIds": null,
  1519. "fillStyle": "hachure",
  1520. "groupIds": Array [],
  1521. "height": 20,
  1522. "id": "id0",
  1523. "isDeleted": false,
  1524. "opacity": 100,
  1525. "roughness": 1,
  1526. "seed": 1278240551,
  1527. "strokeColor": "#000000",
  1528. "strokeSharpness": "sharp",
  1529. "strokeStyle": "solid",
  1530. "strokeWidth": 1,
  1531. "type": "rectangle",
  1532. "version": 2,
  1533. "versionNonce": 449462985,
  1534. "width": 20,
  1535. "x": -10,
  1536. "y": 0,
  1537. },
  1538. ],
  1539. },
  1540. Object {
  1541. "appState": Object {
  1542. "editingGroupId": null,
  1543. "editingLinearElement": null,
  1544. "name": "Untitled-201933152653",
  1545. "selectedElementIds": Object {
  1546. "id1": true,
  1547. },
  1548. "viewBackgroundColor": "#ffffff",
  1549. },
  1550. "elements": Array [
  1551. Object {
  1552. "angle": 0,
  1553. "backgroundColor": "transparent",
  1554. "boundElementIds": null,
  1555. "fillStyle": "hachure",
  1556. "groupIds": Array [],
  1557. "height": 20,
  1558. "id": "id0",
  1559. "isDeleted": false,
  1560. "opacity": 100,
  1561. "roughness": 1,
  1562. "seed": 1278240551,
  1563. "strokeColor": "#000000",
  1564. "strokeSharpness": "sharp",
  1565. "strokeStyle": "solid",
  1566. "strokeWidth": 1,
  1567. "type": "rectangle",
  1568. "version": 2,
  1569. "versionNonce": 449462985,
  1570. "width": 20,
  1571. "x": -10,
  1572. "y": 0,
  1573. },
  1574. Object {
  1575. "angle": 0,
  1576. "backgroundColor": "transparent",
  1577. "boundElementIds": null,
  1578. "fillStyle": "hachure",
  1579. "groupIds": Array [],
  1580. "height": 20,
  1581. "id": "id1",
  1582. "isDeleted": false,
  1583. "opacity": 100,
  1584. "roughness": 1,
  1585. "seed": 453191,
  1586. "strokeColor": "#000000",
  1587. "strokeSharpness": "sharp",
  1588. "strokeStyle": "solid",
  1589. "strokeWidth": 1,
  1590. "type": "rectangle",
  1591. "version": 2,
  1592. "versionNonce": 401146281,
  1593. "width": 20,
  1594. "x": 20,
  1595. "y": 30,
  1596. },
  1597. ],
  1598. },
  1599. Object {
  1600. "appState": Object {
  1601. "editingGroupId": null,
  1602. "editingLinearElement": null,
  1603. "name": "Untitled-201933152653",
  1604. "selectedElementIds": Object {
  1605. "id0": true,
  1606. "id1": true,
  1607. "id2": true,
  1608. },
  1609. "viewBackgroundColor": "#ffffff",
  1610. },
  1611. "elements": Array [
  1612. Object {
  1613. "angle": 0,
  1614. "backgroundColor": "transparent",
  1615. "boundElementIds": null,
  1616. "fillStyle": "hachure",
  1617. "groupIds": Array [
  1618. "id3",
  1619. ],
  1620. "height": 20,
  1621. "id": "id0",
  1622. "isDeleted": false,
  1623. "opacity": 100,
  1624. "roughness": 1,
  1625. "seed": 1278240551,
  1626. "strokeColor": "#000000",
  1627. "strokeSharpness": "sharp",
  1628. "strokeStyle": "solid",
  1629. "strokeWidth": 1,
  1630. "type": "rectangle",
  1631. "version": 3,
  1632. "versionNonce": 1150084233,
  1633. "width": 20,
  1634. "x": -10,
  1635. "y": 0,
  1636. },
  1637. Object {
  1638. "angle": 0,
  1639. "backgroundColor": "transparent",
  1640. "boundElementIds": null,
  1641. "fillStyle": "hachure",
  1642. "groupIds": Array [
  1643. "id3",
  1644. ],
  1645. "height": 20,
  1646. "id": "id1",
  1647. "isDeleted": false,
  1648. "opacity": 100,
  1649. "roughness": 1,
  1650. "seed": 453191,
  1651. "strokeColor": "#000000",
  1652. "strokeSharpness": "sharp",
  1653. "strokeStyle": "solid",
  1654. "strokeWidth": 1,
  1655. "type": "rectangle",
  1656. "version": 3,
  1657. "versionNonce": 1116226695,
  1658. "width": 20,
  1659. "x": 20,
  1660. "y": 30,
  1661. },
  1662. ],
  1663. },
  1664. ],
  1665. }
  1666. `;
  1667. exports[`contextMenu element selecting 'Group selection' in context menu groups selected elements: [end of test] number of elements 1`] = `2`;
  1668. exports[`contextMenu element selecting 'Group selection' in context menu groups selected elements: [end of test] number of renders 1`] = `16`;
  1669. exports[`contextMenu element selecting 'Paste styles' in context menu pastes styles: [end of test] appState 1`] = `
  1670. Object {
  1671. "collaborators": Map {},
  1672. "currentChartType": "bar",
  1673. "currentItemBackgroundColor": "#e64980",
  1674. "currentItemEndArrowhead": "arrow",
  1675. "currentItemFillStyle": "cross-hatch",
  1676. "currentItemFontFamily": 1,
  1677. "currentItemFontSize": 20,
  1678. "currentItemLinearStrokeSharpness": "round",
  1679. "currentItemOpacity": 60,
  1680. "currentItemRoughness": 2,
  1681. "currentItemStartArrowhead": null,
  1682. "currentItemStrokeColor": "#c92a2a",
  1683. "currentItemStrokeSharpness": "sharp",
  1684. "currentItemStrokeStyle": "dotted",
  1685. "currentItemStrokeWidth": 2,
  1686. "currentItemTextAlign": "left",
  1687. "cursorButton": "up",
  1688. "draggingElement": null,
  1689. "editingElement": null,
  1690. "editingGroupId": null,
  1691. "editingLinearElement": null,
  1692. "elementLocked": false,
  1693. "elementType": "selection",
  1694. "errorMessage": null,
  1695. "exportBackground": true,
  1696. "exportEmbedScene": false,
  1697. "exportWithDarkMode": false,
  1698. "fileHandle": null,
  1699. "gridSize": null,
  1700. "height": 100,
  1701. "isBindingEnabled": true,
  1702. "isLibraryOpen": false,
  1703. "isLoading": false,
  1704. "isResizing": false,
  1705. "isRotating": false,
  1706. "lastPointerDownWith": "mouse",
  1707. "multiElement": null,
  1708. "name": "Untitled-201933152653",
  1709. "offsetLeft": 20,
  1710. "offsetTop": 10,
  1711. "openMenu": "backgroundColorPicker",
  1712. "pasteDialog": Object {
  1713. "data": null,
  1714. "shown": false,
  1715. },
  1716. "previousSelectedElementIds": Object {},
  1717. "resizingElement": null,
  1718. "scrollX": 0,
  1719. "scrollY": 0,
  1720. "scrolledOutside": false,
  1721. "selectedElementIds": Object {
  1722. "id0": true,
  1723. },
  1724. "selectedGroupIds": Object {},
  1725. "selectionElement": null,
  1726. "shouldCacheIgnoreZoom": false,
  1727. "showHelpDialog": false,
  1728. "showStats": false,
  1729. "startBoundElement": null,
  1730. "suggestedBindings": Array [],
  1731. "theme": "light",
  1732. "toastMessage": "Copied styles.",
  1733. "viewBackgroundColor": "#ffffff",
  1734. "viewModeEnabled": false,
  1735. "width": 200,
  1736. "zenModeEnabled": false,
  1737. "zoom": Object {
  1738. "translation": Object {
  1739. "x": 0,
  1740. "y": 0,
  1741. },
  1742. "value": 1,
  1743. },
  1744. }
  1745. `;
  1746. exports[`contextMenu element selecting 'Paste styles' in context menu pastes styles: [end of test] element 0 1`] = `
  1747. Object {
  1748. "angle": 0,
  1749. "backgroundColor": "#e64980",
  1750. "boundElementIds": null,
  1751. "fillStyle": "cross-hatch",
  1752. "groupIds": Array [],
  1753. "height": 20,
  1754. "id": "id0",
  1755. "isDeleted": false,
  1756. "opacity": 60,
  1757. "roughness": 2,
  1758. "seed": 1278240551,
  1759. "strokeColor": "#c92a2a",
  1760. "strokeSharpness": "sharp",
  1761. "strokeStyle": "dotted",
  1762. "strokeWidth": 2,
  1763. "type": "rectangle",
  1764. "version": 3,
  1765. "versionNonce": 23633383,
  1766. "width": 20,
  1767. "x": -10,
  1768. "y": 0,
  1769. }
  1770. `;
  1771. exports[`contextMenu element selecting 'Paste styles' in context menu pastes styles: [end of test] element 1 1`] = `
  1772. Object {
  1773. "angle": 0,
  1774. "backgroundColor": "#e64980",
  1775. "boundElementIds": null,
  1776. "fillStyle": "cross-hatch",
  1777. "groupIds": Array [],
  1778. "height": 20,
  1779. "id": "id1",
  1780. "isDeleted": false,
  1781. "opacity": 60,
  1782. "roughness": 2,
  1783. "seed": 400692809,
  1784. "strokeColor": "#c92a2a",
  1785. "strokeSharpness": "sharp",
  1786. "strokeStyle": "dotted",
  1787. "strokeWidth": 2,
  1788. "type": "rectangle",
  1789. "version": 9,
  1790. "versionNonce": 1505387817,
  1791. "width": 20,
  1792. "x": 20,
  1793. "y": 30,
  1794. }
  1795. `;
  1796. exports[`contextMenu element selecting 'Paste styles' in context menu pastes styles: [end of test] history 1`] = `
  1797. Object {
  1798. "recording": false,
  1799. "redoStack": Array [],
  1800. "stateHistory": Array [
  1801. Object {
  1802. "appState": Object {
  1803. "editingGroupId": null,
  1804. "editingLinearElement": null,
  1805. "name": "Untitled-201933152653",
  1806. "selectedElementIds": Object {},
  1807. "viewBackgroundColor": "#ffffff",
  1808. },
  1809. "elements": Array [],
  1810. },
  1811. Object {
  1812. "appState": Object {
  1813. "editingGroupId": null,
  1814. "editingLinearElement": null,
  1815. "name": "Untitled-201933152653",
  1816. "selectedElementIds": Object {
  1817. "id0": true,
  1818. },
  1819. "viewBackgroundColor": "#ffffff",
  1820. },
  1821. "elements": Array [
  1822. Object {
  1823. "angle": 0,
  1824. "backgroundColor": "transparent",
  1825. "boundElementIds": null,
  1826. "fillStyle": "hachure",
  1827. "groupIds": Array [],
  1828. "height": 20,
  1829. "id": "id0",
  1830. "isDeleted": false,
  1831. "opacity": 100,
  1832. "roughness": 1,
  1833. "seed": 1278240551,
  1834. "strokeColor": "#000000",
  1835. "strokeSharpness": "sharp",
  1836. "strokeStyle": "solid",
  1837. "strokeWidth": 1,
  1838. "type": "rectangle",
  1839. "version": 2,
  1840. "versionNonce": 449462985,
  1841. "width": 20,
  1842. "x": -10,
  1843. "y": 0,
  1844. },
  1845. ],
  1846. },
  1847. Object {
  1848. "appState": Object {
  1849. "editingGroupId": null,
  1850. "editingLinearElement": null,
  1851. "name": "Untitled-201933152653",
  1852. "selectedElementIds": Object {
  1853. "id1": true,
  1854. },
  1855. "viewBackgroundColor": "#ffffff",
  1856. },
  1857. "elements": Array [
  1858. Object {
  1859. "angle": 0,
  1860. "backgroundColor": "transparent",
  1861. "boundElementIds": null,
  1862. "fillStyle": "hachure",
  1863. "groupIds": Array [],
  1864. "height": 20,
  1865. "id": "id0",
  1866. "isDeleted": false,
  1867. "opacity": 100,
  1868. "roughness": 1,
  1869. "seed": 1278240551,
  1870. "strokeColor": "#000000",
  1871. "strokeSharpness": "sharp",
  1872. "strokeStyle": "solid",
  1873. "strokeWidth": 1,
  1874. "type": "rectangle",
  1875. "version": 2,
  1876. "versionNonce": 449462985,
  1877. "width": 20,
  1878. "x": -10,
  1879. "y": 0,
  1880. },
  1881. Object {
  1882. "angle": 0,
  1883. "backgroundColor": "transparent",
  1884. "boundElementIds": null,
  1885. "fillStyle": "hachure",
  1886. "groupIds": Array [],
  1887. "height": 20,
  1888. "id": "id1",
  1889. "isDeleted": false,
  1890. "opacity": 100,
  1891. "roughness": 1,
  1892. "seed": 453191,
  1893. "strokeColor": "#000000",
  1894. "strokeSharpness": "sharp",
  1895. "strokeStyle": "solid",
  1896. "strokeWidth": 1,
  1897. "type": "rectangle",
  1898. "version": 2,
  1899. "versionNonce": 401146281,
  1900. "width": 20,
  1901. "x": 20,
  1902. "y": 30,
  1903. },
  1904. ],
  1905. },
  1906. Object {
  1907. "appState": Object {
  1908. "editingGroupId": null,
  1909. "editingLinearElement": null,
  1910. "name": "Untitled-201933152653",
  1911. "selectedElementIds": Object {
  1912. "id1": true,
  1913. },
  1914. "viewBackgroundColor": "#ffffff",
  1915. },
  1916. "elements": Array [
  1917. Object {
  1918. "angle": 0,
  1919. "backgroundColor": "transparent",
  1920. "boundElementIds": null,
  1921. "fillStyle": "hachure",
  1922. "groupIds": Array [],
  1923. "height": 20,
  1924. "id": "id0",
  1925. "isDeleted": false,
  1926. "opacity": 100,
  1927. "roughness": 1,
  1928. "seed": 1278240551,
  1929. "strokeColor": "#000000",
  1930. "strokeSharpness": "sharp",
  1931. "strokeStyle": "solid",
  1932. "strokeWidth": 1,
  1933. "type": "rectangle",
  1934. "version": 2,
  1935. "versionNonce": 449462985,
  1936. "width": 20,
  1937. "x": -10,
  1938. "y": 0,
  1939. },
  1940. Object {
  1941. "angle": 0,
  1942. "backgroundColor": "transparent",
  1943. "boundElementIds": null,
  1944. "fillStyle": "hachure",
  1945. "groupIds": Array [],
  1946. "height": 20,
  1947. "id": "id1",
  1948. "isDeleted": false,
  1949. "opacity": 100,
  1950. "roughness": 1,
  1951. "seed": 453191,
  1952. "strokeColor": "#c92a2a",
  1953. "strokeSharpness": "sharp",
  1954. "strokeStyle": "solid",
  1955. "strokeWidth": 1,
  1956. "type": "rectangle",
  1957. "version": 3,
  1958. "versionNonce": 2019559783,
  1959. "width": 20,
  1960. "x": 20,
  1961. "y": 30,
  1962. },
  1963. ],
  1964. },
  1965. Object {
  1966. "appState": Object {
  1967. "editingGroupId": null,
  1968. "editingLinearElement": null,
  1969. "name": "Untitled-201933152653",
  1970. "selectedElementIds": Object {
  1971. "id1": true,
  1972. },
  1973. "viewBackgroundColor": "#ffffff",
  1974. },
  1975. "elements": Array [
  1976. Object {
  1977. "angle": 0,
  1978. "backgroundColor": "transparent",
  1979. "boundElementIds": null,
  1980. "fillStyle": "hachure",
  1981. "groupIds": Array [],
  1982. "height": 20,
  1983. "id": "id0",
  1984. "isDeleted": false,
  1985. "opacity": 100,
  1986. "roughness": 1,
  1987. "seed": 1278240551,
  1988. "strokeColor": "#000000",
  1989. "strokeSharpness": "sharp",
  1990. "strokeStyle": "solid",
  1991. "strokeWidth": 1,
  1992. "type": "rectangle",
  1993. "version": 2,
  1994. "versionNonce": 449462985,
  1995. "width": 20,
  1996. "x": -10,
  1997. "y": 0,
  1998. },
  1999. Object {
  2000. "angle": 0,
  2001. "backgroundColor": "#e64980",
  2002. "boundElementIds": null,
  2003. "fillStyle": "hachure",
  2004. "groupIds": Array [],
  2005. "height": 20,
  2006. "id": "id1",
  2007. "isDeleted": false,
  2008. "opacity": 100,
  2009. "roughness": 1,
  2010. "seed": 453191,
  2011. "strokeColor": "#c92a2a",
  2012. "strokeSharpness": "sharp",
  2013. "strokeStyle": "solid",
  2014. "strokeWidth": 1,
  2015. "type": "rectangle",
  2016. "version": 4,
  2017. "versionNonce": 1150084233,
  2018. "width": 20,
  2019. "x": 20,
  2020. "y": 30,
  2021. },
  2022. ],
  2023. },
  2024. Object {
  2025. "appState": Object {
  2026. "editingGroupId": null,
  2027. "editingLinearElement": null,
  2028. "name": "Untitled-201933152653",
  2029. "selectedElementIds": Object {
  2030. "id1": true,
  2031. },
  2032. "viewBackgroundColor": "#ffffff",
  2033. },
  2034. "elements": Array [
  2035. Object {
  2036. "angle": 0,
  2037. "backgroundColor": "transparent",
  2038. "boundElementIds": null,
  2039. "fillStyle": "hachure",
  2040. "groupIds": Array [],
  2041. "height": 20,
  2042. "id": "id0",
  2043. "isDeleted": false,
  2044. "opacity": 100,
  2045. "roughness": 1,
  2046. "seed": 1278240551,
  2047. "strokeColor": "#000000",
  2048. "strokeSharpness": "sharp",
  2049. "strokeStyle": "solid",
  2050. "strokeWidth": 1,
  2051. "type": "rectangle",
  2052. "version": 2,
  2053. "versionNonce": 449462985,
  2054. "width": 20,
  2055. "x": -10,
  2056. "y": 0,
  2057. },
  2058. Object {
  2059. "angle": 0,
  2060. "backgroundColor": "#e64980",
  2061. "boundElementIds": null,
  2062. "fillStyle": "cross-hatch",
  2063. "groupIds": Array [],
  2064. "height": 20,
  2065. "id": "id1",
  2066. "isDeleted": false,
  2067. "opacity": 100,
  2068. "roughness": 1,
  2069. "seed": 453191,
  2070. "strokeColor": "#c92a2a",
  2071. "strokeSharpness": "sharp",
  2072. "strokeStyle": "solid",
  2073. "strokeWidth": 1,
  2074. "type": "rectangle",
  2075. "version": 5,
  2076. "versionNonce": 1116226695,
  2077. "width": 20,
  2078. "x": 20,
  2079. "y": 30,
  2080. },
  2081. ],
  2082. },
  2083. Object {
  2084. "appState": Object {
  2085. "editingGroupId": null,
  2086. "editingLinearElement": null,
  2087. "name": "Untitled-201933152653",
  2088. "selectedElementIds": Object {
  2089. "id1": true,
  2090. },
  2091. "viewBackgroundColor": "#ffffff",
  2092. },
  2093. "elements": Array [
  2094. Object {
  2095. "angle": 0,
  2096. "backgroundColor": "transparent",
  2097. "boundElementIds": null,
  2098. "fillStyle": "hachure",
  2099. "groupIds": Array [],
  2100. "height": 20,
  2101. "id": "id0",
  2102. "isDeleted": false,
  2103. "opacity": 100,
  2104. "roughness": 1,
  2105. "seed": 1278240551,
  2106. "strokeColor": "#000000",
  2107. "strokeSharpness": "sharp",
  2108. "strokeStyle": "solid",
  2109. "strokeWidth": 1,
  2110. "type": "rectangle",
  2111. "version": 2,
  2112. "versionNonce": 449462985,
  2113. "width": 20,
  2114. "x": -10,
  2115. "y": 0,
  2116. },
  2117. Object {
  2118. "angle": 0,
  2119. "backgroundColor": "#e64980",
  2120. "boundElementIds": null,
  2121. "fillStyle": "cross-hatch",
  2122. "groupIds": Array [],
  2123. "height": 20,
  2124. "id": "id1",
  2125. "isDeleted": false,
  2126. "opacity": 100,
  2127. "roughness": 1,
  2128. "seed": 453191,
  2129. "strokeColor": "#c92a2a",
  2130. "strokeSharpness": "sharp",
  2131. "strokeStyle": "solid",
  2132. "strokeWidth": 2,
  2133. "type": "rectangle",
  2134. "version": 6,
  2135. "versionNonce": 1014066025,
  2136. "width": 20,
  2137. "x": 20,
  2138. "y": 30,
  2139. },
  2140. ],
  2141. },
  2142. Object {
  2143. "appState": Object {
  2144. "editingGroupId": null,
  2145. "editingLinearElement": null,
  2146. "name": "Untitled-201933152653",
  2147. "selectedElementIds": Object {
  2148. "id1": true,
  2149. },
  2150. "viewBackgroundColor": "#ffffff",
  2151. },
  2152. "elements": Array [
  2153. Object {
  2154. "angle": 0,
  2155. "backgroundColor": "transparent",
  2156. "boundElementIds": null,
  2157. "fillStyle": "hachure",
  2158. "groupIds": Array [],
  2159. "height": 20,
  2160. "id": "id0",
  2161. "isDeleted": false,
  2162. "opacity": 100,
  2163. "roughness": 1,
  2164. "seed": 1278240551,
  2165. "strokeColor": "#000000",
  2166. "strokeSharpness": "sharp",
  2167. "strokeStyle": "solid",
  2168. "strokeWidth": 1,
  2169. "type": "rectangle",
  2170. "version": 2,
  2171. "versionNonce": 449462985,
  2172. "width": 20,
  2173. "x": -10,
  2174. "y": 0,
  2175. },
  2176. Object {
  2177. "angle": 0,
  2178. "backgroundColor": "#e64980",
  2179. "boundElementIds": null,
  2180. "fillStyle": "cross-hatch",
  2181. "groupIds": Array [],
  2182. "height": 20,
  2183. "id": "id1",
  2184. "isDeleted": false,
  2185. "opacity": 100,
  2186. "roughness": 1,
  2187. "seed": 453191,
  2188. "strokeColor": "#c92a2a",
  2189. "strokeSharpness": "sharp",
  2190. "strokeStyle": "dotted",
  2191. "strokeWidth": 2,
  2192. "type": "rectangle",
  2193. "version": 7,
  2194. "versionNonce": 238820263,
  2195. "width": 20,
  2196. "x": 20,
  2197. "y": 30,
  2198. },
  2199. ],
  2200. },
  2201. Object {
  2202. "appState": Object {
  2203. "editingGroupId": null,
  2204. "editingLinearElement": null,
  2205. "name": "Untitled-201933152653",
  2206. "selectedElementIds": Object {
  2207. "id1": true,
  2208. },
  2209. "viewBackgroundColor": "#ffffff",
  2210. },
  2211. "elements": Array [
  2212. Object {
  2213. "angle": 0,
  2214. "backgroundColor": "transparent",
  2215. "boundElementIds": null,
  2216. "fillStyle": "hachure",
  2217. "groupIds": Array [],
  2218. "height": 20,
  2219. "id": "id0",
  2220. "isDeleted": false,
  2221. "opacity": 100,
  2222. "roughness": 1,
  2223. "seed": 1278240551,
  2224. "strokeColor": "#000000",
  2225. "strokeSharpness": "sharp",
  2226. "strokeStyle": "solid",
  2227. "strokeWidth": 1,
  2228. "type": "rectangle",
  2229. "version": 2,
  2230. "versionNonce": 449462985,
  2231. "width": 20,
  2232. "x": -10,
  2233. "y": 0,
  2234. },
  2235. Object {
  2236. "angle": 0,
  2237. "backgroundColor": "#e64980",
  2238. "boundElementIds": null,
  2239. "fillStyle": "cross-hatch",
  2240. "groupIds": Array [],
  2241. "height": 20,
  2242. "id": "id1",
  2243. "isDeleted": false,
  2244. "opacity": 100,
  2245. "roughness": 2,
  2246. "seed": 400692809,
  2247. "strokeColor": "#c92a2a",
  2248. "strokeSharpness": "sharp",
  2249. "strokeStyle": "dotted",
  2250. "strokeWidth": 2,
  2251. "type": "rectangle",
  2252. "version": 8,
  2253. "versionNonce": 1604849351,
  2254. "width": 20,
  2255. "x": 20,
  2256. "y": 30,
  2257. },
  2258. ],
  2259. },
  2260. Object {
  2261. "appState": Object {
  2262. "editingGroupId": null,
  2263. "editingLinearElement": null,
  2264. "name": "Untitled-201933152653",
  2265. "selectedElementIds": Object {
  2266. "id1": true,
  2267. },
  2268. "viewBackgroundColor": "#ffffff",
  2269. },
  2270. "elements": Array [
  2271. Object {
  2272. "angle": 0,
  2273. "backgroundColor": "transparent",
  2274. "boundElementIds": null,
  2275. "fillStyle": "hachure",
  2276. "groupIds": Array [],
  2277. "height": 20,
  2278. "id": "id0",
  2279. "isDeleted": false,
  2280. "opacity": 100,
  2281. "roughness": 1,
  2282. "seed": 1278240551,
  2283. "strokeColor": "#000000",
  2284. "strokeSharpness": "sharp",
  2285. "strokeStyle": "solid",
  2286. "strokeWidth": 1,
  2287. "type": "rectangle",
  2288. "version": 2,
  2289. "versionNonce": 449462985,
  2290. "width": 20,
  2291. "x": -10,
  2292. "y": 0,
  2293. },
  2294. Object {
  2295. "angle": 0,
  2296. "backgroundColor": "#e64980",
  2297. "boundElementIds": null,
  2298. "fillStyle": "cross-hatch",
  2299. "groupIds": Array [],
  2300. "height": 20,
  2301. "id": "id1",
  2302. "isDeleted": false,
  2303. "opacity": 60,
  2304. "roughness": 2,
  2305. "seed": 400692809,
  2306. "strokeColor": "#c92a2a",
  2307. "strokeSharpness": "sharp",
  2308. "strokeStyle": "dotted",
  2309. "strokeWidth": 2,
  2310. "type": "rectangle",
  2311. "version": 9,
  2312. "versionNonce": 1505387817,
  2313. "width": 20,
  2314. "x": 20,
  2315. "y": 30,
  2316. },
  2317. ],
  2318. },
  2319. Object {
  2320. "appState": Object {
  2321. "editingGroupId": null,
  2322. "editingLinearElement": null,
  2323. "name": "Untitled-201933152653",
  2324. "selectedElementIds": Object {
  2325. "id0": true,
  2326. },
  2327. "viewBackgroundColor": "#ffffff",
  2328. },
  2329. "elements": Array [
  2330. Object {
  2331. "angle": 0,
  2332. "backgroundColor": "#e64980",
  2333. "boundElementIds": null,
  2334. "fillStyle": "cross-hatch",
  2335. "groupIds": Array [],
  2336. "height": 20,
  2337. "id": "id0",
  2338. "isDeleted": false,
  2339. "opacity": 60,
  2340. "roughness": 2,
  2341. "seed": 1278240551,
  2342. "strokeColor": "#c92a2a",
  2343. "strokeSharpness": "sharp",
  2344. "strokeStyle": "dotted",
  2345. "strokeWidth": 2,
  2346. "type": "rectangle",
  2347. "version": 3,
  2348. "versionNonce": 23633383,
  2349. "width": 20,
  2350. "x": -10,
  2351. "y": 0,
  2352. },
  2353. Object {
  2354. "angle": 0,
  2355. "backgroundColor": "#e64980",
  2356. "boundElementIds": null,
  2357. "fillStyle": "cross-hatch",
  2358. "groupIds": Array [],
  2359. "height": 20,
  2360. "id": "id1",
  2361. "isDeleted": false,
  2362. "opacity": 60,
  2363. "roughness": 2,
  2364. "seed": 400692809,
  2365. "strokeColor": "#c92a2a",
  2366. "strokeSharpness": "sharp",
  2367. "strokeStyle": "dotted",
  2368. "strokeWidth": 2,
  2369. "type": "rectangle",
  2370. "version": 9,
  2371. "versionNonce": 1505387817,
  2372. "width": 20,
  2373. "x": 20,
  2374. "y": 30,
  2375. },
  2376. ],
  2377. },
  2378. ],
  2379. }
  2380. `;
  2381. exports[`contextMenu element selecting 'Paste styles' in context menu pastes styles: [end of test] number of elements 1`] = `2`;
  2382. exports[`contextMenu element selecting 'Paste styles' in context menu pastes styles: [end of test] number of renders 1`] = `27`;
  2383. exports[`contextMenu element selecting 'Send backward' in context menu sends element backward: [end of test] appState 1`] = `
  2384. Object {
  2385. "collaborators": Map {},
  2386. "currentChartType": "bar",
  2387. "currentItemBackgroundColor": "transparent",
  2388. "currentItemEndArrowhead": "arrow",
  2389. "currentItemFillStyle": "hachure",
  2390. "currentItemFontFamily": 1,
  2391. "currentItemFontSize": 20,
  2392. "currentItemLinearStrokeSharpness": "round",
  2393. "currentItemOpacity": 100,
  2394. "currentItemRoughness": 1,
  2395. "currentItemStartArrowhead": null,
  2396. "currentItemStrokeColor": "#000000",
  2397. "currentItemStrokeSharpness": "sharp",
  2398. "currentItemStrokeStyle": "solid",
  2399. "currentItemStrokeWidth": 1,
  2400. "currentItemTextAlign": "left",
  2401. "cursorButton": "up",
  2402. "draggingElement": null,
  2403. "editingElement": null,
  2404. "editingGroupId": null,
  2405. "editingLinearElement": null,
  2406. "elementLocked": false,
  2407. "elementType": "selection",
  2408. "errorMessage": null,
  2409. "exportBackground": true,
  2410. "exportEmbedScene": false,
  2411. "exportWithDarkMode": false,
  2412. "fileHandle": null,
  2413. "gridSize": null,
  2414. "height": 100,
  2415. "isBindingEnabled": true,
  2416. "isLibraryOpen": false,
  2417. "isLoading": false,
  2418. "isResizing": false,
  2419. "isRotating": false,
  2420. "lastPointerDownWith": "mouse",
  2421. "multiElement": null,
  2422. "name": "Untitled-201933152653",
  2423. "offsetLeft": 20,
  2424. "offsetTop": 10,
  2425. "openMenu": null,
  2426. "pasteDialog": Object {
  2427. "data": null,
  2428. "shown": false,
  2429. },
  2430. "previousSelectedElementIds": Object {},
  2431. "resizingElement": null,
  2432. "scrollX": 0,
  2433. "scrollY": 0,
  2434. "scrolledOutside": false,
  2435. "selectedElementIds": Object {
  2436. "id1": true,
  2437. },
  2438. "selectedGroupIds": Object {},
  2439. "selectionElement": null,
  2440. "shouldCacheIgnoreZoom": false,
  2441. "showHelpDialog": false,
  2442. "showStats": false,
  2443. "startBoundElement": null,
  2444. "suggestedBindings": Array [],
  2445. "theme": "light",
  2446. "toastMessage": null,
  2447. "viewBackgroundColor": "#ffffff",
  2448. "viewModeEnabled": false,
  2449. "width": 200,
  2450. "zenModeEnabled": false,
  2451. "zoom": Object {
  2452. "translation": Object {
  2453. "x": 0,
  2454. "y": 0,
  2455. },
  2456. "value": 1,
  2457. },
  2458. }
  2459. `;
  2460. exports[`contextMenu element selecting 'Send backward' in context menu sends element backward: [end of test] element 0 1`] = `
  2461. Object {
  2462. "angle": 0,
  2463. "backgroundColor": "transparent",
  2464. "boundElementIds": null,
  2465. "fillStyle": "hachure",
  2466. "groupIds": Array [],
  2467. "height": 20,
  2468. "id": "id1",
  2469. "isDeleted": false,
  2470. "opacity": 100,
  2471. "roughness": 1,
  2472. "seed": 453191,
  2473. "strokeColor": "#000000",
  2474. "strokeSharpness": "sharp",
  2475. "strokeStyle": "solid",
  2476. "strokeWidth": 1,
  2477. "type": "rectangle",
  2478. "version": 3,
  2479. "versionNonce": 2019559783,
  2480. "width": 20,
  2481. "x": 20,
  2482. "y": 30,
  2483. }
  2484. `;
  2485. exports[`contextMenu element selecting 'Send backward' in context menu sends element backward: [end of test] element 1 1`] = `
  2486. Object {
  2487. "angle": 0,
  2488. "backgroundColor": "transparent",
  2489. "boundElementIds": null,
  2490. "fillStyle": "hachure",
  2491. "groupIds": Array [],
  2492. "height": 20,
  2493. "id": "id0",
  2494. "isDeleted": false,
  2495. "opacity": 100,
  2496. "roughness": 1,
  2497. "seed": 1278240551,
  2498. "strokeColor": "#000000",
  2499. "strokeSharpness": "sharp",
  2500. "strokeStyle": "solid",
  2501. "strokeWidth": 1,
  2502. "type": "rectangle",
  2503. "version": 2,
  2504. "versionNonce": 449462985,
  2505. "width": 20,
  2506. "x": -10,
  2507. "y": 0,
  2508. }
  2509. `;
  2510. exports[`contextMenu element selecting 'Send backward' in context menu sends element backward: [end of test] history 1`] = `
  2511. Object {
  2512. "recording": false,
  2513. "redoStack": Array [],
  2514. "stateHistory": Array [
  2515. Object {
  2516. "appState": Object {
  2517. "editingGroupId": null,
  2518. "editingLinearElement": null,
  2519. "name": "Untitled-201933152653",
  2520. "selectedElementIds": Object {},
  2521. "viewBackgroundColor": "#ffffff",
  2522. },
  2523. "elements": Array [],
  2524. },
  2525. Object {
  2526. "appState": Object {
  2527. "editingGroupId": null,
  2528. "editingLinearElement": null,
  2529. "name": "Untitled-201933152653",
  2530. "selectedElementIds": Object {
  2531. "id0": true,
  2532. },
  2533. "viewBackgroundColor": "#ffffff",
  2534. },
  2535. "elements": Array [
  2536. Object {
  2537. "angle": 0,
  2538. "backgroundColor": "transparent",
  2539. "boundElementIds": null,
  2540. "fillStyle": "hachure",
  2541. "groupIds": Array [],
  2542. "height": 20,
  2543. "id": "id0",
  2544. "isDeleted": false,
  2545. "opacity": 100,
  2546. "roughness": 1,
  2547. "seed": 1278240551,
  2548. "strokeColor": "#000000",
  2549. "strokeSharpness": "sharp",
  2550. "strokeStyle": "solid",
  2551. "strokeWidth": 1,
  2552. "type": "rectangle",
  2553. "version": 2,
  2554. "versionNonce": 449462985,
  2555. "width": 20,
  2556. "x": -10,
  2557. "y": 0,
  2558. },
  2559. ],
  2560. },
  2561. Object {
  2562. "appState": Object {
  2563. "editingGroupId": null,
  2564. "editingLinearElement": null,
  2565. "name": "Untitled-201933152653",
  2566. "selectedElementIds": Object {
  2567. "id1": true,
  2568. },
  2569. "viewBackgroundColor": "#ffffff",
  2570. },
  2571. "elements": Array [
  2572. Object {
  2573. "angle": 0,
  2574. "backgroundColor": "transparent",
  2575. "boundElementIds": null,
  2576. "fillStyle": "hachure",
  2577. "groupIds": Array [],
  2578. "height": 20,
  2579. "id": "id0",
  2580. "isDeleted": false,
  2581. "opacity": 100,
  2582. "roughness": 1,
  2583. "seed": 1278240551,
  2584. "strokeColor": "#000000",
  2585. "strokeSharpness": "sharp",
  2586. "strokeStyle": "solid",
  2587. "strokeWidth": 1,
  2588. "type": "rectangle",
  2589. "version": 2,
  2590. "versionNonce": 449462985,
  2591. "width": 20,
  2592. "x": -10,
  2593. "y": 0,
  2594. },
  2595. Object {
  2596. "angle": 0,
  2597. "backgroundColor": "transparent",
  2598. "boundElementIds": null,
  2599. "fillStyle": "hachure",
  2600. "groupIds": Array [],
  2601. "height": 20,
  2602. "id": "id1",
  2603. "isDeleted": false,
  2604. "opacity": 100,
  2605. "roughness": 1,
  2606. "seed": 453191,
  2607. "strokeColor": "#000000",
  2608. "strokeSharpness": "sharp",
  2609. "strokeStyle": "solid",
  2610. "strokeWidth": 1,
  2611. "type": "rectangle",
  2612. "version": 2,
  2613. "versionNonce": 401146281,
  2614. "width": 20,
  2615. "x": 20,
  2616. "y": 30,
  2617. },
  2618. ],
  2619. },
  2620. Object {
  2621. "appState": Object {
  2622. "editingGroupId": null,
  2623. "editingLinearElement": null,
  2624. "name": "Untitled-201933152653",
  2625. "selectedElementIds": Object {
  2626. "id1": true,
  2627. },
  2628. "viewBackgroundColor": "#ffffff",
  2629. },
  2630. "elements": Array [
  2631. Object {
  2632. "angle": 0,
  2633. "backgroundColor": "transparent",
  2634. "boundElementIds": null,
  2635. "fillStyle": "hachure",
  2636. "groupIds": Array [],
  2637. "height": 20,
  2638. "id": "id1",
  2639. "isDeleted": false,
  2640. "opacity": 100,
  2641. "roughness": 1,
  2642. "seed": 453191,
  2643. "strokeColor": "#000000",
  2644. "strokeSharpness": "sharp",
  2645. "strokeStyle": "solid",
  2646. "strokeWidth": 1,
  2647. "type": "rectangle",
  2648. "version": 3,
  2649. "versionNonce": 2019559783,
  2650. "width": 20,
  2651. "x": 20,
  2652. "y": 30,
  2653. },
  2654. Object {
  2655. "angle": 0,
  2656. "backgroundColor": "transparent",
  2657. "boundElementIds": null,
  2658. "fillStyle": "hachure",
  2659. "groupIds": Array [],
  2660. "height": 20,
  2661. "id": "id0",
  2662. "isDeleted": false,
  2663. "opacity": 100,
  2664. "roughness": 1,
  2665. "seed": 1278240551,
  2666. "strokeColor": "#000000",
  2667. "strokeSharpness": "sharp",
  2668. "strokeStyle": "solid",
  2669. "strokeWidth": 1,
  2670. "type": "rectangle",
  2671. "version": 2,
  2672. "versionNonce": 449462985,
  2673. "width": 20,
  2674. "x": -10,
  2675. "y": 0,
  2676. },
  2677. ],
  2678. },
  2679. ],
  2680. }
  2681. `;
  2682. exports[`contextMenu element selecting 'Send backward' in context menu sends element backward: [end of test] number of elements 1`] = `2`;
  2683. exports[`contextMenu element selecting 'Send backward' in context menu sends element backward: [end of test] number of renders 1`] = `14`;
  2684. exports[`contextMenu element selecting 'Send to back' in context menu sends element to back: [end of test] appState 1`] = `
  2685. Object {
  2686. "collaborators": Map {},
  2687. "currentChartType": "bar",
  2688. "currentItemBackgroundColor": "transparent",
  2689. "currentItemEndArrowhead": "arrow",
  2690. "currentItemFillStyle": "hachure",
  2691. "currentItemFontFamily": 1,
  2692. "currentItemFontSize": 20,
  2693. "currentItemLinearStrokeSharpness": "round",
  2694. "currentItemOpacity": 100,
  2695. "currentItemRoughness": 1,
  2696. "currentItemStartArrowhead": null,
  2697. "currentItemStrokeColor": "#000000",
  2698. "currentItemStrokeSharpness": "sharp",
  2699. "currentItemStrokeStyle": "solid",
  2700. "currentItemStrokeWidth": 1,
  2701. "currentItemTextAlign": "left",
  2702. "cursorButton": "up",
  2703. "draggingElement": null,
  2704. "editingElement": null,
  2705. "editingGroupId": null,
  2706. "editingLinearElement": null,
  2707. "elementLocked": false,
  2708. "elementType": "selection",
  2709. "errorMessage": null,
  2710. "exportBackground": true,
  2711. "exportEmbedScene": false,
  2712. "exportWithDarkMode": false,
  2713. "fileHandle": null,
  2714. "gridSize": null,
  2715. "height": 100,
  2716. "isBindingEnabled": true,
  2717. "isLibraryOpen": false,
  2718. "isLoading": false,
  2719. "isResizing": false,
  2720. "isRotating": false,
  2721. "lastPointerDownWith": "mouse",
  2722. "multiElement": null,
  2723. "name": "Untitled-201933152653",
  2724. "offsetLeft": 20,
  2725. "offsetTop": 10,
  2726. "openMenu": null,
  2727. "pasteDialog": Object {
  2728. "data": null,
  2729. "shown": false,
  2730. },
  2731. "previousSelectedElementIds": Object {},
  2732. "resizingElement": null,
  2733. "scrollX": 0,
  2734. "scrollY": 0,
  2735. "scrolledOutside": false,
  2736. "selectedElementIds": Object {
  2737. "id1": true,
  2738. },
  2739. "selectedGroupIds": Object {},
  2740. "selectionElement": null,
  2741. "shouldCacheIgnoreZoom": false,
  2742. "showHelpDialog": false,
  2743. "showStats": false,
  2744. "startBoundElement": null,
  2745. "suggestedBindings": Array [],
  2746. "theme": "light",
  2747. "toastMessage": null,
  2748. "viewBackgroundColor": "#ffffff",
  2749. "viewModeEnabled": false,
  2750. "width": 200,
  2751. "zenModeEnabled": false,
  2752. "zoom": Object {
  2753. "translation": Object {
  2754. "x": 0,
  2755. "y": 0,
  2756. },
  2757. "value": 1,
  2758. },
  2759. }
  2760. `;
  2761. exports[`contextMenu element selecting 'Send to back' in context menu sends element to back: [end of test] element 0 1`] = `
  2762. Object {
  2763. "angle": 0,
  2764. "backgroundColor": "transparent",
  2765. "boundElementIds": null,
  2766. "fillStyle": "hachure",
  2767. "groupIds": Array [],
  2768. "height": 20,
  2769. "id": "id1",
  2770. "isDeleted": false,
  2771. "opacity": 100,
  2772. "roughness": 1,
  2773. "seed": 453191,
  2774. "strokeColor": "#000000",
  2775. "strokeSharpness": "sharp",
  2776. "strokeStyle": "solid",
  2777. "strokeWidth": 1,
  2778. "type": "rectangle",
  2779. "version": 3,
  2780. "versionNonce": 2019559783,
  2781. "width": 20,
  2782. "x": 20,
  2783. "y": 30,
  2784. }
  2785. `;
  2786. exports[`contextMenu element selecting 'Send to back' in context menu sends element to back: [end of test] element 1 1`] = `
  2787. Object {
  2788. "angle": 0,
  2789. "backgroundColor": "transparent",
  2790. "boundElementIds": null,
  2791. "fillStyle": "hachure",
  2792. "groupIds": Array [],
  2793. "height": 20,
  2794. "id": "id0",
  2795. "isDeleted": false,
  2796. "opacity": 100,
  2797. "roughness": 1,
  2798. "seed": 1278240551,
  2799. "strokeColor": "#000000",
  2800. "strokeSharpness": "sharp",
  2801. "strokeStyle": "solid",
  2802. "strokeWidth": 1,
  2803. "type": "rectangle",
  2804. "version": 2,
  2805. "versionNonce": 449462985,
  2806. "width": 20,
  2807. "x": -10,
  2808. "y": 0,
  2809. }
  2810. `;
  2811. exports[`contextMenu element selecting 'Send to back' in context menu sends element to back: [end of test] history 1`] = `
  2812. Object {
  2813. "recording": false,
  2814. "redoStack": Array [],
  2815. "stateHistory": Array [
  2816. Object {
  2817. "appState": Object {
  2818. "editingGroupId": null,
  2819. "editingLinearElement": null,
  2820. "name": "Untitled-201933152653",
  2821. "selectedElementIds": Object {},
  2822. "viewBackgroundColor": "#ffffff",
  2823. },
  2824. "elements": Array [],
  2825. },
  2826. Object {
  2827. "appState": Object {
  2828. "editingGroupId": null,
  2829. "editingLinearElement": null,
  2830. "name": "Untitled-201933152653",
  2831. "selectedElementIds": Object {
  2832. "id0": true,
  2833. },
  2834. "viewBackgroundColor": "#ffffff",
  2835. },
  2836. "elements": Array [
  2837. Object {
  2838. "angle": 0,
  2839. "backgroundColor": "transparent",
  2840. "boundElementIds": null,
  2841. "fillStyle": "hachure",
  2842. "groupIds": Array [],
  2843. "height": 20,
  2844. "id": "id0",
  2845. "isDeleted": false,
  2846. "opacity": 100,
  2847. "roughness": 1,
  2848. "seed": 1278240551,
  2849. "strokeColor": "#000000",
  2850. "strokeSharpness": "sharp",
  2851. "strokeStyle": "solid",
  2852. "strokeWidth": 1,
  2853. "type": "rectangle",
  2854. "version": 2,
  2855. "versionNonce": 449462985,
  2856. "width": 20,
  2857. "x": -10,
  2858. "y": 0,
  2859. },
  2860. ],
  2861. },
  2862. Object {
  2863. "appState": Object {
  2864. "editingGroupId": null,
  2865. "editingLinearElement": null,
  2866. "name": "Untitled-201933152653",
  2867. "selectedElementIds": Object {
  2868. "id1": true,
  2869. },
  2870. "viewBackgroundColor": "#ffffff",
  2871. },
  2872. "elements": Array [
  2873. Object {
  2874. "angle": 0,
  2875. "backgroundColor": "transparent",
  2876. "boundElementIds": null,
  2877. "fillStyle": "hachure",
  2878. "groupIds": Array [],
  2879. "height": 20,
  2880. "id": "id0",
  2881. "isDeleted": false,
  2882. "opacity": 100,
  2883. "roughness": 1,
  2884. "seed": 1278240551,
  2885. "strokeColor": "#000000",
  2886. "strokeSharpness": "sharp",
  2887. "strokeStyle": "solid",
  2888. "strokeWidth": 1,
  2889. "type": "rectangle",
  2890. "version": 2,
  2891. "versionNonce": 449462985,
  2892. "width": 20,
  2893. "x": -10,
  2894. "y": 0,
  2895. },
  2896. Object {
  2897. "angle": 0,
  2898. "backgroundColor": "transparent",
  2899. "boundElementIds": null,
  2900. "fillStyle": "hachure",
  2901. "groupIds": Array [],
  2902. "height": 20,
  2903. "id": "id1",
  2904. "isDeleted": false,
  2905. "opacity": 100,
  2906. "roughness": 1,
  2907. "seed": 453191,
  2908. "strokeColor": "#000000",
  2909. "strokeSharpness": "sharp",
  2910. "strokeStyle": "solid",
  2911. "strokeWidth": 1,
  2912. "type": "rectangle",
  2913. "version": 2,
  2914. "versionNonce": 401146281,
  2915. "width": 20,
  2916. "x": 20,
  2917. "y": 30,
  2918. },
  2919. ],
  2920. },
  2921. Object {
  2922. "appState": Object {
  2923. "editingGroupId": null,
  2924. "editingLinearElement": null,
  2925. "name": "Untitled-201933152653",
  2926. "selectedElementIds": Object {
  2927. "id1": true,
  2928. },
  2929. "viewBackgroundColor": "#ffffff",
  2930. },
  2931. "elements": Array [
  2932. Object {
  2933. "angle": 0,
  2934. "backgroundColor": "transparent",
  2935. "boundElementIds": null,
  2936. "fillStyle": "hachure",
  2937. "groupIds": Array [],
  2938. "height": 20,
  2939. "id": "id1",
  2940. "isDeleted": false,
  2941. "opacity": 100,
  2942. "roughness": 1,
  2943. "seed": 453191,
  2944. "strokeColor": "#000000",
  2945. "strokeSharpness": "sharp",
  2946. "strokeStyle": "solid",
  2947. "strokeWidth": 1,
  2948. "type": "rectangle",
  2949. "version": 3,
  2950. "versionNonce": 2019559783,
  2951. "width": 20,
  2952. "x": 20,
  2953. "y": 30,
  2954. },
  2955. Object {
  2956. "angle": 0,
  2957. "backgroundColor": "transparent",
  2958. "boundElementIds": null,
  2959. "fillStyle": "hachure",
  2960. "groupIds": Array [],
  2961. "height": 20,
  2962. "id": "id0",
  2963. "isDeleted": false,
  2964. "opacity": 100,
  2965. "roughness": 1,
  2966. "seed": 1278240551,
  2967. "strokeColor": "#000000",
  2968. "strokeSharpness": "sharp",
  2969. "strokeStyle": "solid",
  2970. "strokeWidth": 1,
  2971. "type": "rectangle",
  2972. "version": 2,
  2973. "versionNonce": 449462985,
  2974. "width": 20,
  2975. "x": -10,
  2976. "y": 0,
  2977. },
  2978. ],
  2979. },
  2980. ],
  2981. }
  2982. `;
  2983. exports[`contextMenu element selecting 'Send to back' in context menu sends element to back: [end of test] number of elements 1`] = `2`;
  2984. exports[`contextMenu element selecting 'Send to back' in context menu sends element to back: [end of test] number of renders 1`] = `14`;
  2985. exports[`contextMenu element selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] appState 1`] = `
  2986. Object {
  2987. "collaborators": Map {},
  2988. "currentChartType": "bar",
  2989. "currentItemBackgroundColor": "transparent",
  2990. "currentItemEndArrowhead": "arrow",
  2991. "currentItemFillStyle": "hachure",
  2992. "currentItemFontFamily": 1,
  2993. "currentItemFontSize": 20,
  2994. "currentItemLinearStrokeSharpness": "round",
  2995. "currentItemOpacity": 100,
  2996. "currentItemRoughness": 1,
  2997. "currentItemStartArrowhead": null,
  2998. "currentItemStrokeColor": "#000000",
  2999. "currentItemStrokeSharpness": "sharp",
  3000. "currentItemStrokeStyle": "solid",
  3001. "currentItemStrokeWidth": 1,
  3002. "currentItemTextAlign": "left",
  3003. "cursorButton": "up",
  3004. "draggingElement": null,
  3005. "editingElement": null,
  3006. "editingGroupId": null,
  3007. "editingLinearElement": null,
  3008. "elementLocked": false,
  3009. "elementType": "selection",
  3010. "errorMessage": null,
  3011. "exportBackground": true,
  3012. "exportEmbedScene": false,
  3013. "exportWithDarkMode": false,
  3014. "fileHandle": null,
  3015. "gridSize": null,
  3016. "height": 100,
  3017. "isBindingEnabled": true,
  3018. "isLibraryOpen": false,
  3019. "isLoading": false,
  3020. "isResizing": false,
  3021. "isRotating": false,
  3022. "lastPointerDownWith": "mouse",
  3023. "multiElement": null,
  3024. "name": "Untitled-201933152653",
  3025. "offsetLeft": 20,
  3026. "offsetTop": 10,
  3027. "openMenu": null,
  3028. "pasteDialog": Object {
  3029. "data": null,
  3030. "shown": false,
  3031. },
  3032. "previousSelectedElementIds": Object {
  3033. "id1": true,
  3034. },
  3035. "resizingElement": null,
  3036. "scrollX": 0,
  3037. "scrollY": 0,
  3038. "scrolledOutside": false,
  3039. "selectedElementIds": Object {
  3040. "id0": true,
  3041. "id1": true,
  3042. "id2": true,
  3043. },
  3044. "selectedGroupIds": Object {},
  3045. "selectionElement": null,
  3046. "shouldCacheIgnoreZoom": false,
  3047. "showHelpDialog": false,
  3048. "showStats": false,
  3049. "startBoundElement": null,
  3050. "suggestedBindings": Array [],
  3051. "theme": "light",
  3052. "toastMessage": null,
  3053. "viewBackgroundColor": "#ffffff",
  3054. "viewModeEnabled": false,
  3055. "width": 200,
  3056. "zenModeEnabled": false,
  3057. "zoom": Object {
  3058. "translation": Object {
  3059. "x": 0,
  3060. "y": 0,
  3061. },
  3062. "value": 1,
  3063. },
  3064. }
  3065. `;
  3066. exports[`contextMenu element selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] element 0 1`] = `
  3067. Object {
  3068. "angle": 0,
  3069. "backgroundColor": "transparent",
  3070. "boundElementIds": null,
  3071. "fillStyle": "hachure",
  3072. "groupIds": Array [],
  3073. "height": 20,
  3074. "id": "id0",
  3075. "isDeleted": false,
  3076. "opacity": 100,
  3077. "roughness": 1,
  3078. "seed": 449462985,
  3079. "strokeColor": "#000000",
  3080. "strokeSharpness": "sharp",
  3081. "strokeStyle": "solid",
  3082. "strokeWidth": 1,
  3083. "type": "rectangle",
  3084. "version": 4,
  3085. "versionNonce": 238820263,
  3086. "width": 20,
  3087. "x": -10,
  3088. "y": 0,
  3089. }
  3090. `;
  3091. exports[`contextMenu element selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] element 1 1`] = `
  3092. Object {
  3093. "angle": 0,
  3094. "backgroundColor": "transparent",
  3095. "boundElementIds": null,
  3096. "fillStyle": "hachure",
  3097. "groupIds": Array [],
  3098. "height": 20,
  3099. "id": "id1",
  3100. "isDeleted": false,
  3101. "opacity": 100,
  3102. "roughness": 1,
  3103. "seed": 401146281,
  3104. "strokeColor": "#000000",
  3105. "strokeSharpness": "sharp",
  3106. "strokeStyle": "solid",
  3107. "strokeWidth": 1,
  3108. "type": "rectangle",
  3109. "version": 4,
  3110. "versionNonce": 400692809,
  3111. "width": 20,
  3112. "x": 20,
  3113. "y": 30,
  3114. }
  3115. `;
  3116. exports[`contextMenu element selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] history 1`] = `
  3117. Object {
  3118. "recording": false,
  3119. "redoStack": Array [],
  3120. "stateHistory": Array [
  3121. Object {
  3122. "appState": Object {
  3123. "editingGroupId": null,
  3124. "editingLinearElement": null,
  3125. "name": "Untitled-201933152653",
  3126. "selectedElementIds": Object {},
  3127. "viewBackgroundColor": "#ffffff",
  3128. },
  3129. "elements": Array [],
  3130. },
  3131. Object {
  3132. "appState": Object {
  3133. "editingGroupId": null,
  3134. "editingLinearElement": null,
  3135. "name": "Untitled-201933152653",
  3136. "selectedElementIds": Object {
  3137. "id0": true,
  3138. },
  3139. "viewBackgroundColor": "#ffffff",
  3140. },
  3141. "elements": Array [
  3142. Object {
  3143. "angle": 0,
  3144. "backgroundColor": "transparent",
  3145. "boundElementIds": null,
  3146. "fillStyle": "hachure",
  3147. "groupIds": Array [],
  3148. "height": 20,
  3149. "id": "id0",
  3150. "isDeleted": false,
  3151. "opacity": 100,
  3152. "roughness": 1,
  3153. "seed": 449462985,
  3154. "strokeColor": "#000000",
  3155. "strokeSharpness": "sharp",
  3156. "strokeStyle": "solid",
  3157. "strokeWidth": 1,
  3158. "type": "rectangle",
  3159. "version": 2,
  3160. "versionNonce": 453191,
  3161. "width": 20,
  3162. "x": -10,
  3163. "y": 0,
  3164. },
  3165. ],
  3166. },
  3167. Object {
  3168. "appState": Object {
  3169. "editingGroupId": null,
  3170. "editingLinearElement": null,
  3171. "name": "Untitled-201933152653",
  3172. "selectedElementIds": Object {
  3173. "id1": true,
  3174. },
  3175. "viewBackgroundColor": "#ffffff",
  3176. },
  3177. "elements": Array [
  3178. Object {
  3179. "angle": 0,
  3180. "backgroundColor": "transparent",
  3181. "boundElementIds": null,
  3182. "fillStyle": "hachure",
  3183. "groupIds": Array [],
  3184. "height": 20,
  3185. "id": "id0",
  3186. "isDeleted": false,
  3187. "opacity": 100,
  3188. "roughness": 1,
  3189. "seed": 449462985,
  3190. "strokeColor": "#000000",
  3191. "strokeSharpness": "sharp",
  3192. "strokeStyle": "solid",
  3193. "strokeWidth": 1,
  3194. "type": "rectangle",
  3195. "version": 2,
  3196. "versionNonce": 453191,
  3197. "width": 20,
  3198. "x": -10,
  3199. "y": 0,
  3200. },
  3201. Object {
  3202. "angle": 0,
  3203. "backgroundColor": "transparent",
  3204. "boundElementIds": null,
  3205. "fillStyle": "hachure",
  3206. "groupIds": Array [],
  3207. "height": 20,
  3208. "id": "id1",
  3209. "isDeleted": false,
  3210. "opacity": 100,
  3211. "roughness": 1,
  3212. "seed": 401146281,
  3213. "strokeColor": "#000000",
  3214. "strokeSharpness": "sharp",
  3215. "strokeStyle": "solid",
  3216. "strokeWidth": 1,
  3217. "type": "rectangle",
  3218. "version": 2,
  3219. "versionNonce": 2019559783,
  3220. "width": 20,
  3221. "x": 20,
  3222. "y": 30,
  3223. },
  3224. ],
  3225. },
  3226. Object {
  3227. "appState": Object {
  3228. "editingGroupId": null,
  3229. "editingLinearElement": null,
  3230. "name": "Untitled-201933152653",
  3231. "selectedElementIds": Object {
  3232. "id0": true,
  3233. "id1": true,
  3234. "id2": true,
  3235. },
  3236. "viewBackgroundColor": "#ffffff",
  3237. },
  3238. "elements": Array [
  3239. Object {
  3240. "angle": 0,
  3241. "backgroundColor": "transparent",
  3242. "boundElementIds": null,
  3243. "fillStyle": "hachure",
  3244. "groupIds": Array [
  3245. "id3",
  3246. ],
  3247. "height": 20,
  3248. "id": "id0",
  3249. "isDeleted": false,
  3250. "opacity": 100,
  3251. "roughness": 1,
  3252. "seed": 449462985,
  3253. "strokeColor": "#000000",
  3254. "strokeSharpness": "sharp",
  3255. "strokeStyle": "solid",
  3256. "strokeWidth": 1,
  3257. "type": "rectangle",
  3258. "version": 3,
  3259. "versionNonce": 1116226695,
  3260. "width": 20,
  3261. "x": -10,
  3262. "y": 0,
  3263. },
  3264. Object {
  3265. "angle": 0,
  3266. "backgroundColor": "transparent",
  3267. "boundElementIds": null,
  3268. "fillStyle": "hachure",
  3269. "groupIds": Array [
  3270. "id3",
  3271. ],
  3272. "height": 20,
  3273. "id": "id1",
  3274. "isDeleted": false,
  3275. "opacity": 100,
  3276. "roughness": 1,
  3277. "seed": 401146281,
  3278. "strokeColor": "#000000",
  3279. "strokeSharpness": "sharp",
  3280. "strokeStyle": "solid",
  3281. "strokeWidth": 1,
  3282. "type": "rectangle",
  3283. "version": 3,
  3284. "versionNonce": 1014066025,
  3285. "width": 20,
  3286. "x": 20,
  3287. "y": 30,
  3288. },
  3289. ],
  3290. },
  3291. Object {
  3292. "appState": Object {
  3293. "editingGroupId": null,
  3294. "editingLinearElement": null,
  3295. "name": "Untitled-201933152653",
  3296. "selectedElementIds": Object {
  3297. "id0": true,
  3298. "id1": true,
  3299. "id2": true,
  3300. },
  3301. "viewBackgroundColor": "#ffffff",
  3302. },
  3303. "elements": Array [
  3304. Object {
  3305. "angle": 0,
  3306. "backgroundColor": "transparent",
  3307. "boundElementIds": null,
  3308. "fillStyle": "hachure",
  3309. "groupIds": Array [],
  3310. "height": 20,
  3311. "id": "id0",
  3312. "isDeleted": false,
  3313. "opacity": 100,
  3314. "roughness": 1,
  3315. "seed": 449462985,
  3316. "strokeColor": "#000000",
  3317. "strokeSharpness": "sharp",
  3318. "strokeStyle": "solid",
  3319. "strokeWidth": 1,
  3320. "type": "rectangle",
  3321. "version": 4,
  3322. "versionNonce": 238820263,
  3323. "width": 20,
  3324. "x": -10,
  3325. "y": 0,
  3326. },
  3327. Object {
  3328. "angle": 0,
  3329. "backgroundColor": "transparent",
  3330. "boundElementIds": null,
  3331. "fillStyle": "hachure",
  3332. "groupIds": Array [],
  3333. "height": 20,
  3334. "id": "id1",
  3335. "isDeleted": false,
  3336. "opacity": 100,
  3337. "roughness": 1,
  3338. "seed": 401146281,
  3339. "strokeColor": "#000000",
  3340. "strokeSharpness": "sharp",
  3341. "strokeStyle": "solid",
  3342. "strokeWidth": 1,
  3343. "type": "rectangle",
  3344. "version": 4,
  3345. "versionNonce": 400692809,
  3346. "width": 20,
  3347. "x": 20,
  3348. "y": 30,
  3349. },
  3350. ],
  3351. },
  3352. ],
  3353. }
  3354. `;
  3355. exports[`contextMenu element selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] number of elements 1`] = `2`;
  3356. exports[`contextMenu element selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] number of renders 1`] = `17`;
  3357. exports[`contextMenu element shows 'Group selection' in context menu for multiple selected elements: [end of test] appState 1`] = `
  3358. Object {
  3359. "collaborators": Map {},
  3360. "currentChartType": "bar",
  3361. "currentItemBackgroundColor": "transparent",
  3362. "currentItemEndArrowhead": "arrow",
  3363. "currentItemFillStyle": "hachure",
  3364. "currentItemFontFamily": 1,
  3365. "currentItemFontSize": 20,
  3366. "currentItemLinearStrokeSharpness": "round",
  3367. "currentItemOpacity": 100,
  3368. "currentItemRoughness": 1,
  3369. "currentItemStartArrowhead": null,
  3370. "currentItemStrokeColor": "#000000",
  3371. "currentItemStrokeSharpness": "sharp",
  3372. "currentItemStrokeStyle": "solid",
  3373. "currentItemStrokeWidth": 1,
  3374. "currentItemTextAlign": "left",
  3375. "cursorButton": "up",
  3376. "draggingElement": null,
  3377. "editingElement": null,
  3378. "editingGroupId": null,
  3379. "editingLinearElement": null,
  3380. "elementLocked": false,
  3381. "elementType": "selection",
  3382. "errorMessage": null,
  3383. "exportBackground": true,
  3384. "exportEmbedScene": false,
  3385. "exportWithDarkMode": false,
  3386. "fileHandle": null,
  3387. "gridSize": null,
  3388. "height": 100,
  3389. "isBindingEnabled": true,
  3390. "isLibraryOpen": false,
  3391. "isLoading": false,
  3392. "isResizing": false,
  3393. "isRotating": false,
  3394. "lastPointerDownWith": "mouse",
  3395. "multiElement": null,
  3396. "name": "Untitled-201933152653",
  3397. "offsetLeft": 20,
  3398. "offsetTop": 10,
  3399. "openMenu": null,
  3400. "pasteDialog": Object {
  3401. "data": null,
  3402. "shown": false,
  3403. },
  3404. "previousSelectedElementIds": Object {
  3405. "id0": true,
  3406. "id2": true,
  3407. },
  3408. "resizingElement": null,
  3409. "scrollX": 0,
  3410. "scrollY": 0,
  3411. "scrolledOutside": false,
  3412. "selectedElementIds": Object {
  3413. "id0": true,
  3414. "id1": true,
  3415. "id2": true,
  3416. "id3": true,
  3417. },
  3418. "selectedGroupIds": Object {},
  3419. "selectionElement": null,
  3420. "shouldCacheIgnoreZoom": false,
  3421. "showHelpDialog": false,
  3422. "showStats": false,
  3423. "startBoundElement": null,
  3424. "suggestedBindings": Array [],
  3425. "theme": "light",
  3426. "toastMessage": null,
  3427. "viewBackgroundColor": "#ffffff",
  3428. "viewModeEnabled": false,
  3429. "width": 200,
  3430. "zenModeEnabled": false,
  3431. "zoom": Object {
  3432. "translation": Object {
  3433. "x": 0,
  3434. "y": 0,
  3435. },
  3436. "value": 1,
  3437. },
  3438. }
  3439. `;
  3440. exports[`contextMenu element shows 'Group selection' in context menu for multiple selected elements: [end of test] element 0 1`] = `
  3441. Object {
  3442. "angle": 0,
  3443. "backgroundColor": "transparent",
  3444. "boundElementIds": null,
  3445. "fillStyle": "hachure",
  3446. "groupIds": Array [],
  3447. "height": 10,
  3448. "id": "id0",
  3449. "isDeleted": false,
  3450. "opacity": 100,
  3451. "roughness": 1,
  3452. "seed": 1278240551,
  3453. "strokeColor": "#000000",
  3454. "strokeSharpness": "sharp",
  3455. "strokeStyle": "solid",
  3456. "strokeWidth": 1,
  3457. "type": "rectangle",
  3458. "version": 2,
  3459. "versionNonce": 449462985,
  3460. "width": 10,
  3461. "x": -10,
  3462. "y": 0,
  3463. }
  3464. `;
  3465. exports[`contextMenu element shows 'Group selection' in context menu for multiple selected elements: [end of test] element 1 1`] = `
  3466. Object {
  3467. "angle": 0,
  3468. "backgroundColor": "transparent",
  3469. "boundElementIds": null,
  3470. "fillStyle": "hachure",
  3471. "groupIds": Array [],
  3472. "height": 10,
  3473. "id": "id1",
  3474. "isDeleted": false,
  3475. "opacity": 100,
  3476. "roughness": 1,
  3477. "seed": 453191,
  3478. "strokeColor": "#000000",
  3479. "strokeSharpness": "sharp",
  3480. "strokeStyle": "solid",
  3481. "strokeWidth": 1,
  3482. "type": "rectangle",
  3483. "version": 2,
  3484. "versionNonce": 401146281,
  3485. "width": 10,
  3486. "x": 10,
  3487. "y": 0,
  3488. }
  3489. `;
  3490. exports[`contextMenu element shows 'Group selection' in context menu for multiple selected elements: [end of test] history 1`] = `
  3491. Object {
  3492. "recording": false,
  3493. "redoStack": Array [],
  3494. "stateHistory": Array [
  3495. Object {
  3496. "appState": Object {
  3497. "editingGroupId": null,
  3498. "editingLinearElement": null,
  3499. "name": "Untitled-201933152653",
  3500. "selectedElementIds": Object {},
  3501. "viewBackgroundColor": "#ffffff",
  3502. },
  3503. "elements": Array [],
  3504. },
  3505. Object {
  3506. "appState": Object {
  3507. "editingGroupId": null,
  3508. "editingLinearElement": null,
  3509. "name": "Untitled-201933152653",
  3510. "selectedElementIds": Object {
  3511. "id0": true,
  3512. },
  3513. "viewBackgroundColor": "#ffffff",
  3514. },
  3515. "elements": Array [
  3516. Object {
  3517. "angle": 0,
  3518. "backgroundColor": "transparent",
  3519. "boundElementIds": null,
  3520. "fillStyle": "hachure",
  3521. "groupIds": Array [],
  3522. "height": 10,
  3523. "id": "id0",
  3524. "isDeleted": false,
  3525. "opacity": 100,
  3526. "roughness": 1,
  3527. "seed": 1278240551,
  3528. "strokeColor": "#000000",
  3529. "strokeSharpness": "sharp",
  3530. "strokeStyle": "solid",
  3531. "strokeWidth": 1,
  3532. "type": "rectangle",
  3533. "version": 2,
  3534. "versionNonce": 449462985,
  3535. "width": 10,
  3536. "x": -10,
  3537. "y": 0,
  3538. },
  3539. ],
  3540. },
  3541. Object {
  3542. "appState": Object {
  3543. "editingGroupId": null,
  3544. "editingLinearElement": null,
  3545. "name": "Untitled-201933152653",
  3546. "selectedElementIds": Object {
  3547. "id1": true,
  3548. },
  3549. "viewBackgroundColor": "#ffffff",
  3550. },
  3551. "elements": Array [
  3552. Object {
  3553. "angle": 0,
  3554. "backgroundColor": "transparent",
  3555. "boundElementIds": null,
  3556. "fillStyle": "hachure",
  3557. "groupIds": Array [],
  3558. "height": 10,
  3559. "id": "id0",
  3560. "isDeleted": false,
  3561. "opacity": 100,
  3562. "roughness": 1,
  3563. "seed": 1278240551,
  3564. "strokeColor": "#000000",
  3565. "strokeSharpness": "sharp",
  3566. "strokeStyle": "solid",
  3567. "strokeWidth": 1,
  3568. "type": "rectangle",
  3569. "version": 2,
  3570. "versionNonce": 449462985,
  3571. "width": 10,
  3572. "x": -10,
  3573. "y": 0,
  3574. },
  3575. Object {
  3576. "angle": 0,
  3577. "backgroundColor": "transparent",
  3578. "boundElementIds": null,
  3579. "fillStyle": "hachure",
  3580. "groupIds": Array [],
  3581. "height": 10,
  3582. "id": "id1",
  3583. "isDeleted": false,
  3584. "opacity": 100,
  3585. "roughness": 1,
  3586. "seed": 453191,
  3587. "strokeColor": "#000000",
  3588. "strokeSharpness": "sharp",
  3589. "strokeStyle": "solid",
  3590. "strokeWidth": 1,
  3591. "type": "rectangle",
  3592. "version": 2,
  3593. "versionNonce": 401146281,
  3594. "width": 10,
  3595. "x": 10,
  3596. "y": 0,
  3597. },
  3598. ],
  3599. },
  3600. ],
  3601. }
  3602. `;
  3603. exports[`contextMenu element shows 'Group selection' in context menu for multiple selected elements: [end of test] number of elements 1`] = `2`;
  3604. exports[`contextMenu element shows 'Group selection' in context menu for multiple selected elements: [end of test] number of renders 1`] = `17`;
  3605. exports[`contextMenu element shows 'Ungroup selection' in context menu for group inside selected elements: [end of test] appState 1`] = `
  3606. Object {
  3607. "collaborators": Map {},
  3608. "currentChartType": "bar",
  3609. "currentItemBackgroundColor": "transparent",
  3610. "currentItemEndArrowhead": "arrow",
  3611. "currentItemFillStyle": "hachure",
  3612. "currentItemFontFamily": 1,
  3613. "currentItemFontSize": 20,
  3614. "currentItemLinearStrokeSharpness": "round",
  3615. "currentItemOpacity": 100,
  3616. "currentItemRoughness": 1,
  3617. "currentItemStartArrowhead": null,
  3618. "currentItemStrokeColor": "#000000",
  3619. "currentItemStrokeSharpness": "sharp",
  3620. "currentItemStrokeStyle": "solid",
  3621. "currentItemStrokeWidth": 1,
  3622. "currentItemTextAlign": "left",
  3623. "cursorButton": "up",
  3624. "draggingElement": null,
  3625. "editingElement": null,
  3626. "editingGroupId": null,
  3627. "editingLinearElement": null,
  3628. "elementLocked": false,
  3629. "elementType": "selection",
  3630. "errorMessage": null,
  3631. "exportBackground": true,
  3632. "exportEmbedScene": false,
  3633. "exportWithDarkMode": false,
  3634. "fileHandle": null,
  3635. "gridSize": null,
  3636. "height": 100,
  3637. "isBindingEnabled": true,
  3638. "isLibraryOpen": false,
  3639. "isLoading": false,
  3640. "isResizing": false,
  3641. "isRotating": false,
  3642. "lastPointerDownWith": "mouse",
  3643. "multiElement": null,
  3644. "name": "Untitled-201933152653",
  3645. "offsetLeft": 20,
  3646. "offsetTop": 10,
  3647. "openMenu": null,
  3648. "pasteDialog": Object {
  3649. "data": null,
  3650. "shown": false,
  3651. },
  3652. "previousSelectedElementIds": Object {
  3653. "id0": true,
  3654. "id2": true,
  3655. },
  3656. "resizingElement": null,
  3657. "scrollX": 0,
  3658. "scrollY": 0,
  3659. "scrolledOutside": false,
  3660. "selectedElementIds": Object {
  3661. "id0": true,
  3662. "id1": true,
  3663. "id2": true,
  3664. "id3": true,
  3665. },
  3666. "selectedGroupIds": Object {
  3667. "id4": true,
  3668. },
  3669. "selectionElement": null,
  3670. "shouldCacheIgnoreZoom": false,
  3671. "showHelpDialog": false,
  3672. "showStats": false,
  3673. "startBoundElement": null,
  3674. "suggestedBindings": Array [],
  3675. "theme": "light",
  3676. "toastMessage": null,
  3677. "viewBackgroundColor": "#ffffff",
  3678. "viewModeEnabled": false,
  3679. "width": 200,
  3680. "zenModeEnabled": false,
  3681. "zoom": Object {
  3682. "translation": Object {
  3683. "x": 0,
  3684. "y": 0,
  3685. },
  3686. "value": 1,
  3687. },
  3688. }
  3689. `;
  3690. exports[`contextMenu element shows 'Ungroup selection' in context menu for group inside selected elements: [end of test] element 0 1`] = `
  3691. Object {
  3692. "angle": 0,
  3693. "backgroundColor": "transparent",
  3694. "boundElementIds": null,
  3695. "fillStyle": "hachure",
  3696. "groupIds": Array [
  3697. "id4",
  3698. ],
  3699. "height": 10,
  3700. "id": "id0",
  3701. "isDeleted": false,
  3702. "opacity": 100,
  3703. "roughness": 1,
  3704. "seed": 449462985,
  3705. "strokeColor": "#000000",
  3706. "strokeSharpness": "sharp",
  3707. "strokeStyle": "solid",
  3708. "strokeWidth": 1,
  3709. "type": "rectangle",
  3710. "version": 3,
  3711. "versionNonce": 1014066025,
  3712. "width": 10,
  3713. "x": -10,
  3714. "y": 0,
  3715. }
  3716. `;
  3717. exports[`contextMenu element shows 'Ungroup selection' in context menu for group inside selected elements: [end of test] element 1 1`] = `
  3718. Object {
  3719. "angle": 0,
  3720. "backgroundColor": "transparent",
  3721. "boundElementIds": null,
  3722. "fillStyle": "hachure",
  3723. "groupIds": Array [
  3724. "id4",
  3725. ],
  3726. "height": 10,
  3727. "id": "id1",
  3728. "isDeleted": false,
  3729. "opacity": 100,
  3730. "roughness": 1,
  3731. "seed": 401146281,
  3732. "strokeColor": "#000000",
  3733. "strokeSharpness": "sharp",
  3734. "strokeStyle": "solid",
  3735. "strokeWidth": 1,
  3736. "type": "rectangle",
  3737. "version": 3,
  3738. "versionNonce": 238820263,
  3739. "width": 10,
  3740. "x": 10,
  3741. "y": 0,
  3742. }
  3743. `;
  3744. exports[`contextMenu element shows 'Ungroup selection' in context menu for group inside selected elements: [end of test] history 1`] = `
  3745. Object {
  3746. "recording": false,
  3747. "redoStack": Array [],
  3748. "stateHistory": Array [
  3749. Object {
  3750. "appState": Object {
  3751. "editingGroupId": null,
  3752. "editingLinearElement": null,
  3753. "name": "Untitled-201933152653",
  3754. "selectedElementIds": Object {},
  3755. "viewBackgroundColor": "#ffffff",
  3756. },
  3757. "elements": Array [],
  3758. },
  3759. Object {
  3760. "appState": Object {
  3761. "editingGroupId": null,
  3762. "editingLinearElement": null,
  3763. "name": "Untitled-201933152653",
  3764. "selectedElementIds": Object {
  3765. "id0": true,
  3766. },
  3767. "viewBackgroundColor": "#ffffff",
  3768. },
  3769. "elements": Array [
  3770. Object {
  3771. "angle": 0,
  3772. "backgroundColor": "transparent",
  3773. "boundElementIds": null,
  3774. "fillStyle": "hachure",
  3775. "groupIds": Array [],
  3776. "height": 10,
  3777. "id": "id0",
  3778. "isDeleted": false,
  3779. "opacity": 100,
  3780. "roughness": 1,
  3781. "seed": 449462985,
  3782. "strokeColor": "#000000",
  3783. "strokeSharpness": "sharp",
  3784. "strokeStyle": "solid",
  3785. "strokeWidth": 1,
  3786. "type": "rectangle",
  3787. "version": 2,
  3788. "versionNonce": 453191,
  3789. "width": 10,
  3790. "x": -10,
  3791. "y": 0,
  3792. },
  3793. ],
  3794. },
  3795. Object {
  3796. "appState": Object {
  3797. "editingGroupId": null,
  3798. "editingLinearElement": null,
  3799. "name": "Untitled-201933152653",
  3800. "selectedElementIds": Object {
  3801. "id1": true,
  3802. },
  3803. "viewBackgroundColor": "#ffffff",
  3804. },
  3805. "elements": Array [
  3806. Object {
  3807. "angle": 0,
  3808. "backgroundColor": "transparent",
  3809. "boundElementIds": null,
  3810. "fillStyle": "hachure",
  3811. "groupIds": Array [],
  3812. "height": 10,
  3813. "id": "id0",
  3814. "isDeleted": false,
  3815. "opacity": 100,
  3816. "roughness": 1,
  3817. "seed": 449462985,
  3818. "strokeColor": "#000000",
  3819. "strokeSharpness": "sharp",
  3820. "strokeStyle": "solid",
  3821. "strokeWidth": 1,
  3822. "type": "rectangle",
  3823. "version": 2,
  3824. "versionNonce": 453191,
  3825. "width": 10,
  3826. "x": -10,
  3827. "y": 0,
  3828. },
  3829. Object {
  3830. "angle": 0,
  3831. "backgroundColor": "transparent",
  3832. "boundElementIds": null,
  3833. "fillStyle": "hachure",
  3834. "groupIds": Array [],
  3835. "height": 10,
  3836. "id": "id1",
  3837. "isDeleted": false,
  3838. "opacity": 100,
  3839. "roughness": 1,
  3840. "seed": 401146281,
  3841. "strokeColor": "#000000",
  3842. "strokeSharpness": "sharp",
  3843. "strokeStyle": "solid",
  3844. "strokeWidth": 1,
  3845. "type": "rectangle",
  3846. "version": 2,
  3847. "versionNonce": 2019559783,
  3848. "width": 10,
  3849. "x": 10,
  3850. "y": 0,
  3851. },
  3852. ],
  3853. },
  3854. Object {
  3855. "appState": Object {
  3856. "editingGroupId": null,
  3857. "editingLinearElement": null,
  3858. "name": "Untitled-201933152653",
  3859. "selectedElementIds": Object {
  3860. "id0": true,
  3861. "id1": true,
  3862. "id2": true,
  3863. "id3": true,
  3864. },
  3865. "viewBackgroundColor": "#ffffff",
  3866. },
  3867. "elements": Array [
  3868. Object {
  3869. "angle": 0,
  3870. "backgroundColor": "transparent",
  3871. "boundElementIds": null,
  3872. "fillStyle": "hachure",
  3873. "groupIds": Array [
  3874. "id4",
  3875. ],
  3876. "height": 10,
  3877. "id": "id0",
  3878. "isDeleted": false,
  3879. "opacity": 100,
  3880. "roughness": 1,
  3881. "seed": 449462985,
  3882. "strokeColor": "#000000",
  3883. "strokeSharpness": "sharp",
  3884. "strokeStyle": "solid",
  3885. "strokeWidth": 1,
  3886. "type": "rectangle",
  3887. "version": 3,
  3888. "versionNonce": 1014066025,
  3889. "width": 10,
  3890. "x": -10,
  3891. "y": 0,
  3892. },
  3893. Object {
  3894. "angle": 0,
  3895. "backgroundColor": "transparent",
  3896. "boundElementIds": null,
  3897. "fillStyle": "hachure",
  3898. "groupIds": Array [
  3899. "id4",
  3900. ],
  3901. "height": 10,
  3902. "id": "id1",
  3903. "isDeleted": false,
  3904. "opacity": 100,
  3905. "roughness": 1,
  3906. "seed": 401146281,
  3907. "strokeColor": "#000000",
  3908. "strokeSharpness": "sharp",
  3909. "strokeStyle": "solid",
  3910. "strokeWidth": 1,
  3911. "type": "rectangle",
  3912. "version": 3,
  3913. "versionNonce": 238820263,
  3914. "width": 10,
  3915. "x": 10,
  3916. "y": 0,
  3917. },
  3918. ],
  3919. },
  3920. ],
  3921. }
  3922. `;
  3923. exports[`contextMenu element shows 'Ungroup selection' in context menu for group inside selected elements: [end of test] number of elements 1`] = `2`;
  3924. exports[`contextMenu element shows 'Ungroup selection' in context menu for group inside selected elements: [end of test] number of renders 1`] = `18`;
  3925. exports[`contextMenu element shows context menu for canvas: [end of test] appState 1`] = `
  3926. Object {
  3927. "collaborators": Map {},
  3928. "currentChartType": "bar",
  3929. "currentItemBackgroundColor": "transparent",
  3930. "currentItemEndArrowhead": "arrow",
  3931. "currentItemFillStyle": "hachure",
  3932. "currentItemFontFamily": 1,
  3933. "currentItemFontSize": 20,
  3934. "currentItemLinearStrokeSharpness": "round",
  3935. "currentItemOpacity": 100,
  3936. "currentItemRoughness": 1,
  3937. "currentItemStartArrowhead": null,
  3938. "currentItemStrokeColor": "#000000",
  3939. "currentItemStrokeSharpness": "sharp",
  3940. "currentItemStrokeStyle": "solid",
  3941. "currentItemStrokeWidth": 1,
  3942. "currentItemTextAlign": "left",
  3943. "cursorButton": "up",
  3944. "draggingElement": null,
  3945. "editingElement": null,
  3946. "editingGroupId": null,
  3947. "editingLinearElement": null,
  3948. "elementLocked": false,
  3949. "elementType": "selection",
  3950. "errorMessage": null,
  3951. "exportBackground": true,
  3952. "exportEmbedScene": false,
  3953. "exportWithDarkMode": false,
  3954. "fileHandle": null,
  3955. "gridSize": null,
  3956. "height": 100,
  3957. "isBindingEnabled": true,
  3958. "isLibraryOpen": false,
  3959. "isLoading": false,
  3960. "isResizing": false,
  3961. "isRotating": false,
  3962. "lastPointerDownWith": "mouse",
  3963. "multiElement": null,
  3964. "name": "Untitled-201933152653",
  3965. "offsetLeft": 20,
  3966. "offsetTop": 10,
  3967. "openMenu": null,
  3968. "pasteDialog": Object {
  3969. "data": null,
  3970. "shown": false,
  3971. },
  3972. "previousSelectedElementIds": Object {},
  3973. "resizingElement": null,
  3974. "scrollX": 0,
  3975. "scrollY": 0,
  3976. "scrolledOutside": false,
  3977. "selectedElementIds": Object {},
  3978. "selectedGroupIds": Object {},
  3979. "selectionElement": null,
  3980. "shouldCacheIgnoreZoom": false,
  3981. "showHelpDialog": false,
  3982. "showStats": false,
  3983. "startBoundElement": null,
  3984. "suggestedBindings": Array [],
  3985. "theme": "light",
  3986. "toastMessage": null,
  3987. "viewBackgroundColor": "#ffffff",
  3988. "viewModeEnabled": false,
  3989. "width": 200,
  3990. "zenModeEnabled": false,
  3991. "zoom": Object {
  3992. "translation": Object {
  3993. "x": 0,
  3994. "y": 0,
  3995. },
  3996. "value": 1,
  3997. },
  3998. }
  3999. `;
  4000. exports[`contextMenu element shows context menu for canvas: [end of test] history 1`] = `
  4001. Object {
  4002. "recording": false,
  4003. "redoStack": Array [],
  4004. "stateHistory": Array [
  4005. Object {
  4006. "appState": Object {
  4007. "editingGroupId": null,
  4008. "editingLinearElement": null,
  4009. "name": "Untitled-201933152653",
  4010. "selectedElementIds": Object {},
  4011. "viewBackgroundColor": "#ffffff",
  4012. },
  4013. "elements": Array [],
  4014. },
  4015. ],
  4016. }
  4017. `;
  4018. exports[`contextMenu element shows context menu for canvas: [end of test] number of elements 1`] = `0`;
  4019. exports[`contextMenu element shows context menu for canvas: [end of test] number of renders 1`] = `3`;
  4020. exports[`contextMenu element shows context menu for element: [end of test] appState 1`] = `
  4021. Object {
  4022. "collaborators": Map {},
  4023. "currentChartType": "bar",
  4024. "currentItemBackgroundColor": "transparent",
  4025. "currentItemEndArrowhead": "arrow",
  4026. "currentItemFillStyle": "hachure",
  4027. "currentItemFontFamily": 1,
  4028. "currentItemFontSize": 20,
  4029. "currentItemLinearStrokeSharpness": "round",
  4030. "currentItemOpacity": 100,
  4031. "currentItemRoughness": 1,
  4032. "currentItemStartArrowhead": null,
  4033. "currentItemStrokeColor": "#000000",
  4034. "currentItemStrokeSharpness": "sharp",
  4035. "currentItemStrokeStyle": "solid",
  4036. "currentItemStrokeWidth": 1,
  4037. "currentItemTextAlign": "left",
  4038. "cursorButton": "up",
  4039. "draggingElement": null,
  4040. "editingElement": null,
  4041. "editingGroupId": null,
  4042. "editingLinearElement": null,
  4043. "elementLocked": false,
  4044. "elementType": "selection",
  4045. "errorMessage": null,
  4046. "exportBackground": true,
  4047. "exportEmbedScene": false,
  4048. "exportWithDarkMode": false,
  4049. "fileHandle": null,
  4050. "gridSize": null,
  4051. "height": 100,
  4052. "isBindingEnabled": true,
  4053. "isLibraryOpen": false,
  4054. "isLoading": false,
  4055. "isResizing": false,
  4056. "isRotating": false,
  4057. "lastPointerDownWith": "mouse",
  4058. "multiElement": null,
  4059. "name": "Untitled-201933152653",
  4060. "offsetLeft": 20,
  4061. "offsetTop": 10,
  4062. "openMenu": null,
  4063. "pasteDialog": Object {
  4064. "data": null,
  4065. "shown": false,
  4066. },
  4067. "previousSelectedElementIds": Object {},
  4068. "resizingElement": null,
  4069. "scrollX": 0,
  4070. "scrollY": 0,
  4071. "scrolledOutside": false,
  4072. "selectedElementIds": Object {
  4073. "id0": true,
  4074. },
  4075. "selectedGroupIds": Object {},
  4076. "selectionElement": null,
  4077. "shouldCacheIgnoreZoom": false,
  4078. "showHelpDialog": false,
  4079. "showStats": false,
  4080. "startBoundElement": null,
  4081. "suggestedBindings": Array [],
  4082. "theme": "light",
  4083. "toastMessage": null,
  4084. "viewBackgroundColor": "#ffffff",
  4085. "viewModeEnabled": false,
  4086. "width": 200,
  4087. "zenModeEnabled": false,
  4088. "zoom": Object {
  4089. "translation": Object {
  4090. "x": 0,
  4091. "y": 0,
  4092. },
  4093. "value": 1,
  4094. },
  4095. }
  4096. `;
  4097. exports[`contextMenu element shows context menu for element: [end of test] element 0 1`] = `
  4098. Object {
  4099. "angle": 0,
  4100. "backgroundColor": "transparent",
  4101. "boundElementIds": null,
  4102. "fillStyle": "hachure",
  4103. "groupIds": Array [],
  4104. "height": 20,
  4105. "id": "id0",
  4106. "isDeleted": false,
  4107. "opacity": 100,
  4108. "roughness": 1,
  4109. "seed": 1278240551,
  4110. "strokeColor": "#000000",
  4111. "strokeSharpness": "sharp",
  4112. "strokeStyle": "solid",
  4113. "strokeWidth": 1,
  4114. "type": "rectangle",
  4115. "version": 2,
  4116. "versionNonce": 449462985,
  4117. "width": 20,
  4118. "x": -10,
  4119. "y": 0,
  4120. }
  4121. `;
  4122. exports[`contextMenu element shows context menu for element: [end of test] history 1`] = `
  4123. Object {
  4124. "recording": false,
  4125. "redoStack": Array [],
  4126. "stateHistory": Array [
  4127. Object {
  4128. "appState": Object {
  4129. "editingGroupId": null,
  4130. "editingLinearElement": null,
  4131. "name": "Untitled-201933152653",
  4132. "selectedElementIds": Object {},
  4133. "viewBackgroundColor": "#ffffff",
  4134. },
  4135. "elements": Array [],
  4136. },
  4137. Object {
  4138. "appState": Object {
  4139. "editingGroupId": null,
  4140. "editingLinearElement": null,
  4141. "name": "Untitled-201933152653",
  4142. "selectedElementIds": Object {
  4143. "id0": true,
  4144. },
  4145. "viewBackgroundColor": "#ffffff",
  4146. },
  4147. "elements": Array [
  4148. Object {
  4149. "angle": 0,
  4150. "backgroundColor": "transparent",
  4151. "boundElementIds": null,
  4152. "fillStyle": "hachure",
  4153. "groupIds": Array [],
  4154. "height": 20,
  4155. "id": "id0",
  4156. "isDeleted": false,
  4157. "opacity": 100,
  4158. "roughness": 1,
  4159. "seed": 1278240551,
  4160. "strokeColor": "#000000",
  4161. "strokeSharpness": "sharp",
  4162. "strokeStyle": "solid",
  4163. "strokeWidth": 1,
  4164. "type": "rectangle",
  4165. "version": 2,
  4166. "versionNonce": 449462985,
  4167. "width": 20,
  4168. "x": -10,
  4169. "y": 0,
  4170. },
  4171. ],
  4172. },
  4173. ],
  4174. }
  4175. `;
  4176. exports[`contextMenu element shows context menu for element: [end of test] number of elements 1`] = `1`;
  4177. exports[`contextMenu element shows context menu for element: [end of test] number of renders 1`] = `9`;