aboutsummaryrefslogtreecommitdiffstats
path: root/packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap
diff options
context:
space:
mode:
Diffstat (limited to 'packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap')
-rw-r--r--packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap14782
1 files changed, 14782 insertions, 0 deletions
diff --git a/packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap
new file mode 100644
index 0000000..5d48ead
--- /dev/null
+++ b/packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap
@@ -0,0 +1,14782 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`given element A and group of elements B and given both are selected when user clicks on B, on pointer up only elements from B should be selected > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id1": true,
+ "id2": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id2": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {
+ "id5": true,
+ },
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`given element A and group of elements B and given both are selected when user clicks on B, on pointer up only elements from B should be selected > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 30,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 60,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id5": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id5",
+ ],
+ "index": "a2",
+ },
+ "inserted": {
+ "groupIds": [],
+ "index": "a0",
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id5",
+ ],
+ "index": "a3",
+ },
+ "inserted": {
+ "groupIds": [],
+ "index": "a2",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`given element A and group of elements B and given both are selected when user clicks on B, on pointer up only elements from B should be selected > [end of test] number of elements 1`] = `0`;
+
+exports[`given element A and group of elements B and given both are selected when user clicks on B, on pointer up only elements from B should be selected > [end of test] number of renders 1`] = `18`;
+
+exports[`given element A and group of elements B and given both are selected when user shift-clicks on B, on pointer up only element A should be selected > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id1": true,
+ "id2": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {
+ "id0": true,
+ "id1": true,
+ "id2": true,
+ "id4": false,
+ },
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`given element A and group of elements B and given both are selected when user shift-clicks on B, on pointer up only element A should be selected > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 110,
+ "y": 110,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 100,
+ "x": 220,
+ "y": 220,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ "index": "a2",
+ },
+ "inserted": {
+ "groupIds": [],
+ "index": "a0",
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ "index": "a3",
+ },
+ "inserted": {
+ "groupIds": [],
+ "index": "a2",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ "selectedGroupIds": {
+ "id0": true,
+ "id1": true,
+ "id2": true,
+ "id4": false,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id2": true,
+ },
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`given element A and group of elements B and given both are selected when user shift-clicks on B, on pointer up only element A should be selected > [end of test] number of elements 1`] = `0`;
+
+exports[`given element A and group of elements B and given both are selected when user shift-clicks on B, on pointer up only element A should be selected > [end of test] number of renders 1`] = `16`;
+
+exports[`regression tests > Cmd/Ctrl-click exclusively select element under pointer > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": "id10",
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": false,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id7": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > Cmd/Ctrl-click exclusively select element under pointer > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": "id4",
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id7": true,
+ },
+ },
+ "inserted": {
+ "editingGroupId": "id4",
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id7" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 60,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id7": true,
+ },
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id7": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id10": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ "id10",
+ ],
+ },
+ "inserted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ "id10",
+ ],
+ },
+ "inserted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ },
+ "id7" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id10",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": "id4",
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id1": true,
+ "id7": true,
+ },
+ "selectedGroupIds": {
+ "id10": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": "id10",
+ "selectedElementIds": {
+ "id7": true,
+ },
+ },
+ "inserted": {
+ "editingGroupId": "id4",
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > Cmd/Ctrl-click exclusively select element under pointer > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > Cmd/Ctrl-click exclusively select element under pointer > [end of test] number of renders 1`] = `26`;
+
+exports[`regression tests > Drags selected element when hitting only bounding box and keeps element selected > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > Drags selected element when hitting only bounding box and keeps element selected > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "x": 25,
+ "y": 25,
+ },
+ "inserted": {
+ "x": 0,
+ "y": 0,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > Drags selected element when hitting only bounding box and keeps element selected > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > Drags selected element when hitting only bounding box and keeps element selected > [end of test] number of renders 1`] = `10`;
+
+exports[`regression tests > adjusts z order when grouping > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id2": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {
+ "id5": true,
+ },
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > adjusts z order when grouping > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 50,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id5": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id5",
+ ],
+ "index": "a2",
+ },
+ "inserted": {
+ "groupIds": [],
+ "index": "a0",
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id5",
+ ],
+ "index": "a3",
+ },
+ "inserted": {
+ "groupIds": [],
+ "index": "a2",
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > adjusts z order when grouping > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > adjusts z order when grouping > [end of test] number of renders 1`] = `15`;
+
+exports[`regression tests > alt-drag duplicates an element > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > alt-drag duplicates an element > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "index": "a1",
+ "x": 20,
+ "y": 20,
+ },
+ "inserted": {
+ "index": "a0",
+ "x": 10,
+ "y": 10,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > alt-drag duplicates an element > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > alt-drag duplicates an element > [end of test] number of renders 1`] = `8`;
+
+exports[`regression tests > arrow keys > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > arrow keys > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > arrow keys > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > arrow keys > [end of test] number of renders 1`] = `12`;
+
+exports[`regression tests > can drag element that covers another element, while another elem is selected > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id2": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > can drag element that covers another element, while another elem is selected > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 200,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 200,
+ "x": 100,
+ "y": 100,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 200,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 200,
+ "x": 100,
+ "y": 100,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 350,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 350,
+ "x": 300,
+ "y": 300,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id1" => Delta {
+ "deleted": {
+ "x": 300,
+ "y": 300,
+ },
+ "inserted": {
+ "x": 100,
+ "y": 100,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > can drag element that covers another element, while another elem is selected > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > can drag element that covers another element, while another elem is selected > [end of test] number of renders 1`] = `15`;
+
+exports[`regression tests > change the properties of a shape > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "#ffc9c9",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1971c2",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": "elementStroke",
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > change the properties of a shape > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "backgroundColor": "#ffec99",
+ },
+ "inserted": {
+ "backgroundColor": "transparent",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "backgroundColor": "#ffc9c9",
+ },
+ "inserted": {
+ "backgroundColor": "#ffec99",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "strokeColor": "#1971c2",
+ },
+ "inserted": {
+ "strokeColor": "#1e1e1e",
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > change the properties of a shape > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > change the properties of a shape > [end of test] number of renders 1`] = `9`;
+
+exports[`regression tests > click on an element and drag it > [dragged] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > click on an element and drag it > [dragged] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "seed": 1278240551,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 4,
+ "versionNonce": 1116226695,
+ "width": 10,
+ "x": 20,
+ "y": 20,
+}
+`;
+
+exports[`regression tests > click on an element and drag it > [dragged] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [
+ [Function],
+ [Function],
+ ],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "x": 20,
+ "y": 20,
+ },
+ "inserted": {
+ "x": 10,
+ "y": 10,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > click on an element and drag it > [dragged] number of elements 1`] = `1`;
+
+exports[`regression tests > click on an element and drag it > [dragged] number of renders 1`] = `8`;
+
+exports[`regression tests > click on an element and drag it > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > click on an element and drag it > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "x": 20,
+ "y": 20,
+ },
+ "inserted": {
+ "x": 10,
+ "y": 10,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "x": 20,
+ "y": 20,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > click on an element and drag it > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > click on an element and drag it > [end of test] number of renders 1`] = `10`;
+
+exports[`regression tests > click to select a shape > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id1": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > click to select a shape > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > click to select a shape > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > click to select a shape > [end of test] number of renders 1`] = `10`;
+
+exports[`regression tests > click-drag to select a group > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id2": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > click-drag to select a group > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 50,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > click-drag to select a group > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > click-drag to select a group > [end of test] number of renders 1`] = `14`;
+
+exports[`regression tests > deleting last but one element in editing group should unselect the group > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {
+ "id4": false,
+ },
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > deleting last but one element in editing group should unselect the group > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 50,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": "id4",
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id4": false,
+ },
+ },
+ "inserted": {
+ "editingGroupId": "id4",
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {
+ "id0" => Delta {
+ "deleted": {
+ "isDeleted": true,
+ },
+ "inserted": {
+ "isDeleted": false,
+ },
+ },
+ },
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id4": false,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id4": false,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > deleting last but one element in editing group should unselect the group > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > deleting last but one element in editing group should unselect the group > [end of test] number of renders 1`] = `17`;
+
+exports[`regression tests > deselects group of selected elements on pointer down when pointer doesn't hit any element > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "down",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "id": "id3",
+ "index": null,
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "seed": 1505387817,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "selection",
+ "updated": 1,
+ "version": 1,
+ "versionNonce": 0,
+ "width": 0,
+ "x": 500,
+ "y": 500,
+ },
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > deselects group of selected elements on pointer down when pointer doesn't hit any element > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 10,
+ "x": 110,
+ "y": 110,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > deselects group of selected elements on pointer down when pointer doesn't hit any element > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > deselects group of selected elements on pointer down when pointer doesn't hit any element > [end of test] number of renders 1`] = `11`;
+
+exports[`regression tests > deselects group of selected elements on pointer up when pointer hits common bounding box without hitting any element > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > deselects group of selected elements on pointer up when pointer hits common bounding box without hitting any element > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 10,
+ "x": 110,
+ "y": 110,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > deselects group of selected elements on pointer up when pointer hits common bounding box without hitting any element > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > deselects group of selected elements on pointer up when pointer hits common bounding box without hitting any element > [end of test] number of renders 1`] = `11`;
+
+exports[`regression tests > deselects selected element on pointer down when pointer doesn't hit any element > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "down",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "id": "id1",
+ "index": null,
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "seed": 1150084233,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "selection",
+ "updated": 1,
+ "version": 1,
+ "versionNonce": 0,
+ "width": 0,
+ "x": 110,
+ "y": 110,
+ },
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > deselects selected element on pointer down when pointer doesn't hit any element > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > deselects selected element on pointer down when pointer doesn't hit any element > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > deselects selected element on pointer down when pointer doesn't hit any element > [end of test] number of renders 1`] = `7`;
+
+exports[`regression tests > deselects selected element, on pointer up, when click hits element bounding box but doesn't hit the element > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > deselects selected element, on pointer up, when click hits element bounding box but doesn't hit the element > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > deselects selected element, on pointer up, when click hits element bounding box but doesn't hit the element > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > deselects selected element, on pointer up, when click hits element bounding box but doesn't hit the element > [end of test] number of renders 1`] = `7`;
+
+exports[`regression tests > double click to edit a group > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": "id3",
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id2": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > double click to edit a group > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 50,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id3",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id3",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id3",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": "id3",
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > double click to edit a group > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > double click to edit a group > [end of test] number of renders 1`] = `15`;
+
+exports[`regression tests > drags selected elements from point inside common bounding box that doesn't hit any element and keeps elements selected after dragging > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > drags selected elements from point inside common bounding box that doesn't hit any element and keeps elements selected after dragging > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 10,
+ "x": 110,
+ "y": 110,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "x": 25,
+ "y": 25,
+ },
+ "inserted": {
+ "x": 0,
+ "y": 0,
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "x": 135,
+ "y": 135,
+ },
+ "inserted": {
+ "x": 110,
+ "y": 110,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > drags selected elements from point inside common bounding box that doesn't hit any element and keeps elements selected after dragging > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > drags selected elements from point inside common bounding box that doesn't hit any element and keeps elements selected after dragging > [end of test] number of renders 1`] = `12`;
+
+exports[`regression tests > draw every type of shape > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "freedraw",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > draw every type of shape > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": 10,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "diamond",
+ "width": 20,
+ "x": 40,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 20,
+ "x": 70,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id3": true,
+ },
+ "selectedLinearElementId": "id3",
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id3" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a3",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 50,
+ "x": 130,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id4": true,
+ },
+ "selectedLinearElementId": "id4",
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id3": true,
+ },
+ "selectedLinearElementId": "id3",
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id4" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "endArrowhead": null,
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a4",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "line",
+ "width": 50,
+ "x": 220,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id5": true,
+ },
+ "selectedLinearElementId": null,
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id4": true,
+ },
+ "selectedLinearElementId": "id4",
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id5" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a5",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 50,
+ 10,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 50,
+ "x": 310,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id5" => Delta {
+ "deleted": {
+ "height": 20,
+ "lastCommittedPoint": [
+ 80,
+ 20,
+ ],
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ [
+ 80,
+ 20,
+ ],
+ ],
+ "width": 80,
+ },
+ "inserted": {
+ "height": 10,
+ "lastCommittedPoint": [
+ 50,
+ 10,
+ ],
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ ],
+ "width": 50,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedLinearElementId": "id5",
+ },
+ "inserted": {
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id6": true,
+ },
+ "selectedLinearElementId": null,
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id5": true,
+ },
+ "selectedLinearElementId": "id5",
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id6" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "endArrowhead": null,
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a6",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 50,
+ 10,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "line",
+ "width": 50,
+ "x": 430,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id6" => Delta {
+ "deleted": {
+ "height": 20,
+ "lastCommittedPoint": [
+ 80,
+ 20,
+ ],
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ [
+ 80,
+ 20,
+ ],
+ ],
+ "width": 80,
+ },
+ "inserted": {
+ "height": 10,
+ "lastCommittedPoint": [
+ 50,
+ 10,
+ ],
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ ],
+ "width": 50,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedLinearElementId": "id6",
+ },
+ "inserted": {
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id6": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedLinearElementId": null,
+ },
+ "inserted": {
+ "selectedLinearElementId": "id6",
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id7" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a7",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 50,
+ 10,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ [
+ 50,
+ 10,
+ ],
+ ],
+ "pressures": [
+ 0,
+ 0,
+ 0,
+ ],
+ "roughness": 1,
+ "roundness": null,
+ "simulatePressure": false,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "freedraw",
+ "width": 50,
+ "x": 550,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > draw every type of shape > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > draw every type of shape > [end of test] number of renders 1`] = `33`;
+
+exports[`regression tests > given a group of selected elements with an element that is not selected inside the group common bounding box when element that is not selected is clicked should switch selection to not selected element on pointer up > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id2": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > given a group of selected elements with an element that is not selected inside the group common bounding box when element that is not selected is clicked should switch selection to not selected element on pointer up > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 100,
+ "x": 110,
+ "y": 110,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "diamond",
+ "width": 100,
+ "x": 310,
+ "y": 310,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id2": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > given a group of selected elements with an element that is not selected inside the group common bounding box when element that is not selected is clicked should switch selection to not selected element on pointer up > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > given a group of selected elements with an element that is not selected inside the group common bounding box when element that is not selected is clicked should switch selection to not selected element on pointer up > [end of test] number of renders 1`] = `14`;
+
+exports[`regression tests > given a selected element A and a not selected element B with higher z-index than A and given B partially overlaps A when there's a shift-click on the overlapped section B is added to the selection > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "#ffc9c9",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": "elementBackground",
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > given a selected element A and a not selected element B with higher z-index than A and given B partially overlaps A when there's a shift-click on the overlapped section B is added to the selection > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "#ffc9c9",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 1000,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 1000,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "#ffc9c9",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 1000,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 1000,
+ "x": 500,
+ "y": 500,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > given a selected element A and a not selected element B with higher z-index than A and given B partially overlaps A when there's a shift-click on the overlapped section B is added to the selection > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > given a selected element A and a not selected element B with higher z-index than A and given B partially overlaps A when there's a shift-click on the overlapped section B is added to the selection > [end of test] number of renders 1`] = `12`;
+
+exports[`regression tests > given selected element A with lower z-index than unselected element B and given B is partially over A when clicking intersection between A and B B should be selected on pointer up > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > given selected element A with lower z-index than unselected element B and given B is partially over A when clicking intersection between A and B B should be selected on pointer up > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "red",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 1000,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 1000,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "red",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 500,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 500,
+ "x": 500,
+ "y": 500,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > given selected element A with lower z-index than unselected element B and given B is partially over A when clicking intersection between A and B B should be selected on pointer up > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > given selected element A with lower z-index than unselected element B and given B is partially over A when clicking intersection between A and B B should be selected on pointer up > [end of test] number of renders 1`] = `7`;
+
+exports[`regression tests > given selected element A with lower z-index than unselected element B and given B is partially over A when dragging on intersection between A and B A should be dragged and keep being selected > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > given selected element A with lower z-index than unselected element B and given B is partially over A when dragging on intersection between A and B A should be dragged and keep being selected > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "red",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 1000,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 1000,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "red",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 500,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 500,
+ "x": 500,
+ "y": 500,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "x": 100,
+ "y": 100,
+ },
+ "inserted": {
+ "x": 0,
+ "y": 0,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > given selected element A with lower z-index than unselected element B and given B is partially over A when dragging on intersection between A and B A should be dragged and keep being selected > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > given selected element A with lower z-index than unselected element B and given B is partially over A when dragging on intersection between A and B A should be dragged and keep being selected > [end of test] number of renders 1`] = `8`;
+
+exports[`regression tests > key 2 selects rectangle tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key 2 selects rectangle tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key 2 selects rectangle tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key 2 selects rectangle tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key 3 selects diamond tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key 3 selects diamond tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "diamond",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key 3 selects diamond tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key 3 selects diamond tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key 4 selects ellipse tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key 4 selects ellipse tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key 4 selects ellipse tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key 4 selects ellipse tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key 5 selects arrow tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": LinearElementEditor {
+ "elbowed": false,
+ "elementId": "id0",
+ "endBindingElement": "keep",
+ "hoverPointIndex": -1,
+ "isDragging": false,
+ "lastUncommittedPoint": null,
+ "pointerDownState": {
+ "lastClickedIsEndPoint": false,
+ "lastClickedPoint": -1,
+ "origin": null,
+ "prevSelectedPointsIndices": null,
+ "segmentMidpoint": {
+ "added": false,
+ "index": null,
+ "value": null,
+ },
+ },
+ "pointerOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "segmentMidPointHoveredCoords": null,
+ "selectedPointsIndices": null,
+ "startBindingElement": "keep",
+ },
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key 5 selects arrow tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedLinearElementId": "id0",
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key 5 selects arrow tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key 5 selects arrow tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key 6 selects line tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": LinearElementEditor {
+ "elbowed": false,
+ "elementId": "id0",
+ "endBindingElement": "keep",
+ "hoverPointIndex": -1,
+ "isDragging": false,
+ "lastUncommittedPoint": null,
+ "pointerDownState": {
+ "lastClickedIsEndPoint": false,
+ "lastClickedPoint": -1,
+ "origin": null,
+ "prevSelectedPointsIndices": null,
+ "segmentMidpoint": {
+ "added": false,
+ "index": null,
+ "value": null,
+ },
+ },
+ "pointerOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "segmentMidPointHoveredCoords": null,
+ "selectedPointsIndices": null,
+ "startBindingElement": "keep",
+ },
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key 6 selects line tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedLinearElementId": "id0",
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "endArrowhead": null,
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "line",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key 6 selects line tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key 6 selects line tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key 7 selects freedraw tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "freedraw",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key 7 selects freedraw tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 10,
+ 10,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ ],
+ "pressures": [
+ 0,
+ 0,
+ 0,
+ ],
+ "roughness": 1,
+ "roundness": null,
+ "simulatePressure": false,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "freedraw",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key 7 selects freedraw tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key 7 selects freedraw tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key a selects arrow tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": LinearElementEditor {
+ "elbowed": false,
+ "elementId": "id0",
+ "endBindingElement": "keep",
+ "hoverPointIndex": -1,
+ "isDragging": false,
+ "lastUncommittedPoint": null,
+ "pointerDownState": {
+ "lastClickedIsEndPoint": false,
+ "lastClickedPoint": -1,
+ "origin": null,
+ "prevSelectedPointsIndices": null,
+ "segmentMidpoint": {
+ "added": false,
+ "index": null,
+ "value": null,
+ },
+ },
+ "pointerOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "segmentMidPointHoveredCoords": null,
+ "selectedPointsIndices": null,
+ "startBindingElement": "keep",
+ },
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key a selects arrow tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedLinearElementId": "id0",
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key a selects arrow tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key a selects arrow tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key d selects diamond tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key d selects diamond tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "diamond",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key d selects diamond tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key d selects diamond tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key l selects line tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": LinearElementEditor {
+ "elbowed": false,
+ "elementId": "id0",
+ "endBindingElement": "keep",
+ "hoverPointIndex": -1,
+ "isDragging": false,
+ "lastUncommittedPoint": null,
+ "pointerDownState": {
+ "lastClickedIsEndPoint": false,
+ "lastClickedPoint": -1,
+ "origin": null,
+ "prevSelectedPointsIndices": null,
+ "segmentMidpoint": {
+ "added": false,
+ "index": null,
+ "value": null,
+ },
+ },
+ "pointerOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "segmentMidPointHoveredCoords": null,
+ "selectedPointsIndices": null,
+ "startBindingElement": "keep",
+ },
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key l selects line tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedLinearElementId": "id0",
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedLinearElementId": null,
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "endArrowhead": null,
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": null,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "line",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key l selects line tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key l selects line tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key o selects ellipse tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key o selects ellipse tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key o selects ellipse tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key o selects ellipse tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key p selects freedraw tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "freedraw",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key p selects freedraw tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 10,
+ 10,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ [
+ 10,
+ 10,
+ ],
+ ],
+ "pressures": [
+ 0,
+ 0,
+ 0,
+ ],
+ "roughness": 1,
+ "roundness": null,
+ "simulatePressure": false,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "freedraw",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key p selects freedraw tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key p selects freedraw tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > key r selects rectangle tool > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > key r selects rectangle tool > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > key r selects rectangle tool > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > key r selects rectangle tool > [end of test] number of renders 1`] = `6`;
+
+exports[`regression tests > make a group and duplicate it > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id1": true,
+ "id2": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ "id2": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > make a group and duplicate it > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 50,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id6" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "id7",
+ ],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id8" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "id7",
+ ],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ "id9" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [
+ "id7",
+ ],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 50,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "index": "a3",
+ "x": 20,
+ "y": 20,
+ },
+ "inserted": {
+ "index": "a0",
+ "x": 10,
+ "y": 10,
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "index": "a4",
+ "x": 40,
+ "y": 20,
+ },
+ "inserted": {
+ "index": "a1",
+ "x": 30,
+ "y": 10,
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "index": "a5",
+ "x": 60,
+ "y": 20,
+ },
+ "inserted": {
+ "index": "a2",
+ "x": 50,
+ "y": 10,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > make a group and duplicate it > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > make a group and duplicate it > [end of test] number of renders 1`] = `17`;
+
+exports[`regression tests > noop interaction after undo shouldn't create history entry > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > noop interaction after undo shouldn't create history entry > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > noop interaction after undo shouldn't create history entry > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > noop interaction after undo shouldn't create history entry > [end of test] number of renders 1`] = `14`;
+
+exports[`regression tests > pinch-to-zoom works > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "down",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "touch",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": "-6.25000",
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": true,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > pinch-to-zoom works > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [],
+}
+`;
+
+exports[`regression tests > pinch-to-zoom works > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > pinch-to-zoom works > [end of test] number of renders 1`] = `7`;
+
+exports[`regression tests > shift click on selected element should deselect it on pointer up > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > shift click on selected element should deselect it on pointer up > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > shift click on selected element should deselect it on pointer up > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > shift click on selected element should deselect it on pointer up > [end of test] number of renders 1`] = `7`;
+
+exports[`regression tests > shift-click to multiselect, then drag > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > shift-click to multiselect, then drag > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "x": 20,
+ "y": 20,
+ },
+ "inserted": {
+ "x": 10,
+ "y": 10,
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "x": 40,
+ "y": 20,
+ },
+ "inserted": {
+ "x": 30,
+ "y": 10,
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > shift-click to multiselect, then drag > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > shift-click to multiselect, then drag > [end of test] number of renders 1`] = `13`;
+
+exports[`regression tests > should group elements and ungroup them > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id1": true,
+ "id2": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ "id2": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > should group elements and ungroup them > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 30,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 50,
+ "y": 10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [],
+ },
+ "inserted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [],
+ },
+ "inserted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "groupIds": [],
+ },
+ "inserted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > should group elements and ungroup them > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > should group elements and ungroup them > [end of test] number of renders 1`] = `18`;
+
+exports[`regression tests > single-clicking on a subgroup of a selected group should not alter selection > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ "id1": true,
+ "id5": true,
+ "id6": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ "id5": true,
+ "id6": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {
+ "id10": true,
+ },
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > single-clicking on a subgroup of a selected group should not alter selection > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 50,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id5": true,
+ },
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id5" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 10,
+ "y": 50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id6": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id5": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id6" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a3",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 50,
+ "y": 50,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id5": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id6": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id6": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id9": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id5" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id9",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id6" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id9",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id4": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id10": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {
+ "id4": true,
+ "id9": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ "id10",
+ ],
+ },
+ "inserted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id4",
+ "id10",
+ ],
+ },
+ "inserted": {
+ "groupIds": [
+ "id4",
+ ],
+ },
+ },
+ "id5" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id9",
+ "id10",
+ ],
+ },
+ "inserted": {
+ "groupIds": [
+ "id9",
+ ],
+ },
+ },
+ "id6" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id9",
+ "id10",
+ ],
+ },
+ "inserted": {
+ "groupIds": [
+ "id9",
+ ],
+ },
+ },
+ },
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > single-clicking on a subgroup of a selected group should not alter selection > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > single-clicking on a subgroup of a selected group should not alter selection > [end of test] number of renders 1`] = `25`;
+
+exports[`regression tests > spacebar + drag scrolls the canvas > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 60,
+ "scrollY": 60,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > spacebar + drag scrolls the canvas > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [],
+}
+`;
+
+exports[`regression tests > spacebar + drag scrolls the canvas > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > spacebar + drag scrolls the canvas > [end of test] number of renders 1`] = `5`;
+
+exports[`regression tests > supports nested groups > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": "id3",
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id0": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > supports nested groups > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 50,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 50,
+ "x": 100,
+ "y": 100,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 50,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 50,
+ "x": 200,
+ "y": 200,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id3",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id1" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id3",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id3",
+ ],
+ },
+ "inserted": {
+ "groupIds": [],
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": "id3",
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id0": true,
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedGroupIds": {
+ "id5": true,
+ },
+ },
+ "inserted": {
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id0" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id5",
+ "id3",
+ ],
+ "index": "a2",
+ },
+ "inserted": {
+ "groupIds": [
+ "id3",
+ ],
+ "index": "a0",
+ },
+ },
+ "id2" => Delta {
+ "deleted": {
+ "groupIds": [
+ "id5",
+ "id3",
+ ],
+ "index": "a3",
+ },
+ "inserted": {
+ "groupIds": [
+ "id3",
+ ],
+ "index": "a2",
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ },
+ "inserted": {
+ "editingGroupId": "id3",
+ "selectedElementIds": {},
+ "selectedGroupIds": {
+ "id5": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": "id3",
+ "selectedElementIds": {},
+ "selectedGroupIds": {
+ "id5": true,
+ },
+ },
+ "inserted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": "id5",
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "editingGroupId": "id3",
+ "selectedElementIds": {
+ "id2": true,
+ },
+ "selectedGroupIds": {
+ "id5": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id1": true,
+ "id2": true,
+ },
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ },
+ "inserted": {
+ "editingGroupId": "id5",
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "editingGroupId": "id3",
+ "selectedElementIds": {},
+ "selectedGroupIds": {},
+ },
+ "inserted": {
+ "editingGroupId": null,
+ "selectedElementIds": {
+ "id0": true,
+ "id2": true,
+ },
+ "selectedGroupIds": {
+ "id3": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > supports nested groups > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > supports nested groups > [end of test] number of renders 1`] = `23`;
+
+exports[`regression tests > switches from group of selected elements to another element on pointer down > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "down",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id1": true,
+ "id2": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "id": "id4",
+ "index": null,
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "seed": 1723083209,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "selection",
+ "updated": 1,
+ "version": 1,
+ "versionNonce": 0,
+ "width": 0,
+ "x": 0,
+ "y": 0,
+ },
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > switches from group of selected elements to another element on pointer down > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 100,
+ "x": 110,
+ "y": 110,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id2" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a2",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "diamond",
+ "width": 100,
+ "x": 310,
+ "y": 310,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > switches from group of selected elements to another element on pointer down > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > switches from group of selected elements to another element on pointer down > [end of test] number of renders 1`] = `14`;
+
+exports[`regression tests > switches selected element on pointer down > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "down",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {
+ "id1": true,
+ },
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 0,
+ "id": "id2",
+ "index": null,
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "seed": 1604849351,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "selection",
+ "updated": 1,
+ "version": 1,
+ "versionNonce": 0,
+ "width": 0,
+ "x": 0,
+ "y": 0,
+ },
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > switches selected element on pointer down > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 10,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "ellipse",
+ "width": 10,
+ "x": 20,
+ "y": 20,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > switches selected element on pointer down > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > switches selected element on pointer down > [end of test] number of renders 1`] = `10`;
+
+exports[`regression tests > two-finger scroll works > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "down",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "touch",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 20,
+ "scrollY": "-18.53553",
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": true,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > two-finger scroll works > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [],
+}
+`;
+
+exports[`regression tests > two-finger scroll works > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > two-finger scroll works > [end of test] number of renders 1`] = `8`;
+
+exports[`regression tests > undo/redo drawing an element > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > undo/redo drawing an element > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedLinearElementId": null,
+ },
+ "inserted": {
+ "selectedLinearElementId": "id2",
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {},
+ "inserted": {},
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {},
+ "updated": Map {
+ "id2" => Delta {
+ "deleted": {
+ "height": 10,
+ "lastCommittedPoint": [
+ 60,
+ 10,
+ ],
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 60,
+ 10,
+ ],
+ ],
+ "width": 60,
+ },
+ "inserted": {
+ "height": 20,
+ "lastCommittedPoint": [
+ 100,
+ 20,
+ ],
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 60,
+ 10,
+ ],
+ [
+ 100,
+ 20,
+ ],
+ ],
+ "width": 100,
+ },
+ },
+ },
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id2": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {
+ "id2" => Delta {
+ "deleted": {
+ "isDeleted": true,
+ },
+ "inserted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "elbowed": false,
+ "endArrowhead": "arrow",
+ "endBinding": null,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a2",
+ "isDeleted": false,
+ "lastCommittedPoint": [
+ 60,
+ 10,
+ ],
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "points": [
+ [
+ 0,
+ 0,
+ ],
+ [
+ 60,
+ 10,
+ ],
+ ],
+ "roughness": 1,
+ "roundness": {
+ "type": 2,
+ },
+ "startArrowhead": null,
+ "startBinding": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "arrow",
+ "width": 60,
+ "x": 130,
+ "y": 10,
+ },
+ },
+ },
+ "removed": Map {},
+ "updated": Map {},
+ },
+ },
+ ],
+ "undoStack": [
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id0" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 20,
+ "x": 10,
+ "y": -10,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ HistoryEntry {
+ "appStateChange": AppStateChange {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id1": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ },
+ },
+ "elementsChange": ElementsChange {
+ "added": Map {},
+ "removed": Map {
+ "id1" => Delta {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 20,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": {
+ "type": 3,
+ },
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "width": 30,
+ "x": 40,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ },
+ },
+ },
+ "updated": Map {},
+ },
+ },
+ ],
+}
+`;
+
+exports[`regression tests > undo/redo drawing an element > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > undo/redo drawing an element > [end of test] number of renders 1`] = `20`;
+
+exports[`regression tests > updates fontSize & fontFamily appState > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "text",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 8,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > updates fontSize & fontFamily appState > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [],
+}
+`;
+
+exports[`regression tests > updates fontSize & fontFamily appState > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > updates fontSize & fontFamily appState > [end of test] number of renders 1`] = `5`;
+
+exports[`regression tests > zoom hotkeys > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeTool": {
+ "customType": null,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "round",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 768,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "multiElement": null,
+ "name": "Untitled-201933152653",
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "scrolledOutside": false,
+ "searchMatches": [],
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectedLinearElement": null,
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 1024,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`regression tests > zoom hotkeys > [end of test] history 1`] = `
+History {
+ "onHistoryChangedEmitter": Emitter {
+ "subscribers": [],
+ },
+ "redoStack": [],
+ "undoStack": [],
+}
+`;
+
+exports[`regression tests > zoom hotkeys > [end of test] number of elements 1`] = `0`;
+
+exports[`regression tests > zoom hotkeys > [end of test] number of renders 1`] = `6`;