You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18990 lines
466 KiB
Plaintext
18990 lines
466 KiB
Plaintext
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and the arrow got bound to a different element in the meantime > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {
|
|
"id163": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {
|
|
"id163": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and the arrow got bound to a different element in the meantime > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id161",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 18,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and the arrow got bound to a different element in the meantime > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id162",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 19,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and the arrow got bound to a different element in the meantime > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id166",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": "99.19726",
|
|
"id": "id163",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
"98.40368",
|
|
"99.19726",
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 54,
|
|
"width": "98.40368",
|
|
"x": 1,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and the arrow got bound to a different element in the meantime > [end of test] element 3 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id163",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 50,
|
|
"id": "id166",
|
|
"index": "a3",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 6,
|
|
"width": 50,
|
|
"x": 100,
|
|
"y": 100,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and the arrow got bound to a different element in the meantime > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id163" => Delta {
|
|
"deleted": {
|
|
"endBinding": {
|
|
"elementId": "id162",
|
|
"focus": "0.00990",
|
|
"gap": 1,
|
|
},
|
|
"height": "0.98000",
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
98,
|
|
"-0.98000",
|
|
],
|
|
],
|
|
"startBinding": {
|
|
"elementId": "id161",
|
|
"focus": "0.02970",
|
|
"gap": 1,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"endBinding": {
|
|
"elementId": "id162",
|
|
"focus": "-0.02000",
|
|
"gap": 1,
|
|
},
|
|
"height": "0.00025",
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
98,
|
|
"0.00025",
|
|
],
|
|
],
|
|
"startBinding": {
|
|
"elementId": "id161",
|
|
"focus": "0.02000",
|
|
"gap": 1,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id161" => Delta {
|
|
"deleted": {
|
|
"boundElements": [],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id163",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
},
|
|
"id162" => Delta {
|
|
"deleted": {
|
|
"boundElements": [],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id163",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
},
|
|
"id163" => Delta {
|
|
"deleted": {
|
|
"endBinding": {
|
|
"elementId": "id166",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"height": "99.19726",
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
"98.40368",
|
|
"99.19726",
|
|
],
|
|
],
|
|
"startBinding": null,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"endBinding": {
|
|
"elementId": "id162",
|
|
"focus": "0.00990",
|
|
"gap": 1,
|
|
},
|
|
"height": "0.98024",
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
98,
|
|
"-0.98024",
|
|
],
|
|
],
|
|
"startBinding": {
|
|
"elementId": "id161",
|
|
"focus": "0.02970",
|
|
"gap": 1,
|
|
},
|
|
"y": "0.99037",
|
|
},
|
|
},
|
|
"id166" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id163",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id161" => 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": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id162" => 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": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id163": true,
|
|
},
|
|
"selectedLinearElementId": "id163",
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id163" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": null,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
100,
|
|
0,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and the arrow got bound to a different element in the meantime > [end of test] number of elements 1`] = `4`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and the arrow got bound to a different element in the meantime > [end of test] number of renders 1`] = `22`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and there are no conflicting updates in the meantime > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {
|
|
"id158": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {
|
|
"id158": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and there are no conflicting updates in the meantime > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id156",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 9,
|
|
"width": 100,
|
|
"x": 150,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and there are no conflicting updates in the meantime > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id157",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 9,
|
|
"width": 100,
|
|
"x": 150,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and there are no conflicting updates in the meantime > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": null,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"id": "id158",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
100,
|
|
0,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 34,
|
|
"width": 0,
|
|
"x": 251,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and there are no conflicting updates in the meantime > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id158" => Delta {
|
|
"deleted": {
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
],
|
|
},
|
|
"inserted": {
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
100,
|
|
0,
|
|
],
|
|
],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id156" => Delta {
|
|
"deleted": {
|
|
"boundElements": [],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id158",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
},
|
|
"id157" => Delta {
|
|
"deleted": {
|
|
"boundElements": [],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id158",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
},
|
|
"id158" => Delta {
|
|
"deleted": {
|
|
"endBinding": null,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
100,
|
|
0,
|
|
],
|
|
],
|
|
"startBinding": null,
|
|
},
|
|
"inserted": {
|
|
"endBinding": {
|
|
"elementId": "id157",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
],
|
|
"startBinding": {
|
|
"elementId": "id156",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id156" => 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": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id157" => 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": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id158": true,
|
|
},
|
|
"selectedLinearElementId": "id158",
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id158" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": null,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
100,
|
|
0,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and there are no conflicting updates in the meantime > [end of test] number of elements 1`] = `3`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and there are no conflicting updates in the meantime > [end of test] number of renders 1`] = `24`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added arrow when it's bindable elements are added through the history > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added arrow when it's bindable elements are added through the history > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": null,
|
|
"endBinding": {
|
|
"elementId": "id168",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": "0.03596",
|
|
"id": "id169",
|
|
"index": "Zz",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
98,
|
|
"-0.03596",
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id167",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 15,
|
|
"width": 98,
|
|
"x": 1,
|
|
"y": "0.05467",
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added arrow when it's bindable elements are added through the history > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id169",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id167",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added arrow when it's bindable elements are added through the history > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id169",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id168",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added arrow when it's bindable elements are added through the history > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id167" => 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": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id168" => 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": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {
|
|
"id169" => Delta {
|
|
"deleted": {
|
|
"endBinding": {
|
|
"elementId": "id168",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"startBinding": {
|
|
"elementId": "id167",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"endBinding": null,
|
|
"startBinding": null,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added arrow when it's bindable elements are added through the history > [end of test] number of elements 1`] = `3`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added arrow when it's bindable elements are added through the history > [end of test] number of renders 1`] = `9`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added bindable elements when it's arrow is added through the history > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added bindable elements when it's arrow is added through the history > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": null,
|
|
"endBinding": {
|
|
"elementId": "id171",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": "0.03596",
|
|
"id": "id172",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
98,
|
|
"-0.03596",
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id170",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 15,
|
|
"width": 98,
|
|
"x": 1,
|
|
"y": "0.05467",
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added bindable elements when it's arrow is added through the history > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id172",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id170",
|
|
"index": "a0V",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 12,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added bindable elements when it's arrow is added through the history > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id172",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id171",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 11,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added bindable elements when it's arrow is added through the history > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id172" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": null,
|
|
"endBinding": {
|
|
"elementId": "id171",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": "2.61991",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
98,
|
|
"-2.61991",
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id170",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"width": 98,
|
|
"x": 1,
|
|
"y": "3.98333",
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {
|
|
"id170" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id172",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
"id171" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id172",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added bindable elements when it's arrow is added through the history > [end of test] number of elements 1`] = `3`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added bindable elements when it's arrow is added through the history > [end of test] number of renders 1`] = `11`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should unbind remotely deleted bindable elements from arrow when the arrow is added through the history > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should unbind remotely deleted bindable elements from arrow when the arrow is added through the history > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id173",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should unbind remotely deleted bindable elements from arrow when the arrow is added through the history > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id174",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should unbind remotely deleted bindable elements from arrow when the arrow is added through the history > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id173" => 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": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id174" => 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": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should unbind remotely deleted bindable elements from arrow when the arrow is added through the history > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should unbind remotely deleted bindable elements from arrow when the arrow is added through the history > [end of test] number of renders 1`] = `4`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should update bound element points when rectangle was remotely moved and arrow is added back through the history > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {
|
|
"id177": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should update bound element points when rectangle was remotely moved and arrow is added back through the history > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id177",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id175",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should update bound element points when rectangle was remotely moved and arrow is added back through the history > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id177",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id176",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 8,
|
|
"width": 100,
|
|
"x": 500,
|
|
"y": -500,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should update bound element points when rectangle was remotely moved and arrow is added back through the history > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id176",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": "373.79942",
|
|
"id": "id177",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
498,
|
|
"-373.79942",
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id175",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 12,
|
|
"width": 498,
|
|
"x": 1,
|
|
"y": "-37.91991",
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should update bound element points when rectangle was remotely moved and arrow is added back through the history > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id175" => 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": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id176" => 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": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id177": true,
|
|
},
|
|
"selectedLinearElementId": "id177",
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id177" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id176",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
100,
|
|
0,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id175",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {
|
|
"id175" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id177",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
"id176" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id177",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should update bound element points when rectangle was remotely moved and arrow is added back through the history > [end of test] number of elements 1`] = `3`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should update bound element points when rectangle was remotely moved and arrow is added back through the history > [end of test] number of renders 1`] = `10`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should preserve latest remotely added binding and unbind previous one when the container is added through the history > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should preserve latest remotely added binding and unbind previous one when the container is added through the history > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id144",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id142",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should preserve latest remotely added binding and unbind previous one when the container is added through the history > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id143",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "que pasa",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 6,
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": 15,
|
|
"y": 15,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should preserve latest remotely added binding and unbind previous one when the container is added through the history > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": "id142",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id144",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "ola",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 11,
|
|
"verticalAlign": "top",
|
|
"width": 30,
|
|
"x": 15,
|
|
"y": 15,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should preserve latest remotely added binding and unbind previous one when the container is added through the history > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id142" => Delta {
|
|
"deleted": {
|
|
"isDeleted": false,
|
|
},
|
|
"inserted": {
|
|
"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": 10,
|
|
"y": 10,
|
|
},
|
|
},
|
|
"id143" => Delta {
|
|
"deleted": {
|
|
"containerId": null,
|
|
},
|
|
"inserted": {
|
|
"containerId": null,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
"undoStack": [],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should preserve latest remotely added binding and unbind previous one when the container is added through the history > [end of test] number of elements 1`] = `3`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should preserve latest remotely added binding and unbind previous one when the container is added through the history > [end of test] number of renders 1`] = `11`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should preserve latest remotely added binding and unbind previous one when the text is added through history > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should preserve latest remotely added binding and unbind previous one when the text is added through history > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id147",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id145",
|
|
"index": "Zz",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 11,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should preserve latest remotely added binding and unbind previous one when the text is added through history > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": "id145",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id146",
|
|
"index": "a0",
|
|
"isDeleted": true,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "que pasa",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 9,
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": 15,
|
|
"y": 15,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should preserve latest remotely added binding and unbind previous one when the text is added through history > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": "id145",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id147",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "ola",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 11,
|
|
"verticalAlign": "top",
|
|
"width": 30,
|
|
"x": 15,
|
|
"y": 15,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should preserve latest remotely added binding and unbind previous one when the text is added through history > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {
|
|
"id146" => Delta {
|
|
"deleted": {
|
|
"containerId": "id145",
|
|
"isDeleted": true,
|
|
},
|
|
"inserted": {
|
|
"containerId": null,
|
|
"isDeleted": false,
|
|
},
|
|
},
|
|
},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id145" => Delta {
|
|
"deleted": {
|
|
"boundElements": [],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id146",
|
|
"type": "text",
|
|
},
|
|
],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
"undoStack": [],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should preserve latest remotely added binding and unbind previous one when the text is added through history > [end of test] number of elements 1`] = `3`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should preserve latest remotely added binding and unbind previous one when the text is added through history > [end of test] number of renders 1`] = `11`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and the container got bound to a different text in the meantime > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and the container got bound to a different text in the meantime > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id134",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id132",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 10,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and the container got bound to a different text in the meantime > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": "id132",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id134",
|
|
"index": "a0V",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "ola",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"verticalAlign": "top",
|
|
"width": 30,
|
|
"x": 15,
|
|
"y": 15,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and the container got bound to a different text in the meantime > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id133",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "que pasa",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 9,
|
|
"verticalAlign": "top",
|
|
"width": 80,
|
|
"x": 15,
|
|
"y": 15,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and the container got bound to a different text in the meantime > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id132" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id134",
|
|
"type": "text",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id133",
|
|
"type": "text",
|
|
},
|
|
],
|
|
},
|
|
},
|
|
"id133" => Delta {
|
|
"deleted": {
|
|
"containerId": null,
|
|
},
|
|
"inserted": {
|
|
"containerId": "id132",
|
|
},
|
|
},
|
|
"id134" => Delta {
|
|
"deleted": {
|
|
"containerId": "id132",
|
|
},
|
|
"inserted": {
|
|
"containerId": null,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
"undoStack": [],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and the container got bound to a different text in the meantime > [end of test] number of elements 1`] = `3`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and the container got bound to a different text in the meantime > [end of test] number of renders 1`] = `11`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and the text got bound to a different container in the meantime > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and the text got bound to a different container in the meantime > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id135",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 8,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and the text got bound to a different container in the meantime > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id136",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 60,
|
|
"id": "id137",
|
|
"index": "a0V",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 8,
|
|
"width": 50,
|
|
"x": 100,
|
|
"y": 100,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and the text got bound to a different container in the meantime > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": "id137",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 50,
|
|
"id": "id136",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "que
|
|
pasa",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 13,
|
|
"verticalAlign": "top",
|
|
"width": 40,
|
|
"x": 105,
|
|
"y": 105,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and the text got bound to a different container in the meantime > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id135" => Delta {
|
|
"deleted": {
|
|
"boundElements": [],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id136",
|
|
"type": "text",
|
|
},
|
|
],
|
|
},
|
|
},
|
|
"id136" => Delta {
|
|
"deleted": {
|
|
"containerId": "id137",
|
|
},
|
|
"inserted": {
|
|
"containerId": "id135",
|
|
},
|
|
},
|
|
"id137" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id136",
|
|
"type": "text",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
"undoStack": [],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and the text got bound to a different container in the meantime > [end of test] number of elements 1`] = `3`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and the text got bound to a different container in the meantime > [end of test] number of renders 1`] = `11`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and there no conflicting updates in the meantime > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and there no conflicting updates in the meantime > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id130",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 9,
|
|
"width": 100,
|
|
"x": 35,
|
|
"y": 10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and there no conflicting updates in the meantime > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id131",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "que pasa",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 10,
|
|
"verticalAlign": "top",
|
|
"width": 80,
|
|
"x": 40,
|
|
"y": 15,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and there no conflicting updates in the meantime > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id130" => Delta {
|
|
"deleted": {
|
|
"boundElements": [],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id131",
|
|
"type": "text",
|
|
},
|
|
],
|
|
},
|
|
},
|
|
"id131" => Delta {
|
|
"deleted": {
|
|
"containerId": null,
|
|
},
|
|
"inserted": {
|
|
"containerId": "id130",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
"undoStack": [],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and there no conflicting updates in the meantime > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind bindings when both are updated through the history and there no conflicting updates in the meantime > [end of test] number of renders 1`] = `11`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind remotely added bound text when it's container is added through the history > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind remotely added bound text when it's container is added through the history > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id139",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id138",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind remotely added bound text when it's container is added through the history > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": "id138",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id139",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "que pasa",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 12,
|
|
"verticalAlign": "top",
|
|
"width": 80,
|
|
"x": 15,
|
|
"y": 15,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind remotely added bound text when it's container is added through the history > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id138" => 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": 10,
|
|
"y": 10,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {
|
|
"id139" => Delta {
|
|
"deleted": {
|
|
"containerId": "id138",
|
|
},
|
|
"inserted": {
|
|
"containerId": null,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind remotely added bound text when it's container is added through the history > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind remotely added bound text when it's container is added through the history > [end of test] number of renders 1`] = `9`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind remotely added container when it's bound text is added through the history > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind remotely added container when it's bound text is added through the history > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id141",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id140",
|
|
"index": "Zz",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 11,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind remotely added container when it's bound text is added through the history > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": "id140",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id141",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "que pasa",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 8,
|
|
"verticalAlign": "top",
|
|
"width": 80,
|
|
"x": 15,
|
|
"y": 15,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind remotely added container when it's bound text is added through the history > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id141" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": "id140",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "que pasa",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"verticalAlign": "top",
|
|
"width": 80,
|
|
"x": 15,
|
|
"y": 15,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {
|
|
"id140" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id141",
|
|
"type": "text",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind remotely added container when it's bound text is added through the history > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should rebind remotely added container when it's bound text is added through the history > [end of test] number of renders 1`] = `9`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should redraw bound text to match container dimensions when the bound text is updated through the history > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should redraw bound text to match container dimensions when the bound text is updated through the history > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id155",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id154",
|
|
"index": "Zz",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 3,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should redraw bound text to match container dimensions when the bound text is updated through the history > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": "id154",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id155",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "que pasa",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"verticalAlign": "top",
|
|
"width": 80,
|
|
"x": 15,
|
|
"y": 15,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should redraw bound text to match container dimensions when the bound text is updated through the history > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id155" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"x": 15,
|
|
"y": 15,
|
|
},
|
|
"inserted": {
|
|
"angle": 0,
|
|
"x": 15,
|
|
"y": 15,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
"undoStack": [],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should redraw bound text to match container dimensions when the bound text is updated through the history > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should redraw bound text to match container dimensions when the bound text is updated through the history > [end of test] number of renders 1`] = `9`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should redraw remotely added bound text when it's container is updated through the history > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should redraw remotely added bound text when it's container is updated through the history > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 90,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id153",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id152",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 8,
|
|
"width": 100,
|
|
"x": 200,
|
|
"y": 200,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should redraw remotely added bound text when it's container is updated through the history > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 90,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": "id152",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id153",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "que pasa",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 6,
|
|
"verticalAlign": "top",
|
|
"width": 80,
|
|
"x": 205,
|
|
"y": 205,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should redraw remotely added bound text when it's container is updated through the history > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id152" => Delta {
|
|
"deleted": {
|
|
"angle": 90,
|
|
"x": 200,
|
|
"y": 200,
|
|
},
|
|
"inserted": {
|
|
"angle": 0,
|
|
"x": 10,
|
|
"y": 10,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should redraw remotely added bound text when it's container is updated through the history > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should redraw remotely added bound text when it's container is updated through the history > [end of test] number of renders 1`] = `10`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should unbind remotely deleted bound text from container when the container is added through the history > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should unbind remotely deleted bound text from container when the container is added through the history > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id148",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 8,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should unbind remotely deleted bound text from container when the container is added through the history > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": "id148",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id149",
|
|
"index": "a1",
|
|
"isDeleted": true,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "que pasa",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 3,
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": 15,
|
|
"y": 15,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should unbind remotely deleted bound text from container when the container is added through the history > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id148" => Delta {
|
|
"deleted": {
|
|
"boundElements": [],
|
|
"isDeleted": false,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id149",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should unbind remotely deleted bound text from container when the container is added through the history > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should unbind remotely deleted bound text from container when the container is added through the history > [end of test] number of renders 1`] = `9`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should unbind remotely deleted container from bound text when the text is added through the history > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should unbind remotely deleted container from bound text when the text is added through the history > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id151",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id150",
|
|
"index": "Zz",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 3,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should unbind remotely deleted container from bound text when the text is added through the history > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id151",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "que pasa",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 8,
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": 15,
|
|
"y": 15,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should unbind remotely deleted container from bound text when the text is added through the history > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id151" => Delta {
|
|
"deleted": {
|
|
"containerId": null,
|
|
"isDeleted": false,
|
|
},
|
|
"inserted": {
|
|
"containerId": "id150",
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should unbind remotely deleted container from bound text when the text is added through the history > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should unbind remotely deleted container from bound text when the text is added through the history > [end of test] number of renders 1`] = `9`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in frames and their children > should not rebind frame child with frame when frame was remotely deleted and frame child is added back through the history > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in frames and their children > should not rebind frame child with frame when frame was remotely deleted and frame child is added back through the history > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id179",
|
|
"index": "Zz",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 10,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in frames and their children > should not rebind frame child with frame when frame was remotely deleted and frame child is added back through the history > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 500,
|
|
"id": "id178",
|
|
"index": "a0",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"name": null,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "frame",
|
|
"updated": 1,
|
|
"version": 3,
|
|
"width": 500,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in frames and their children > should not rebind frame child with frame when frame was remotely deleted and frame child is added back through the history > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id179" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"index": "Zz",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id179" => Delta {
|
|
"deleted": {
|
|
"frameId": "id178",
|
|
},
|
|
"inserted": {
|
|
"frameId": null,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in frames and their children > should not rebind frame child with frame when frame was remotely deleted and frame child is added back through the history > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > multiplayer undo/redo > conflicts in frames and their children > should not rebind frame child with frame when frame was remotely deleted and frame child is added back through the history > [end of test] number of renders 1`] = `13`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when editing group contains only remotely deleted elements > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {
|
|
"id107": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when editing group contains only remotely deleted elements > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A",
|
|
],
|
|
"height": 100,
|
|
"id": "id106",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 5,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when editing group contains only remotely deleted elements > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A",
|
|
],
|
|
"height": 100,
|
|
"id": "id107",
|
|
"index": "a1",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 4,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": 100,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when editing group contains only remotely deleted elements > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id106": true,
|
|
"id107": true,
|
|
},
|
|
"selectedGroupIds": {
|
|
"A": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
"selectedGroupIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id106" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A",
|
|
],
|
|
"height": 100,
|
|
"index": "a0",
|
|
"isDeleted": true,
|
|
"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,
|
|
},
|
|
},
|
|
"id107" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A",
|
|
],
|
|
"height": 100,
|
|
"index": "a1",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": 100,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"editingGroupId": "A",
|
|
"selectedElementIds": {},
|
|
"selectedGroupIds": {},
|
|
},
|
|
"inserted": {
|
|
"editingGroupId": null,
|
|
"selectedElementIds": {
|
|
"id106": true,
|
|
},
|
|
"selectedGroupIds": {
|
|
"A": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"editingGroupId": null,
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"editingGroupId": "A",
|
|
"selectedElementIds": {
|
|
"id107": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when editing group contains only remotely deleted elements > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when editing group contains only remotely deleted elements > [end of test] number of renders 1`] = `13`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when element changes relate only to remotely deleted elements > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "#ffc9c9",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {
|
|
"id94": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when element changes relate only to remotely deleted elements > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id92",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 3,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when element changes relate only to remotely deleted elements > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "#ffc9c9",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id93",
|
|
"index": "a1",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"width": 10,
|
|
"x": 20,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when element changes relate only to remotely deleted elements > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "#ffc9c9",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id94",
|
|
"index": "a2",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"width": 10,
|
|
"x": 50,
|
|
"y": 50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when element changes relate only to remotely deleted elements > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id92": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id92" => 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": {
|
|
"id93": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id92": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id93" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "#ffc9c9",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"index": "a1",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"width": 10,
|
|
"x": 20,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id93" => Delta {
|
|
"deleted": {
|
|
"backgroundColor": "#ffc9c9",
|
|
},
|
|
"inserted": {
|
|
"backgroundColor": "transparent",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id94": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id93": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id94" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "#ffc9c9",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"index": "a2",
|
|
"isDeleted": true,
|
|
"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,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id94" => Delta {
|
|
"deleted": {
|
|
"x": 50,
|
|
"y": 50,
|
|
},
|
|
"inserted": {
|
|
"x": 30,
|
|
"y": 30,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when element changes relate only to remotely deleted elements > [end of test] number of elements 1`] = `3`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when element changes relate only to remotely deleted elements > [end of test] number of renders 1`] = `20`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected elements relate only to remotely deleted elements > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {
|
|
"id97": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {
|
|
"id97": true,
|
|
"id98": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected elements relate only to remotely deleted elements > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id96",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected elements relate only to remotely deleted elements > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id97",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 4,
|
|
"width": 100,
|
|
"x": 20,
|
|
"y": 20,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected elements relate only to remotely deleted elements > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id98",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 4,
|
|
"width": 100,
|
|
"x": 30,
|
|
"y": 30,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected elements relate only to remotely deleted elements > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id96": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id96" => 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": 10,
|
|
"y": 10,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id97" => 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": 20,
|
|
"y": 20,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id98" => 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": 30,
|
|
"y": 30,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id97": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id96": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id98": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected elements relate only to remotely deleted elements > [end of test] number of elements 1`] = `3`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected elements relate only to remotely deleted elements > [end of test] number of renders 1`] = `15`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected groups contain only remotely deleted elements > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {
|
|
"id102": true,
|
|
"id103": true,
|
|
"id104": true,
|
|
"id105": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {
|
|
"A": true,
|
|
"B": true,
|
|
},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected groups contain only remotely deleted elements > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A",
|
|
],
|
|
"height": 100,
|
|
"id": "id102",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 4,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected groups contain only remotely deleted elements > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A",
|
|
],
|
|
"height": 100,
|
|
"id": "id103",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 4,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected groups contain only remotely deleted elements > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"B",
|
|
],
|
|
"height": 100,
|
|
"id": "id104",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected groups contain only remotely deleted elements > [end of test] element 3 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"B",
|
|
],
|
|
"height": 100,
|
|
"id": "id105",
|
|
"index": "a3",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected groups contain only remotely deleted elements > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id102": true,
|
|
"id103": true,
|
|
},
|
|
"selectedGroupIds": {
|
|
"A": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
"selectedGroupIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id104": true,
|
|
"id105": true,
|
|
},
|
|
"selectedGroupIds": {
|
|
"B": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
"selectedGroupIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected groups contain only remotely deleted elements > [end of test] number of elements 1`] = `4`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected groups contain only remotely deleted elements > [end of test] number of renders 1`] = `15`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected or editing linear element was remotely deleted > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected or editing linear element was remotely deleted > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": null,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id110",
|
|
"index": "a0",
|
|
"isDeleted": true,
|
|
"lastCommittedPoint": [
|
|
10,
|
|
10,
|
|
],
|
|
"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",
|
|
"updated": 1,
|
|
"version": 8,
|
|
"width": 10,
|
|
"x": -10,
|
|
"y": -10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected or editing linear element was remotely deleted > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id110": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id110" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": null,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"index": "a0",
|
|
"isDeleted": true,
|
|
"lastCommittedPoint": [
|
|
10,
|
|
10,
|
|
],
|
|
"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,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedLinearElementId": "id110",
|
|
},
|
|
"inserted": {
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"editingLinearElementId": "id110",
|
|
},
|
|
"inserted": {
|
|
"editingLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"editingLinearElementId": null,
|
|
"selectedLinearElementId": null,
|
|
},
|
|
"inserted": {
|
|
"editingLinearElementId": "id110",
|
|
"selectedLinearElementId": "id110",
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected or editing linear element was remotely deleted > [end of test] number of elements 1`] = `1`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected or editing linear element was remotely deleted > [end of test] number of renders 1`] = `11`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when when element change relates to remotely deleted element > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "#ffc9c9",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when when element change relates to remotely deleted element > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "#ffec99",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id91",
|
|
"index": "a0",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when when element change relates to remotely deleted element > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id91": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id91" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "#ffec99",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"index": "a0",
|
|
"isDeleted": true,
|
|
"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,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id91" => Delta {
|
|
"deleted": {
|
|
"backgroundColor": "#ffec99",
|
|
},
|
|
"inserted": {
|
|
"backgroundColor": "transparent",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when when element change relates to remotely deleted element > [end of test] number of elements 1`] = `1`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when when element change relates to remotely deleted element > [end of test] number of renders 1`] = `10`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when z-index changes do not produce visible change and we synced all indices > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when z-index changes do not produce visible change and we synced all indices > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id116",
|
|
"index": "a1",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 8,
|
|
"width": 100,
|
|
"x": 20,
|
|
"y": 20,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when z-index changes do not produce visible change and we synced all indices > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id117",
|
|
"index": "a3V",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 4,
|
|
"width": 100,
|
|
"x": 30,
|
|
"y": 30,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when z-index changes do not produce visible change and we synced all indices > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id115",
|
|
"index": "a4",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 4,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when z-index changes do not produce visible change and we synced all indices > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id116" => Delta {
|
|
"deleted": {
|
|
"index": "a1",
|
|
},
|
|
"inserted": {
|
|
"index": "a3",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id116": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {
|
|
"id115" => Delta {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
},
|
|
"inserted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"index": "a4",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
},
|
|
},
|
|
"id116" => Delta {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
},
|
|
"inserted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"index": "a3",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"width": 100,
|
|
"x": 20,
|
|
"y": 20,
|
|
},
|
|
},
|
|
"id117" => Delta {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
},
|
|
"inserted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"index": "a3V",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"width": 100,
|
|
"x": 30,
|
|
"y": 30,
|
|
},
|
|
},
|
|
},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
"undoStack": [],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when z-index changes do not produce visible change and we synced all indices > [end of test] number of elements 1`] = `3`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when z-index changes do not produce visible change and we synced all indices > [end of test] number of renders 1`] = `11`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when z-index changes do not produce visible change and we synced changed indices > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when z-index changes do not produce visible change and we synced changed indices > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id111",
|
|
"index": "Zx",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 4,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when z-index changes do not produce visible change and we synced changed indices > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id113",
|
|
"index": "Zy",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 4,
|
|
"width": 100,
|
|
"x": 30,
|
|
"y": 30,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when z-index changes do not produce visible change and we synced changed indices > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id112",
|
|
"index": "a1",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"width": 100,
|
|
"x": 20,
|
|
"y": 20,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when z-index changes do not produce visible change and we synced changed indices > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id112" => Delta {
|
|
"deleted": {
|
|
"index": "a1",
|
|
},
|
|
"inserted": {
|
|
"index": "Zz",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id112": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {
|
|
"id111" => Delta {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
},
|
|
"inserted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"index": "Zx",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
},
|
|
},
|
|
"id112" => Delta {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
},
|
|
"inserted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"index": "Zz",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"width": 100,
|
|
"x": 20,
|
|
"y": 20,
|
|
},
|
|
},
|
|
"id113" => Delta {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
},
|
|
"inserted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"index": "Zy",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"width": 100,
|
|
"x": 30,
|
|
"y": 30,
|
|
},
|
|
},
|
|
},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
"undoStack": [],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when z-index changes do not produce visible change and we synced changed indices > [end of test] number of elements 1`] = `3`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when z-index changes do not produce visible change and we synced changed indices > [end of test] number of renders 1`] = `11`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress dragging > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {
|
|
"id124": true,
|
|
"id125": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {
|
|
"id124": true,
|
|
"id125": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress dragging > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id124",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 9,
|
|
"width": 10,
|
|
"x": 90,
|
|
"y": 90,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress dragging > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id125",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 9,
|
|
"width": 10,
|
|
"x": 110,
|
|
"y": 110,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress dragging > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id129",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#a5d8ff",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress dragging > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id124": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id124" => 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": {
|
|
"id125": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id124": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id125" => 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": 30,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id124": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id125": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id125": 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 {
|
|
"id124" => Delta {
|
|
"deleted": {
|
|
"x": 90,
|
|
"y": 90,
|
|
},
|
|
"inserted": {
|
|
"x": 10,
|
|
"y": 10,
|
|
},
|
|
},
|
|
"id125" => Delta {
|
|
"deleted": {
|
|
"x": 110,
|
|
"y": 110,
|
|
},
|
|
"inserted": {
|
|
"x": 30,
|
|
"y": 30,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress dragging > [end of test] number of elements 1`] = `3`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress dragging > [end of test] number of renders 1`] = `27`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress freedraw > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "freedraw",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress freedraw > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 50,
|
|
"id": "id119",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": [
|
|
50,
|
|
50,
|
|
],
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
20,
|
|
20,
|
|
],
|
|
[
|
|
50,
|
|
50,
|
|
],
|
|
[
|
|
50,
|
|
50,
|
|
],
|
|
],
|
|
"pressures": [
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
],
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"simulatePressure": false,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "freedraw",
|
|
"updated": 1,
|
|
"version": 8,
|
|
"width": 50,
|
|
"x": 10,
|
|
"y": 10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress freedraw > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id120",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#a5d8ff",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress freedraw > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id119" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 50,
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": [
|
|
50,
|
|
50,
|
|
],
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
20,
|
|
20,
|
|
],
|
|
[
|
|
50,
|
|
50,
|
|
],
|
|
[
|
|
50,
|
|
50,
|
|
],
|
|
],
|
|
"pressures": [
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
],
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"simulatePressure": false,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "freedraw",
|
|
"width": 50,
|
|
"x": 10,
|
|
"y": 10,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress freedraw > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress freedraw > [end of test] number of renders 1`] = `10`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress resizing > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {
|
|
"id121": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress resizing > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 90,
|
|
"id": "id121",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 9,
|
|
"width": 90,
|
|
"x": 10,
|
|
"y": 10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress resizing > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id123",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#a5d8ff",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress resizing > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id121": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id121" => 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 {
|
|
"id121" => Delta {
|
|
"deleted": {
|
|
"height": 90,
|
|
"width": 90,
|
|
},
|
|
"inserted": {
|
|
"height": 10,
|
|
"width": 10,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress resizing > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress resizing > [end of test] number of renders 1`] = `14`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not override remote changes on different elements > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "#ffc9c9",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {
|
|
"id81": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not override remote changes on different elements > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id81",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not override remote changes on different elements > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "#ffc9c9",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id82",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#a5d8ff",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not override remote changes on different elements > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id81" => Delta {
|
|
"deleted": {
|
|
"backgroundColor": "transparent",
|
|
},
|
|
"inserted": {
|
|
"backgroundColor": "#ffc9c9",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id81": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id81" => 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 {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not override remote changes on different elements > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not override remote changes on different elements > [end of test] number of renders 1`] = `11`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not override remote changes on different properties > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "#ffc9c9",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {
|
|
"id83": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not override remote changes on different properties > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "#ffc9c9",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id83",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#ffec99",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not override remote changes on different properties > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id83": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id83" => 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": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id83" => Delta {
|
|
"deleted": {
|
|
"backgroundColor": "#ffc9c9",
|
|
},
|
|
"inserted": {
|
|
"backgroundColor": "transparent",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not override remote changes on different properties > [end of test] number of elements 1`] = `1`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not override remote changes on different properties > [end of test] number of renders 1`] = `10`;
|
|
|
|
exports[`history > multiplayer undo/redo > should override remotely added groups on undo, but restore them on redo > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should override remotely added groups on undo, but restore them on redo > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A",
|
|
"B",
|
|
],
|
|
"height": 100,
|
|
"id": "id85",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 6,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should override remotely added groups on undo, but restore them on redo > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A",
|
|
"B",
|
|
],
|
|
"height": 100,
|
|
"id": "id86",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 6,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should override remotely added groups on undo, but restore them on redo > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"B",
|
|
],
|
|
"height": 100,
|
|
"id": "id87",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should override remotely added groups on undo, but restore them on redo > [end of test] element 3 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"B",
|
|
],
|
|
"height": 100,
|
|
"id": "id88",
|
|
"index": "a3",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should override remotely added groups on undo, but restore them on redo > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id85" => Delta {
|
|
"deleted": {
|
|
"groupIds": [
|
|
"A",
|
|
"B",
|
|
],
|
|
},
|
|
"inserted": {
|
|
"groupIds": [],
|
|
},
|
|
},
|
|
"id86" => Delta {
|
|
"deleted": {
|
|
"groupIds": [
|
|
"A",
|
|
"B",
|
|
],
|
|
},
|
|
"inserted": {
|
|
"groupIds": [],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should override remotely added groups on undo, but restore them on redo > [end of test] number of elements 1`] = `4`;
|
|
|
|
exports[`history > multiplayer undo/redo > should override remotely added groups on undo, but restore them on redo > [end of test] number of renders 1`] = `8`;
|
|
|
|
exports[`history > multiplayer undo/redo > should override remotely added points on undo, but restore them on redo > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {
|
|
"id89": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should override remotely added points on undo, but restore them on redo > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": null,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 20,
|
|
"id": "id89",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": [
|
|
30,
|
|
30,
|
|
],
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
5,
|
|
5,
|
|
],
|
|
[
|
|
10,
|
|
10,
|
|
],
|
|
[
|
|
15,
|
|
15,
|
|
],
|
|
[
|
|
20,
|
|
20,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 14,
|
|
"width": 20,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should override remotely added points on undo, but restore them on redo > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id89": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id89" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": null,
|
|
"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,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"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 {
|
|
"id89" => Delta {
|
|
"deleted": {
|
|
"height": 30,
|
|
"lastCommittedPoint": [
|
|
30,
|
|
30,
|
|
],
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
5,
|
|
5,
|
|
],
|
|
[
|
|
10,
|
|
10,
|
|
],
|
|
[
|
|
15,
|
|
15,
|
|
],
|
|
[
|
|
20,
|
|
20,
|
|
],
|
|
],
|
|
"width": 30,
|
|
},
|
|
"inserted": {
|
|
"height": 10,
|
|
"lastCommittedPoint": [
|
|
10,
|
|
10,
|
|
],
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
10,
|
|
10,
|
|
],
|
|
],
|
|
"width": 10,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedLinearElementId": "id89",
|
|
},
|
|
"inserted": {
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should override remotely added points on undo, but restore them on redo > [end of test] number of elements 1`] = `1`;
|
|
|
|
exports[`history > multiplayer undo/redo > should override remotely added points on undo, but restore them on redo > [end of test] number of renders 1`] = `17`;
|
|
|
|
exports[`history > multiplayer undo/redo > should redistribute deltas when element gets removed locally but is restored remotely > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should redistribute deltas when element gets removed locally but is restored remotely > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "#ffec99",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id90",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should redistribute deltas when element gets removed locally but is restored remotely > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id90": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id90" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "#ffec99",
|
|
"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": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id90": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id90" => Delta {
|
|
"deleted": {
|
|
"isDeleted": false,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": false,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should redistribute deltas when element gets removed locally but is restored remotely > [end of test] number of elements 1`] = `1`;
|
|
|
|
exports[`history > multiplayer undo/redo > should redistribute deltas when element gets removed locally but is restored remotely > [end of test] number of renders 1`] = `12`;
|
|
|
|
exports[`history > multiplayer undo/redo > should update history entries after remote changes on the same properties > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "#a5d8ff",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {
|
|
"id84": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should update history entries after remote changes on the same properties > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id84",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 13,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should update history entries after remote changes on the same properties > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id84" => Delta {
|
|
"deleted": {
|
|
"backgroundColor": "#d0bfff",
|
|
},
|
|
"inserted": {
|
|
"backgroundColor": "#ffec99",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id84" => Delta {
|
|
"deleted": {
|
|
"backgroundColor": "transparent",
|
|
},
|
|
"inserted": {
|
|
"backgroundColor": "#d0bfff",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id84": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id84" => 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 {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should update history entries after remote changes on the same properties > [end of test] number of elements 1`] = `1`;
|
|
|
|
exports[`history > multiplayer undo/redo > should update history entries after remote changes on the same properties > [end of test] number of renders 1`] = `16`;
|
|
|
|
exports[`history > singleplayer undo/redo > remounting undo/redo buttons should initialize undo/redo state correctly > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": false,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > remounting undo/redo buttons should initialize undo/redo state correctly > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "A",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > remounting undo/redo buttons should initialize undo/redo state correctly > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id80",
|
|
"index": "a1",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 4,
|
|
"width": 10,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > remounting undo/redo buttons should initialize undo/redo state correctly > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id80": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {
|
|
"id80" => Delta {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
},
|
|
"inserted": {
|
|
"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": 0,
|
|
},
|
|
},
|
|
},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
"undoStack": [],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > remounting undo/redo buttons should initialize undo/redo state correctly > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > singleplayer undo/redo > remounting undo/redo buttons should initialize undo/redo state correctly > [end of test] number of renders 1`] = `12`;
|
|
|
|
exports[`history > singleplayer undo/redo > should clear the redo stack on elements change > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {
|
|
"id14": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should clear the redo stack on elements change > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id13",
|
|
"index": "a0",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 4,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should clear the redo stack on elements change > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id14",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 3,
|
|
"width": 10,
|
|
"x": 20,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should clear the redo stack on elements change > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id14": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id14" => 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": 20,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should clear the redo stack on elements change > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > singleplayer undo/redo > should clear the redo stack on elements change > [end of test] number of renders 1`] = `10`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create entry when selecting freedraw > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "freedraw",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#e03131",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create entry when selecting freedraw > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id32",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 3,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create entry when selecting freedraw > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id33",
|
|
"index": "a1",
|
|
"isDeleted": true,
|
|
"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",
|
|
"updated": 1,
|
|
"version": 6,
|
|
"width": 50,
|
|
"x": 60,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create entry when selecting freedraw > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id34",
|
|
"index": "a2",
|
|
"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": "#e03131",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "freedraw",
|
|
"updated": 1,
|
|
"version": 5,
|
|
"width": 50,
|
|
"x": 150,
|
|
"y": -10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create entry when selecting freedraw > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id32": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id32" => 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": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id32": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id34" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"index": "a2",
|
|
"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": "#e03131",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "freedraw",
|
|
"width": 50,
|
|
"x": 150,
|
|
"y": -10,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create entry when selecting freedraw > [end of test] number of elements 1`] = `3`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create entry when selecting freedraw > [end of test] number of renders 1`] = `15`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": -50,
|
|
"scrollY": -50,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": false,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#000",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "A",
|
|
"index": "a0",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 5,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [],
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "B",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 5,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"viewBackgroundColor": "#000",
|
|
},
|
|
"inserted": {
|
|
"viewBackgroundColor": "#FFF",
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {
|
|
"A" => Delta {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": false,
|
|
},
|
|
},
|
|
},
|
|
"removed": Map {
|
|
"B" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [],
|
|
"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": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] number of renders 1`] = `6`;
|
|
|
|
exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {
|
|
"id78": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": false,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "A",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id78",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 5,
|
|
"width": 10,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id78": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id78" => 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": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] number of renders 1`] = `8`;
|
|
|
|
exports[`history > singleplayer undo/redo > should end up with no history entry after initializing scene > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {
|
|
"id19": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": false,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": true,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should end up with no history entry after initializing scene > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "A",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should end up with no history entry after initializing scene > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id19",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 5,
|
|
"width": 10,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should end up with no history entry after initializing scene > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id19": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id19" => 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": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should end up with no history entry after initializing scene > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > singleplayer undo/redo > should end up with no history entry after initializing scene > [end of test] number of renders 1`] = `8`;
|
|
|
|
exports[`history > singleplayer undo/redo > should iterate through the history when selection changes do not produce visible change > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {
|
|
"id15": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should iterate through the history when selection changes do not produce visible change > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id15",
|
|
"index": "a0",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 4,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should iterate through the history when selection changes do not produce visible change > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id15": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id15": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id15": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {
|
|
"id15" => Delta {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
},
|
|
"inserted": {
|
|
"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,
|
|
},
|
|
},
|
|
},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
"undoStack": [],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should iterate through the history when selection changes do not produce visible change > [end of test] number of elements 1`] = `1`;
|
|
|
|
exports[`history > singleplayer undo/redo > should iterate through the history when selection changes do not produce visible change > [end of test] number of renders 1`] = `14`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not clear the redo stack on standalone appstate change > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {
|
|
"id8": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not clear the redo stack on standalone appstate change > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id7",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 3,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not clear the redo stack on standalone appstate change > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id8",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 5,
|
|
"width": 10,
|
|
"x": 20,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not clear the redo stack on standalone appstate change > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id7": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"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": "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": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id7": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"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": {
|
|
"selectedElementIds": {
|
|
"id8": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id7": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id8" => 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": 20,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not clear the redo stack on standalone appstate change > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not clear the redo stack on standalone appstate change > [end of test] number of renders 1`] = `14`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not collapse when applying corrupted history entry > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not collapse when applying corrupted history entry > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not collapse when applying corrupted history entry > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not collapse when applying corrupted history entry > [end of test] number of elements 1`] = `1`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not collapse when applying corrupted history entry > [end of test] number of renders 1`] = `4`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not end up with history entry when there are no appstate changes > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
"id2": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {
|
|
"A": true,
|
|
},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not end up with history entry when there are no appstate changes > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A",
|
|
],
|
|
"height": 100,
|
|
"id": "id1",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not end up with history entry when there are no appstate changes > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A",
|
|
],
|
|
"height": 100,
|
|
"id": "id2",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not end up with history entry when there are no appstate changes > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
"id2": true,
|
|
},
|
|
"selectedGroupIds": {
|
|
"A": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
"selectedGroupIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id1" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A",
|
|
],
|
|
"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,
|
|
},
|
|
},
|
|
"id2" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A",
|
|
],
|
|
"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": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not end up with history entry when there are no appstate changes > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not end up with history entry when there are no appstate changes > [end of test] number of renders 1`] = `7`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not end up with history entry when there are no elements changes > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not end up with history entry when there are no elements changes > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id5",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not end up with history entry when there are no elements changes > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id6",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not end up with history entry when there are no elements changes > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id5" => 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,
|
|
},
|
|
},
|
|
"id6" => 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": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not end up with history entry when there are no elements changes > [end of test] number of elements 1`] = `2`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not end up with history entry when there are no elements changes > [end of test] number of renders 1`] = `5`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not override appstate changes when redo stack is not cleared > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "#a5d8ff",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {
|
|
"id11": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {
|
|
"id11": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not override appstate changes when redo stack is not cleared > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id11",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 11,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not override appstate changes when redo stack is not cleared > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id11" => Delta {
|
|
"deleted": {
|
|
"backgroundColor": "#ffc9c9",
|
|
},
|
|
"inserted": {
|
|
"backgroundColor": "#a5d8ff",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id11" => Delta {
|
|
"deleted": {
|
|
"backgroundColor": "transparent",
|
|
},
|
|
"inserted": {
|
|
"backgroundColor": "#ffc9c9",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id11": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id11": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id11" => 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 {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not override appstate changes when redo stack is not cleared > [end of test] number of elements 1`] = `1`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not override appstate changes when redo stack is not cleared > [end of test] number of renders 1`] = `16`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support appstate name or viewBackgroundColor change > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#000",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support appstate name or viewBackgroundColor change > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"name": "New name",
|
|
},
|
|
"inserted": {
|
|
"name": "Old name",
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"viewBackgroundColor": "#000",
|
|
},
|
|
"inserted": {
|
|
"viewBackgroundColor": "#FFF",
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support appstate name or viewBackgroundColor change > [end of test] number of elements 1`] = `0`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support appstate name or viewBackgroundColor change > [end of test] number of renders 1`] = `8`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on deletion and rebind on undo > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {
|
|
"id50": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {
|
|
"id55": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on deletion and rebind on undo > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id51",
|
|
"type": "text",
|
|
},
|
|
{
|
|
"id": "id55",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id50",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 8,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on deletion and rebind on undo > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": "id50",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id51",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "ola",
|
|
"textAlign": "center",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 6,
|
|
"verticalAlign": "middle",
|
|
"width": 30,
|
|
"x": -65,
|
|
"y": "-12.50000",
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on deletion and rebind on undo > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id55",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id52",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on deletion and rebind on undo > [end of test] element 3 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id52",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"id": "id55",
|
|
"index": "a3",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
98,
|
|
0,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id50",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 12,
|
|
"width": 98,
|
|
"x": 1,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on deletion and rebind on undo > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id55": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id55" => Delta {
|
|
"deleted": {
|
|
"isDeleted": false,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
100,
|
|
0,
|
|
],
|
|
],
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
100,
|
|
0,
|
|
],
|
|
],
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {
|
|
"id50" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id55",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
"id52" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id55",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id50" => 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": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id51" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "ola",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id52" => 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": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id50": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id51": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id51": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id50" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id51",
|
|
"type": "text",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
"id51" => Delta {
|
|
"deleted": {
|
|
"containerId": "id50",
|
|
"height": 25,
|
|
"textAlign": "center",
|
|
"verticalAlign": "middle",
|
|
"width": 30,
|
|
"x": -65,
|
|
"y": "-12.50000",
|
|
},
|
|
"inserted": {
|
|
"containerId": null,
|
|
"height": 100,
|
|
"textAlign": "left",
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id55": true,
|
|
},
|
|
"selectedLinearElementId": "id55",
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id50": true,
|
|
},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id55" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id52",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"index": "a3",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
100,
|
|
0,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id50",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {
|
|
"id50" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id55",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
"id52" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id55",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on deletion and rebind on undo > [end of test] number of elements 1`] = `4`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on deletion and rebind on undo > [end of test] number of renders 1`] = `13`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on undo and rebind on redo > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {
|
|
"id44": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {
|
|
"id49": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on undo and rebind on redo > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id45",
|
|
"type": "text",
|
|
},
|
|
{
|
|
"id": "id49",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id44",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 8,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on undo and rebind on redo > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": "id44",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id45",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "ola",
|
|
"textAlign": "center",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 8,
|
|
"verticalAlign": "middle",
|
|
"width": 30,
|
|
"x": -65,
|
|
"y": "-12.50000",
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on undo and rebind on redo > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id49",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id46",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on undo and rebind on redo > [end of test] element 3 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id46",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"id": "id49",
|
|
"index": "a3",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
98,
|
|
0,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id44",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 12,
|
|
"width": 98,
|
|
"x": 1,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on undo and rebind on redo > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id44" => 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": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id45" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "ola",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id46" => 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": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id44": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id45": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id45": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id44" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id45",
|
|
"type": "text",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
"id45" => Delta {
|
|
"deleted": {
|
|
"containerId": "id44",
|
|
"height": 25,
|
|
"textAlign": "center",
|
|
"verticalAlign": "middle",
|
|
"width": 30,
|
|
"x": -65,
|
|
"y": "-12.50000",
|
|
},
|
|
"inserted": {
|
|
"containerId": null,
|
|
"height": 100,
|
|
"textAlign": "left",
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id49": true,
|
|
},
|
|
"selectedLinearElementId": "id49",
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id44": true,
|
|
},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id49" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id46",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"index": "a3",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
100,
|
|
0,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id44",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {
|
|
"id44" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id49",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
"id46" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id49",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on undo and rebind on redo > [end of test] number of elements 1`] = `4`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on undo and rebind on redo > [end of test] number of renders 1`] = `13`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind everything from non deleted elements when iterating through the whole undo stack and vice versa rebind everything on redo > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {
|
|
"id56": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {
|
|
"id61": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind everything from non deleted elements when iterating through the whole undo stack and vice versa rebind everything on redo > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id57",
|
|
"type": "text",
|
|
},
|
|
{
|
|
"id": "id61",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id56",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 12,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind everything from non deleted elements when iterating through the whole undo stack and vice versa rebind everything on redo > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": "id56",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id57",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "ola",
|
|
"textAlign": "center",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 12,
|
|
"verticalAlign": "middle",
|
|
"width": 30,
|
|
"x": -65,
|
|
"y": "-12.50000",
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind everything from non deleted elements when iterating through the whole undo stack and vice versa rebind everything on redo > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id61",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id58",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 9,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind everything from non deleted elements when iterating through the whole undo stack and vice versa rebind everything on redo > [end of test] element 3 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id58",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"id": "id61",
|
|
"index": "a3",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
98,
|
|
0,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id56",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 12,
|
|
"width": 98,
|
|
"x": 1,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind everything from non deleted elements when iterating through the whole undo stack and vice versa rebind everything on redo > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id56" => 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": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id57" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "ola",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id58" => 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": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id56": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id57": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id57": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id56" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id57",
|
|
"type": "text",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
"id57" => Delta {
|
|
"deleted": {
|
|
"containerId": "id56",
|
|
"height": 25,
|
|
"textAlign": "center",
|
|
"verticalAlign": "middle",
|
|
"width": 30,
|
|
"x": -65,
|
|
"y": "-12.50000",
|
|
},
|
|
"inserted": {
|
|
"containerId": null,
|
|
"height": 100,
|
|
"textAlign": "left",
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id61": true,
|
|
},
|
|
"selectedLinearElementId": "id61",
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id56": true,
|
|
},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id61" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id58",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"index": "a3",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
100,
|
|
0,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id56",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {
|
|
"id56" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id61",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
"id58" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id61",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind everything from non deleted elements when iterating through the whole undo stack and vice versa rebind everything on redo > [end of test] number of elements 1`] = `4`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind everything from non deleted elements when iterating through the whole undo stack and vice versa rebind everything on redo > [end of test] number of renders 1`] = `21`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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,
|
|
"selectedElementIds": {
|
|
"id62": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id67",
|
|
"type": "arrow",
|
|
},
|
|
{
|
|
"id": "id63",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id62",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 8,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": "id62",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id63",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "ola",
|
|
"textAlign": "center",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 8,
|
|
"verticalAlign": "middle",
|
|
"width": 30,
|
|
"x": -65,
|
|
"y": "-12.50000",
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id67",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id64",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 5,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] element 3 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id64",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"id": "id67",
|
|
"index": "a3",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
98,
|
|
0,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id62",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 12,
|
|
"width": 98,
|
|
"x": 1,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id62": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id62" => Delta {
|
|
"deleted": {
|
|
"isDeleted": false,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id63" => Delta {
|
|
"deleted": {
|
|
"isDeleted": false,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {
|
|
"id67" => Delta {
|
|
"deleted": {
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
100,
|
|
0,
|
|
],
|
|
],
|
|
"startBinding": {
|
|
"elementId": "id62",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
100,
|
|
0,
|
|
],
|
|
],
|
|
"startBinding": null,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id62" => 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": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id63" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "ola",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id64" => 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": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id62": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id63": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id63": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id62" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id63",
|
|
"type": "text",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
"id63" => Delta {
|
|
"deleted": {
|
|
"containerId": "id62",
|
|
"height": 25,
|
|
"textAlign": "center",
|
|
"verticalAlign": "middle",
|
|
"width": 30,
|
|
"x": -65,
|
|
"y": "-12.50000",
|
|
},
|
|
"inserted": {
|
|
"containerId": null,
|
|
"height": 100,
|
|
"textAlign": "left",
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id67": true,
|
|
},
|
|
"selectedLinearElementId": "id67",
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id62": true,
|
|
},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id67" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id64",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"index": "a3",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
100,
|
|
0,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id62",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {
|
|
"id62" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id67",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
"id64" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id67",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id62": true,
|
|
},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id67": true,
|
|
},
|
|
"selectedLinearElementId": "id67",
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] number of elements 1`] = `4`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] number of renders 1`] = `15`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {
|
|
"id69": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {
|
|
"id69": true,
|
|
"id71": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id74",
|
|
"type": "arrow",
|
|
},
|
|
{
|
|
"id": "id70",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id69",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 8,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": "id69",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id70",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "ola",
|
|
"textAlign": "center",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 8,
|
|
"verticalAlign": "middle",
|
|
"width": 30,
|
|
"x": -65,
|
|
"y": "-12.50000",
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [
|
|
{
|
|
"id": "id74",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id71",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 5,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": -50,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] element 3 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id71",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"id": "id74",
|
|
"index": "a3",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
98,
|
|
0,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id69",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 13,
|
|
"width": 98,
|
|
"x": 1,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id69": true,
|
|
"id71": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id69" => Delta {
|
|
"deleted": {
|
|
"isDeleted": false,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id70" => Delta {
|
|
"deleted": {
|
|
"isDeleted": false,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id71" => Delta {
|
|
"deleted": {
|
|
"isDeleted": false,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {
|
|
"id74" => Delta {
|
|
"deleted": {
|
|
"endBinding": {
|
|
"elementId": "id71",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
100,
|
|
0,
|
|
],
|
|
],
|
|
"startBinding": {
|
|
"elementId": "id69",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"endBinding": null,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
100,
|
|
0,
|
|
],
|
|
],
|
|
"startBinding": null,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id69" => 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": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id70" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 1,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "ola",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id71" => 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": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id69": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id70": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id70": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id69" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id70",
|
|
"type": "text",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
"id70" => Delta {
|
|
"deleted": {
|
|
"containerId": "id69",
|
|
"height": 25,
|
|
"textAlign": "center",
|
|
"verticalAlign": "middle",
|
|
"width": 30,
|
|
"x": -65,
|
|
"y": "-12.50000",
|
|
},
|
|
"inserted": {
|
|
"containerId": null,
|
|
"height": 100,
|
|
"textAlign": "left",
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id74": true,
|
|
},
|
|
"selectedLinearElementId": "id74",
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id69": true,
|
|
},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id74" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id71",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"index": "a3",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
100,
|
|
0,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id69",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {
|
|
"id69" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id74",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
"id71" => Delta {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id74",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id69": true,
|
|
},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id74": true,
|
|
},
|
|
"selectedLinearElementId": "id74",
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id71": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] number of elements 1`] = `4`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] number of renders 1`] = `16`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {
|
|
"id39": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {
|
|
"id39": true,
|
|
"id41": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id40",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 3,
|
|
"width": 10,
|
|
"x": 20,
|
|
"y": 20,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id39",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id41",
|
|
"index": "a3",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 10,
|
|
"width": 10,
|
|
"x": 40,
|
|
"y": 40,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id39": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id39" => 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": {
|
|
"id40": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id39": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id40" => 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": 20,
|
|
"y": 20,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id41": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id40": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id41" => 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": 40,
|
|
"y": 40,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id41" => Delta {
|
|
"deleted": {
|
|
"index": "a0V",
|
|
},
|
|
"inserted": {
|
|
"index": "a2",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id39": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id41": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id41": 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 {
|
|
"id39" => Delta {
|
|
"deleted": {
|
|
"index": "a2",
|
|
},
|
|
"inserted": {
|
|
"index": "Zz",
|
|
},
|
|
},
|
|
"id41" => Delta {
|
|
"deleted": {
|
|
"index": "a3",
|
|
},
|
|
"inserted": {
|
|
"index": "a0",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] number of elements 1`] = `3`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] number of renders 1`] = `23`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {
|
|
"id36": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {
|
|
"id35_copy_copy": true,
|
|
"id36_copy_copy": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {
|
|
"A_copy": true,
|
|
},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A",
|
|
],
|
|
"height": 100,
|
|
"id": "id35",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A",
|
|
],
|
|
"height": 100,
|
|
"id": "id36",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": 100,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A_copy",
|
|
],
|
|
"height": 100,
|
|
"id": "id35_copy_copy",
|
|
"index": "a1G",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 3,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] element 3 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A_copy",
|
|
],
|
|
"height": 100,
|
|
"id": "id36_copy_copy",
|
|
"index": "a1V",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 3,
|
|
"width": 100,
|
|
"x": 110,
|
|
"y": 110,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] element 4 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A_copy",
|
|
],
|
|
"height": 100,
|
|
"id": "id35_copy",
|
|
"index": "a2",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 6,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] element 5 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A_copy",
|
|
],
|
|
"height": 100,
|
|
"id": "id36_copy",
|
|
"index": "a3",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 6,
|
|
"width": 100,
|
|
"x": 110,
|
|
"y": 110,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id35": true,
|
|
"id36": true,
|
|
},
|
|
"selectedGroupIds": {
|
|
"A": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
"selectedGroupIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id35" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A",
|
|
],
|
|
"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,
|
|
},
|
|
},
|
|
"id36" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A",
|
|
],
|
|
"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": 100,
|
|
"y": 100,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id35_copy_copy": true,
|
|
"id36_copy_copy": true,
|
|
},
|
|
"selectedGroupIds": {
|
|
"A_copy": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id35": true,
|
|
"id36": true,
|
|
},
|
|
"selectedGroupIds": {
|
|
"A": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id35_copy_copy" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A_copy",
|
|
],
|
|
"height": 100,
|
|
"index": "a1G",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
"id36_copy_copy" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"A_copy",
|
|
],
|
|
"height": 100,
|
|
"index": "a1V",
|
|
"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 {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] number of elements 1`] = `6`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] number of renders 1`] = `18`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support element creation, deletion and appstate element selection change > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {
|
|
"id23": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support element creation, deletion and appstate element selection change > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id22",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 5,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support element creation, deletion and appstate element selection change > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id23",
|
|
"index": "a1",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 8,
|
|
"width": 10,
|
|
"x": 20,
|
|
"y": 20,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support element creation, deletion and appstate element selection change > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id24",
|
|
"index": "a2",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 3,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 8,
|
|
"width": 10,
|
|
"x": 40,
|
|
"y": 40,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support element creation, deletion and appstate element selection change > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id22": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id22" => 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": {
|
|
"id23": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id22": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id23" => 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": 20,
|
|
"y": 20,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id24": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id23": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id24" => 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": 40,
|
|
"y": 40,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
},
|
|
},
|
|
},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id23": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id24": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id24": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id23": true,
|
|
"id24": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {
|
|
"id23" => Delta {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": false,
|
|
},
|
|
},
|
|
"id24" => Delta {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": false,
|
|
},
|
|
},
|
|
},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support element creation, deletion and appstate element selection change > [end of test] number of elements 1`] = `3`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support element creation, deletion and appstate element selection change > [end of test] number of renders 1`] = `30`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support linear element creation and points manipulation through the editor > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"currentChartType": "bar",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 1,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "round",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"draggingElement": null,
|
|
"editingElement": null,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": 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,
|
|
"gridSize": null,
|
|
"height": 0,
|
|
"isBindingEnabled": true,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"multiElement": 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": {
|
|
"id27": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"selectedElementIds": {
|
|
"id27": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showStats": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support linear element creation and points manipulation through the editor > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": null,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 20,
|
|
"id": "id27",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": [
|
|
20,
|
|
0,
|
|
],
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
10,
|
|
10,
|
|
],
|
|
[
|
|
20,
|
|
20,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 15,
|
|
"width": 20,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support linear element creation and points manipulation through the editor > [end of test] history 1`] = `
|
|
History {
|
|
"onHistoryChangedEmitter": Emitter {
|
|
"subscribers": [
|
|
[Function],
|
|
[Function],
|
|
],
|
|
},
|
|
"redoStack": [],
|
|
"undoStack": [
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id27": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {
|
|
"id27" => Delta {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": null,
|
|
"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,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"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 {
|
|
"id27" => Delta {
|
|
"deleted": {
|
|
"lastCommittedPoint": [
|
|
20,
|
|
0,
|
|
],
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
10,
|
|
10,
|
|
],
|
|
[
|
|
20,
|
|
0,
|
|
],
|
|
],
|
|
"width": 20,
|
|
},
|
|
"inserted": {
|
|
"lastCommittedPoint": [
|
|
10,
|
|
10,
|
|
],
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
10,
|
|
10,
|
|
],
|
|
],
|
|
"width": 10,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedLinearElementId": "id27",
|
|
},
|
|
"inserted": {
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"editingLinearElementId": "id27",
|
|
},
|
|
"inserted": {
|
|
"editingLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {
|
|
"id27" => Delta {
|
|
"deleted": {
|
|
"height": 20,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
10,
|
|
10,
|
|
],
|
|
[
|
|
20,
|
|
20,
|
|
],
|
|
],
|
|
},
|
|
"inserted": {
|
|
"height": 10,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
10,
|
|
10,
|
|
],
|
|
[
|
|
20,
|
|
0,
|
|
],
|
|
],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
HistoryEntry {
|
|
"appStateChange": AppStateChange {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"editingLinearElementId": null,
|
|
"selectedLinearElementId": null,
|
|
},
|
|
"inserted": {
|
|
"editingLinearElementId": "id27",
|
|
"selectedLinearElementId": "id27",
|
|
},
|
|
},
|
|
},
|
|
"elementsChange": ElementsChange {
|
|
"added": Map {},
|
|
"removed": Map {},
|
|
"updated": Map {},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support linear element creation and points manipulation through the editor > [end of test] number of elements 1`] = `1`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support linear element creation and points manipulation through the editor > [end of test] number of renders 1`] = `23`;
|