mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-23 01:10:10 +02:00
20545 lines
494 KiB
Plaintext
20545 lines
494 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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {
|
|
"id4": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id4": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 9,
|
|
"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,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id15",
|
|
"fixedPoint": [
|
|
"0.50000",
|
|
1,
|
|
],
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": "99.19972",
|
|
"id": "id4",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
"98.40611",
|
|
"99.19972",
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 37,
|
|
"width": "98.40611",
|
|
"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": "id4",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 50,
|
|
"id": "id15",
|
|
"index": "a3",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 14,
|
|
"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] 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`] = `21`;
|
|
|
|
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] redo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"version": 17,
|
|
},
|
|
"inserted": {
|
|
"version": 15,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"boundElements": [],
|
|
"version": 9,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id4",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 8,
|
|
},
|
|
},
|
|
"id15": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id4",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 12,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 11,
|
|
},
|
|
},
|
|
"id4": {
|
|
"deleted": {
|
|
"endBinding": {
|
|
"elementId": "id15",
|
|
"fixedPoint": [
|
|
"0.50000",
|
|
1,
|
|
],
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"height": "68.58402",
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
98,
|
|
"68.58402",
|
|
],
|
|
],
|
|
"startBinding": {
|
|
"elementId": "id0",
|
|
"focus": "0.02970",
|
|
"gap": 1,
|
|
},
|
|
"version": 35,
|
|
},
|
|
"inserted": {
|
|
"endBinding": {
|
|
"elementId": "id1",
|
|
"focus": "-0.02000",
|
|
"gap": 1,
|
|
},
|
|
"height": "0.00656",
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
"98.00000",
|
|
"-0.00656",
|
|
],
|
|
],
|
|
"startBinding": {
|
|
"elementId": "id0",
|
|
"focus": "0.02000",
|
|
"gap": 1,
|
|
},
|
|
"version": 32,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id22",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [],
|
|
"version": 18,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id4",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 17,
|
|
},
|
|
},
|
|
"id15": {
|
|
"deleted": {
|
|
"version": 14,
|
|
},
|
|
"inserted": {
|
|
"version": 12,
|
|
},
|
|
},
|
|
"id4": {
|
|
"deleted": {
|
|
"height": "99.19972",
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
"98.40611",
|
|
"99.19972",
|
|
],
|
|
],
|
|
"startBinding": null,
|
|
"version": 37,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"height": "68.58402",
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
98,
|
|
"68.58402",
|
|
],
|
|
],
|
|
"startBinding": {
|
|
"elementId": "id0",
|
|
"focus": "0.02970",
|
|
"gap": 1,
|
|
},
|
|
"version": 35,
|
|
"y": "35.82151",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id23",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
"id1": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id3",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id4": true,
|
|
},
|
|
"selectedLinearElementId": "id4",
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id4": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"elbowed": false,
|
|
"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",
|
|
"version": 4,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 3,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id6",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {
|
|
"id4": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id4": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 19,
|
|
"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": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": null,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"id": "id4",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 33,
|
|
"width": 0,
|
|
"x": 149,
|
|
"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] 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`] = `23`;
|
|
|
|
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] redo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"version": 18,
|
|
},
|
|
"inserted": {
|
|
"version": 16,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"boundElements": [],
|
|
"version": 9,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id4",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 8,
|
|
},
|
|
},
|
|
"id4": {
|
|
"deleted": {
|
|
"endBinding": null,
|
|
"version": 32,
|
|
},
|
|
"inserted": {
|
|
"endBinding": {
|
|
"elementId": "id1",
|
|
"focus": -0,
|
|
"gap": 1,
|
|
},
|
|
"version": 30,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id21",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [],
|
|
"version": 19,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id4",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 18,
|
|
},
|
|
},
|
|
"id4": {
|
|
"deleted": {
|
|
"startBinding": null,
|
|
"version": 33,
|
|
},
|
|
"inserted": {
|
|
"startBinding": {
|
|
"elementId": "id0",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"version": 32,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id22",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
"id1": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id3",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id4": true,
|
|
},
|
|
"selectedLinearElementId": "id4",
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id4": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"elbowed": false,
|
|
"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",
|
|
"version": 4,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 3,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id6",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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,
|
|
"elbowed": false,
|
|
"endArrowhead": null,
|
|
"endBinding": {
|
|
"elementId": "id1",
|
|
"fixedPoint": [
|
|
"0.50000",
|
|
1,
|
|
],
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": "1.36342",
|
|
"id": "id4",
|
|
"index": "Zz",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
98,
|
|
"1.36342",
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id0",
|
|
"fixedPoint": [
|
|
1,
|
|
"0.50000",
|
|
],
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 11,
|
|
"width": 98,
|
|
"x": 1,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
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": "id4",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id4",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 arrow when it's bindable elements are added through the history > [end of test] redo stack 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] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 7,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 6,
|
|
},
|
|
},
|
|
"id1": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 7,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 6,
|
|
},
|
|
},
|
|
},
|
|
"updated": {
|
|
"id4": {
|
|
"deleted": {
|
|
"endBinding": {
|
|
"elementId": "id1",
|
|
"fixedPoint": [
|
|
"0.50000",
|
|
1,
|
|
],
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"startBinding": {
|
|
"elementId": "id0",
|
|
"fixedPoint": [
|
|
1,
|
|
"0.50000",
|
|
],
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"version": 11,
|
|
},
|
|
"inserted": {
|
|
"endBinding": null,
|
|
"startBinding": null,
|
|
"version": 8,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id8",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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,
|
|
"elbowed": false,
|
|
"endArrowhead": null,
|
|
"endBinding": {
|
|
"elementId": "id1",
|
|
"fixedPoint": [
|
|
1,
|
|
"0.50000",
|
|
],
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": "1.36342",
|
|
"id": "id5",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
98,
|
|
"1.36342",
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id0",
|
|
"fixedPoint": [
|
|
"0.50000",
|
|
1,
|
|
],
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 11,
|
|
"width": 98,
|
|
"x": 1,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
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": "id5",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id0",
|
|
"index": "a0V",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id5",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 rebind remotely added bindable elements when it's arrow is added through the history > [end of test] redo stack 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] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id5": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"elbowed": false,
|
|
"endArrowhead": null,
|
|
"endBinding": {
|
|
"elementId": "id1",
|
|
"fixedPoint": [
|
|
1,
|
|
"0.50000",
|
|
],
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": "1.36342",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
98,
|
|
"1.36342",
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id0",
|
|
"fixedPoint": [
|
|
"0.50000",
|
|
1,
|
|
],
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"version": 11,
|
|
"width": 98,
|
|
"x": 1,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 8,
|
|
},
|
|
},
|
|
},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id5",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 12,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 9,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id5",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 11,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 8,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id11",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 unbind remotely deleted bindable elements from arrow when the arrow is added through the history > [end of test] redo stack 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] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
"id1": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id3",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id4": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id4",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id4",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id1",
|
|
"focus": -0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": "370.26975",
|
|
"id": "id4",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
"498.00000",
|
|
"-370.26975",
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id0",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 10,
|
|
"width": "498.00000",
|
|
"x": 1,
|
|
"y": "-37.92697",
|
|
}
|
|
`;
|
|
|
|
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`] = `9`;
|
|
|
|
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] redo stack 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] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
"id1": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id3",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id4": true,
|
|
},
|
|
"selectedLinearElementId": "id4",
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id4": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id1",
|
|
"focus": -0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": "370.26975",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
"498.00000",
|
|
"-370.26975",
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id0",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"version": 10,
|
|
"width": "498.00000",
|
|
"x": 1,
|
|
"y": "-37.92697",
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 7,
|
|
},
|
|
},
|
|
},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id4",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 7,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 4,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id4",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 8,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 5,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id8",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id5",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 6,
|
|
"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": 5,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id0",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id5",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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 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 container is added through the history > [end of test] redo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id5": {
|
|
"deleted": {
|
|
"version": 7,
|
|
},
|
|
"inserted": {
|
|
"version": 5,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id9",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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] undo stack 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] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id5",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id0",
|
|
"index": "Zz",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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 text is added through history > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": "id0",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id1",
|
|
"index": "a0",
|
|
"isDeleted": true,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id0",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id5",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "ola",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"updated": 1,
|
|
"version": 5,
|
|
"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] 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 preserve latest remotely added binding and unbind previous one when the text is added through history > [end of test] redo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {
|
|
"id1": {
|
|
"deleted": {
|
|
"containerId": "id0",
|
|
"isDeleted": true,
|
|
"version": 9,
|
|
},
|
|
"inserted": {
|
|
"containerId": null,
|
|
"isDeleted": false,
|
|
"version": 8,
|
|
},
|
|
},
|
|
},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id9",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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] undo stack 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] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id5",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id0",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id5",
|
|
"index": "a0V",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": 5,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 container got bound to a different text in the meantime > [end of test] redo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id5",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"version": 10,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id1",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"version": 9,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"containerId": null,
|
|
"version": 9,
|
|
},
|
|
"inserted": {
|
|
"containerId": "id0",
|
|
"version": 8,
|
|
},
|
|
},
|
|
"id5": {
|
|
"deleted": {
|
|
"containerId": "id0",
|
|
"version": 7,
|
|
},
|
|
"inserted": {
|
|
"containerId": null,
|
|
"version": 6,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id9",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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] undo stack 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] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id1",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 60,
|
|
"id": "id5",
|
|
"index": "a0V",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id5",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 50,
|
|
"id": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 the text got bound to a different container in the meantime > [end of test] redo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [],
|
|
"version": 8,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id1",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"version": 7,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"containerId": "id5",
|
|
"version": 13,
|
|
},
|
|
"inserted": {
|
|
"containerId": "id0",
|
|
"version": 11,
|
|
},
|
|
},
|
|
"id5": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id1",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"version": 8,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 7,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id9",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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] undo stack 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] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": 5,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 bindings when both are updated through the history and there no conflicting updates in the meantime > [end of test] redo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [],
|
|
"version": 9,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id1",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"version": 8,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"containerId": null,
|
|
"version": 10,
|
|
},
|
|
"inserted": {
|
|
"containerId": "id0",
|
|
"version": 9,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id8",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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] undo stack 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] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id1",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id0",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 bound text when it's container is added through the history > [end of test] redo stack 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] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 7,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 6,
|
|
},
|
|
},
|
|
},
|
|
"updated": {
|
|
"id1": {
|
|
"deleted": {
|
|
"containerId": "id0",
|
|
"version": 12,
|
|
},
|
|
"inserted": {
|
|
"containerId": null,
|
|
"version": 9,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id7",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id1",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id0",
|
|
"index": "Zz",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id0",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id1",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 rebind remotely added container when it's bound text is added through the history > [end of test] redo stack 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] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id1": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": "id0",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "que pasa",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"version": 8,
|
|
"verticalAlign": "top",
|
|
"width": 80,
|
|
"x": 15,
|
|
"y": 15,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 7,
|
|
},
|
|
},
|
|
},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id1",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"version": 11,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 8,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id7",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id1",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id0",
|
|
"index": "Zz",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id0",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id1",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 bound text to match container dimensions when the bound text is updated through the history > [end of test] redo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id1": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"version": 5,
|
|
"x": 15,
|
|
"y": 15,
|
|
},
|
|
"inserted": {
|
|
"angle": 0,
|
|
"version": 7,
|
|
"x": 15,
|
|
"y": 15,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id6",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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] undo stack 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] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id1",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id0",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 redraw remotely added bound text when it's container is updated through the history > [end of test] redo stack 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] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"angle": 90,
|
|
"version": 8,
|
|
"x": 200,
|
|
"y": 200,
|
|
},
|
|
"inserted": {
|
|
"angle": 0,
|
|
"version": 7,
|
|
"x": 10,
|
|
"y": 10,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id7",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id0",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id1",
|
|
"index": "a1",
|
|
"isDeleted": true,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 bound text from container when the container is added through the history > [end of test] redo stack 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] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [],
|
|
"isDeleted": false,
|
|
"version": 8,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id1",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"isDeleted": true,
|
|
"version": 7,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id7",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id1",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id0",
|
|
"index": "Zz",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": 5,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id1",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "que pasa",
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 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] redo stack 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] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id1": {
|
|
"deleted": {
|
|
"containerId": null,
|
|
"isDeleted": false,
|
|
"version": 8,
|
|
},
|
|
"inserted": {
|
|
"containerId": "id0",
|
|
"isDeleted": true,
|
|
"version": 7,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id7",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id1",
|
|
"index": "Zz",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"name": null,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 > 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] redo stack 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] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id1": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 8,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 7,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id10",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id1": {
|
|
"deleted": {
|
|
"version": 10,
|
|
},
|
|
"inserted": {
|
|
"version": 8,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id11",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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 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": "id1",
|
|
"index": "a1",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 3,
|
|
"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] 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 editing group contains only remotely deleted elements > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when editing group contains only remotely deleted elements > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
"id1": true,
|
|
},
|
|
"selectedGroupIds": {
|
|
"A": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
"selectedGroupIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id13",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"editingGroupId": "A",
|
|
"selectedElementIds": {},
|
|
"selectedGroupIds": {},
|
|
},
|
|
"inserted": {
|
|
"editingGroupId": null,
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedGroupIds": {
|
|
"A": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id14",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"editingGroupId": null,
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"editingGroupId": "A",
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id17",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "#ffc9c9",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": "elementBackground",
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {
|
|
"id8": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id3",
|
|
"index": "a1",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id8",
|
|
"index": "a2",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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`] = `17`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when element changes relate only to remotely deleted elements > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when element changes relate only to remotely deleted elements > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 3,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 2,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id2",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id3": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id18",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id3": {
|
|
"deleted": {
|
|
"backgroundColor": "#ffc9c9",
|
|
"version": 7,
|
|
},
|
|
"inserted": {
|
|
"backgroundColor": "transparent",
|
|
"version": 6,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id19",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id8": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id3": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id20",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id8": {
|
|
"deleted": {
|
|
"version": 7,
|
|
"x": 50,
|
|
"y": 50,
|
|
},
|
|
"inserted": {
|
|
"version": 6,
|
|
"x": 30,
|
|
"y": 30,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id21",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
"id2": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id2",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 elements relate only to remotely deleted elements > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected elements relate only to remotely deleted elements > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
"id1": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 20,
|
|
"y": 20,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
"id2": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 30,
|
|
"y": 30,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id5",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id18",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id2": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id19",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
"id1": true,
|
|
"id2": true,
|
|
"id3": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {
|
|
"A": true,
|
|
"B": true,
|
|
},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id2",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id3",
|
|
"index": "a3",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 groups contain only remotely deleted elements > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected groups contain only remotely deleted elements > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
"id1": true,
|
|
},
|
|
"selectedGroupIds": {
|
|
"A": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
"selectedGroupIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id14",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id2": true,
|
|
"id3": true,
|
|
},
|
|
"selectedGroupIds": {
|
|
"B": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
"selectedGroupIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id15",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": null,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"id": "id0",
|
|
"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": 7,
|
|
"width": 10,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
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`] = `9`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected or editing linear element was remotely deleted > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when selected or editing linear element was remotely deleted > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": null,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": [
|
|
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",
|
|
"version": 6,
|
|
"width": 10,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 5,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id2",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedLinearElementId": "id0",
|
|
},
|
|
"inserted": {
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id12",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"editingLinearElementId": "id0",
|
|
},
|
|
"inserted": {
|
|
"editingLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id13",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"editingLinearElementId": null,
|
|
},
|
|
"inserted": {
|
|
"editingLinearElementId": "id0",
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id14",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "#ffc9c9",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": "elementBackground",
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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`] = `9`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when when element change relates to remotely deleted element > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > multiplayer undo/redo > should iterate through the history when when element change relates to remotely deleted element > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id7",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"backgroundColor": "#ffec99",
|
|
"version": 7,
|
|
},
|
|
"inserted": {
|
|
"backgroundColor": "transparent",
|
|
"version": 6,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id8",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id1",
|
|
"index": "a1",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id2",
|
|
"index": "a3V",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id0",
|
|
"index": "a4",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 all indices > [end of test] redo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id1": {
|
|
"deleted": {
|
|
"index": "a1",
|
|
"version": 7,
|
|
},
|
|
"inserted": {
|
|
"index": "a3",
|
|
"version": 6,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id10",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {
|
|
"id0": {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
"version": 4,
|
|
},
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 3,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
"version": 8,
|
|
},
|
|
"inserted": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 7,
|
|
"width": 100,
|
|
"x": 20,
|
|
"y": 20,
|
|
},
|
|
},
|
|
"id2": {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
"version": 4,
|
|
},
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 3,
|
|
"width": 100,
|
|
"x": 30,
|
|
"y": 30,
|
|
},
|
|
},
|
|
},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id11",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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] undo stack 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] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "Zx",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id2",
|
|
"index": "Zy",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id1",
|
|
"index": "a1",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 iterate through the history when z-index changes do not produce visible change and we synced changed indices > [end of test] redo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id1": {
|
|
"deleted": {
|
|
"index": "a1",
|
|
"version": 6,
|
|
},
|
|
"inserted": {
|
|
"index": "Zz",
|
|
"version": 5,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id10",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {
|
|
"id0": {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
"version": 4,
|
|
},
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 3,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
"version": 7,
|
|
},
|
|
"inserted": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 6,
|
|
"width": 100,
|
|
"x": 20,
|
|
"y": 20,
|
|
},
|
|
},
|
|
"id2": {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
"version": 4,
|
|
},
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 3,
|
|
"width": 100,
|
|
"x": 30,
|
|
"y": 30,
|
|
},
|
|
},
|
|
},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id11",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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] undo stack 1`] = `[]`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress dragging > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {
|
|
"id0": true,
|
|
"id3": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
"id3": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id3",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id13",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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`] = `25`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress dragging > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress dragging > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 8,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 10,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 7,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id21",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id3": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id3": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 8,
|
|
"width": 10,
|
|
"x": 30,
|
|
"y": 30,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 7,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id22",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id3": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id23",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id3": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id24",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"version": 9,
|
|
"x": 90,
|
|
"y": 90,
|
|
},
|
|
"inserted": {
|
|
"version": 8,
|
|
"x": 10,
|
|
"y": 10,
|
|
},
|
|
},
|
|
"id3": {
|
|
"deleted": {
|
|
"version": 9,
|
|
"x": 110,
|
|
"y": 110,
|
|
},
|
|
"inserted": {
|
|
"version": 8,
|
|
"x": 30,
|
|
"y": 30,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id25",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress freedraw > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "freedraw",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"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": 7,
|
|
"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": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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`] = `8`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress freedraw > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress freedraw > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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",
|
|
"version": 7,
|
|
"width": 50,
|
|
"x": 10,
|
|
"y": 10,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 6,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id5",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress resizing > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id4",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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`] = `13`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress resizing > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not let remote changes to interfere with in progress resizing > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 8,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 10,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 7,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id9",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"height": 90,
|
|
"version": 9,
|
|
"width": 90,
|
|
},
|
|
"inserted": {
|
|
"height": 10,
|
|
"version": 8,
|
|
"width": 10,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id10",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not override remote changes on different elements > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "#ffc9c9",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": "elementBackground",
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id5",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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`] = `10`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not override remote changes on different elements > [end of test] redo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"backgroundColor": "transparent",
|
|
"version": 7,
|
|
},
|
|
"inserted": {
|
|
"backgroundColor": "#ffc9c9",
|
|
"version": 6,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id8",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not override remote changes on different elements > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 3,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 2,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id2",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not override remote changes on different properties > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "#ffc9c9",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": "elementBackground",
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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`] = `9`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not override remote changes on different properties > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > multiplayer undo/redo > should not override remote changes on different properties > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 3,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 2,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id2",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"backgroundColor": "#ffc9c9",
|
|
"version": 7,
|
|
},
|
|
"inserted": {
|
|
"backgroundColor": "transparent",
|
|
"version": 6,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id6",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should override remotely added groups on undo, but restore them on redo > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id4",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id5",
|
|
"index": "a3",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 groups on undo, but restore them on redo > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > multiplayer undo/redo > should override remotely added groups on undo, but restore them on redo > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"groupIds": [
|
|
"A",
|
|
"B",
|
|
],
|
|
"version": 6,
|
|
},
|
|
"inserted": {
|
|
"groupIds": [],
|
|
"version": 5,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"groupIds": [
|
|
"A",
|
|
"B",
|
|
],
|
|
"version": 6,
|
|
},
|
|
"inserted": {
|
|
"groupIds": [],
|
|
"version": 5,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id7",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should override remotely added points on undo, but restore them on redo > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": null,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 30,
|
|
"id": "id0",
|
|
"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": 13,
|
|
"width": 30,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
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`] = `14`;
|
|
|
|
exports[`history > multiplayer undo/redo > should override remotely added points on undo, but restore them on redo > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > multiplayer undo/redo > should override remotely added points on undo, but restore them on redo > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": null,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": [
|
|
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",
|
|
"version": 12,
|
|
"width": 10,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 11,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id10",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"height": 30,
|
|
"lastCommittedPoint": [
|
|
30,
|
|
30,
|
|
],
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
5,
|
|
5,
|
|
],
|
|
[
|
|
10,
|
|
10,
|
|
],
|
|
[
|
|
15,
|
|
15,
|
|
],
|
|
[
|
|
20,
|
|
20,
|
|
],
|
|
],
|
|
"version": 13,
|
|
"width": 30,
|
|
},
|
|
"inserted": {
|
|
"height": 10,
|
|
"lastCommittedPoint": [
|
|
10,
|
|
10,
|
|
],
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
10,
|
|
10,
|
|
],
|
|
],
|
|
"version": 12,
|
|
"width": 10,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id11",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedLinearElementId": "id0",
|
|
},
|
|
"inserted": {
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id12",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should redistribute deltas when element gets removed locally but is restored remotely > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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`] = `11`;
|
|
|
|
exports[`history > multiplayer undo/redo > should redistribute deltas when element gets removed locally but is restored remotely > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > multiplayer undo/redo > should redistribute deltas when element gets removed locally but is restored remotely > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 7,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 6,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id7",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id8",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 126,
|
|
"id": "KPrBI4g_v9qUB1XxYLgSz",
|
|
"index": "a0",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 4,
|
|
"width": 157,
|
|
"x": 600,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end of test] element 1 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": [],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 129,
|
|
"id": "u2JGnnmoJ0VATV4vCNJE5",
|
|
"index": "a1",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "diamond",
|
|
"updated": 1,
|
|
"version": 4,
|
|
"width": 124,
|
|
"x": 1152,
|
|
"y": 516,
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end of test] element 2 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"elbowed": true,
|
|
"endArrowhead": null,
|
|
"endBinding": {
|
|
"elementId": "u2JGnnmoJ0VATV4vCNJE5",
|
|
"fixedPoint": [
|
|
"0.49919",
|
|
"-0.03875",
|
|
],
|
|
"focus": "-0.00161",
|
|
"gap": "3.53708",
|
|
},
|
|
"endIsSpecial": false,
|
|
"fillStyle": "solid",
|
|
"fixedSegments": [],
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": "236.10000",
|
|
"id": "6Rm4g567UQM4WjLwej2Vc",
|
|
"index": "a2",
|
|
"isDeleted": true,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
"178.90000",
|
|
0,
|
|
],
|
|
[
|
|
"178.90000",
|
|
"236.10000",
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "KPrBI4g_v9qUB1XxYLgSz",
|
|
"fixedPoint": [
|
|
"1.03185",
|
|
"0.49921",
|
|
],
|
|
"focus": "-0.00159",
|
|
"gap": 5,
|
|
},
|
|
"startIsSpecial": false,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 3,
|
|
"width": "178.90000",
|
|
"x": 1035,
|
|
"y": "274.90000",
|
|
}
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end of test] number of elements 1`] = `3`;
|
|
|
|
exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end of test] number of renders 1`] = `8`;
|
|
|
|
exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end of test] redo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {
|
|
"6Rm4g567UQM4WjLwej2Vc": {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
"version": 3,
|
|
},
|
|
"inserted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"elbowed": true,
|
|
"endArrowhead": null,
|
|
"endBinding": {
|
|
"elementId": "u2JGnnmoJ0VATV4vCNJE5",
|
|
"fixedPoint": [
|
|
"0.49919",
|
|
"-0.03875",
|
|
],
|
|
"focus": "-0.00161",
|
|
"gap": "3.53708",
|
|
},
|
|
"endIsSpecial": false,
|
|
"fillStyle": "solid",
|
|
"fixedSegments": [],
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": "236.10000",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": null,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
"178.90000",
|
|
0,
|
|
],
|
|
[
|
|
"178.90000",
|
|
"236.10000",
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "KPrBI4g_v9qUB1XxYLgSz",
|
|
"fixedPoint": [
|
|
"1.03185",
|
|
"0.49921",
|
|
],
|
|
"focus": "-0.00159",
|
|
"gap": 5,
|
|
},
|
|
"startIsSpecial": false,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"version": 2,
|
|
"width": "178.90000",
|
|
"x": 1035,
|
|
"y": "274.90000",
|
|
},
|
|
},
|
|
},
|
|
"removed": {},
|
|
"updated": {
|
|
"KPrBI4g_v9qUB1XxYLgSz": {
|
|
"deleted": {
|
|
"boundElements": [],
|
|
"version": 3,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "6Rm4g567UQM4WjLwej2Vc",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 2,
|
|
},
|
|
},
|
|
"u2JGnnmoJ0VATV4vCNJE5": {
|
|
"deleted": {
|
|
"boundElements": [],
|
|
"version": 3,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "6Rm4g567UQM4WjLwej2Vc",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 2,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id7",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {
|
|
"KPrBI4g_v9qUB1XxYLgSz": {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
"version": 4,
|
|
},
|
|
"inserted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 126,
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 3,
|
|
"width": 157,
|
|
"x": 873,
|
|
"y": 212,
|
|
},
|
|
},
|
|
"u2JGnnmoJ0VATV4vCNJE5": {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
"version": 4,
|
|
},
|
|
"inserted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 129,
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "diamond",
|
|
"version": 3,
|
|
"width": 124,
|
|
"x": 1152,
|
|
"y": 516,
|
|
},
|
|
},
|
|
},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id8",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end of test] undo stack 1`] = `[]`;
|
|
|
|
exports[`history > multiplayer undo/redo > should update history entries after remote changes on the same properties > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "#a5d8ff",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": "elementBackground",
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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`] = `15`;
|
|
|
|
exports[`history > multiplayer undo/redo > should update history entries after remote changes on the same properties > [end of test] redo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"backgroundColor": "#d0bfff",
|
|
"version": 12,
|
|
},
|
|
"inserted": {
|
|
"backgroundColor": "#ffec99",
|
|
"version": 11,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id11",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"backgroundColor": "transparent",
|
|
"version": 13,
|
|
},
|
|
"inserted": {
|
|
"backgroundColor": "#d0bfff",
|
|
"version": 12,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id12",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > multiplayer undo/redo > should update history entries after remote changes on the same properties > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 3,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 2,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id2",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > remounting undo/redo buttons should initialize undo/redo state correctly > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": false,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"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": null,
|
|
"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": "id1",
|
|
"index": "a1",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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`] = `11`;
|
|
|
|
exports[`history > singleplayer undo/redo > remounting undo/redo buttons should initialize undo/redo state correctly > [end of test] redo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {
|
|
"id1": {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
"version": 4,
|
|
},
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 3,
|
|
"width": 10,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
},
|
|
},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id4",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > remounting undo/redo buttons should initialize undo/redo state correctly > [end of test] undo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should clear the redo stack on elements change > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id4": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id4",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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`] = `8`;
|
|
|
|
exports[`history > singleplayer undo/redo > should clear the redo stack on elements change > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should clear the redo stack on elements change > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id4": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id4": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 3,
|
|
"width": 10,
|
|
"x": 20,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 2,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id6",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create entry when selecting freedraw > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "freedraw",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#e03131",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": "elementStroke",
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id5",
|
|
"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": 5,
|
|
"width": 50,
|
|
"x": 40,
|
|
"y": -20,
|
|
}
|
|
`;
|
|
|
|
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": "id9",
|
|
"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": 4,
|
|
"width": 50,
|
|
"x": 130,
|
|
"y": -30,
|
|
}
|
|
`;
|
|
|
|
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`] = `12`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create entry when selecting freedraw > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create entry when selecting freedraw > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 3,
|
|
"width": 10,
|
|
"x": -10,
|
|
"y": -10,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 2,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id2",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id4",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id9": {
|
|
"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",
|
|
"version": 4,
|
|
"width": 50,
|
|
"x": 130,
|
|
"y": -30,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 3,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id11",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on embeddable link drag&drop > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": "Couldn't load invalid file",
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on embeddable link drag&drop > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 315,
|
|
"id": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": "https://www.youtube.com/watch?v=gkGMXY0wekg",
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "transparent",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "embeddable",
|
|
"updated": 1,
|
|
"version": 4,
|
|
"width": 560,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on embeddable link drag&drop > [end of test] number of elements 1`] = `1`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on embeddable link drag&drop > [end of test] number of renders 1`] = `7`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on embeddable link drag&drop > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on embeddable link drag&drop > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 315,
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": "https://www.youtube.com/watch?v=gkGMXY0wekg",
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "transparent",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "embeddable",
|
|
"version": 4,
|
|
"width": 560,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 3,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id4",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on embeddable link paste > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on embeddable link paste > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 315,
|
|
"id": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": "https://www.youtube.com/watch?v=gkGMXY0wekg",
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "transparent",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "embeddable",
|
|
"updated": 1,
|
|
"version": 4,
|
|
"width": 560,
|
|
"x": 0,
|
|
"y": 0,
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on embeddable link paste > [end of test] number of elements 1`] = `1`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on embeddable link paste > [end of test] number of renders 1`] = `7`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on embeddable link paste > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on embeddable link paste > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 315,
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": "https://www.youtube.com/watch?v=gkGMXY0wekg",
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "transparent",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "embeddable",
|
|
"version": 4,
|
|
"width": 560,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 3,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id4",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on image drag&drop > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 1000,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on image drag&drop > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"crop": null,
|
|
"customData": undefined,
|
|
"fileId": "fileId",
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 335,
|
|
"id": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"scale": [
|
|
1,
|
|
1,
|
|
],
|
|
"status": "pending",
|
|
"strokeColor": "transparent",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "image",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"width": 318,
|
|
"x": -159,
|
|
"y": "-167.50000",
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on image drag&drop > [end of test] number of elements 1`] = `1`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on image drag&drop > [end of test] number of renders 1`] = `7`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on image drag&drop > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on image drag&drop > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"crop": null,
|
|
"customData": undefined,
|
|
"fileId": "fileId",
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 335,
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"scale": [
|
|
1,
|
|
1,
|
|
],
|
|
"status": "pending",
|
|
"strokeColor": "transparent",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "image",
|
|
"version": 7,
|
|
"width": 318,
|
|
"x": -159,
|
|
"y": "-167.50000",
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 6,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id4",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on image paste > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 1000,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 0,
|
|
"zenModeEnabled": false,
|
|
"zoom": {
|
|
"value": 1,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on image paste > [end of test] element 0 1`] = `
|
|
{
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"crop": null,
|
|
"customData": undefined,
|
|
"fileId": "fileId",
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 77,
|
|
"id": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"scale": [
|
|
1,
|
|
1,
|
|
],
|
|
"status": "pending",
|
|
"strokeColor": "transparent",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "image",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"width": 56,
|
|
"x": -28,
|
|
"y": "-38.50000",
|
|
}
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on image paste > [end of test] number of elements 1`] = `1`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on image paste > [end of test] number of renders 1`] = `7`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on image paste > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on image paste > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"crop": null,
|
|
"customData": undefined,
|
|
"fileId": "fileId",
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 77,
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"scale": [
|
|
1,
|
|
1,
|
|
],
|
|
"status": "pending",
|
|
"strokeColor": "transparent",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "image",
|
|
"version": 7,
|
|
"width": 56,
|
|
"x": -28,
|
|
"y": "-38.50000",
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 6,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id4",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": -50,
|
|
"scrollY": -50,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": false,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"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": null,
|
|
"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": null,
|
|
"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] 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 create new history entry on scene import via drag&drop > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"viewBackgroundColor": "#000",
|
|
},
|
|
"inserted": {
|
|
"viewBackgroundColor": "#FFF",
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {
|
|
"A": {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
"version": 5,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": false,
|
|
"version": 4,
|
|
},
|
|
},
|
|
},
|
|
"removed": {
|
|
"B": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 5,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 4,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id5",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": false,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"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": null,
|
|
"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": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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`] = `7`;
|
|
|
|
exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id1": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 5,
|
|
"width": 10,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 4,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id5",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should end up with no history entry after initializing scene > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": false,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"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": null,
|
|
"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": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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`] = `9`;
|
|
|
|
exports[`history > singleplayer undo/redo > should end up with no history entry after initializing scene > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should end up with no history entry after initializing scene > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id1": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 5,
|
|
"width": 10,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 4,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id5",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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`] = `13`;
|
|
|
|
exports[`history > singleplayer undo/redo > should iterate through the history when selection changes do not produce visible change > [end of test] redo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id13",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id14",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {
|
|
"id0": {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
"version": 4,
|
|
},
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 3,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
},
|
|
},
|
|
},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id15",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should iterate through the history when selection changes do not produce visible change > [end of test] undo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not clear the redo stack on standalone appstate change > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id3": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id3",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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`] = `12`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not clear the redo stack on standalone appstate change > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not clear the redo stack on standalone appstate change > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 3,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 2,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id2",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id9",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id12",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id3": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id3": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 5,
|
|
"width": 10,
|
|
"x": 20,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 4,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id13",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not collapse when applying corrupted history entry > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": null,
|
|
"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] 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 collapse when applying corrupted history entry > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not collapse when applying corrupted history entry > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id3",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
"id1": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {
|
|
"A": true,
|
|
},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 appstate changes > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not end up with history entry when there are no appstate changes > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
"id1": true,
|
|
},
|
|
"selectedGroupIds": {
|
|
"A": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
"selectedGroupIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
"id1": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id4",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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 end up with history entry when there are no elements changes > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not end up with history entry when there are no elements changes > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
"id1": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id3",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not override appstate changes when redo stack is not cleared > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "#a5d8ff",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": "elementBackground",
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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`] = `15`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not override appstate changes when redo stack is not cleared > [end of test] redo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"backgroundColor": "#ffc9c9",
|
|
"version": 10,
|
|
},
|
|
"inserted": {
|
|
"backgroundColor": "#a5d8ff",
|
|
"version": 9,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id14",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"backgroundColor": "transparent",
|
|
"version": 11,
|
|
},
|
|
"inserted": {
|
|
"backgroundColor": "#ffc9c9",
|
|
"version": 10,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id15",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id16",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should not override appstate changes when redo stack is not cleared > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 3,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 2,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id2",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support appstate name or viewBackgroundColor change > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": {
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"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] 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 appstate name or viewBackgroundColor change > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support appstate name or viewBackgroundColor change > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"name": "New name",
|
|
},
|
|
"inserted": {
|
|
"name": "Old name",
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id7",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"viewBackgroundColor": "#000",
|
|
},
|
|
"inserted": {
|
|
"viewBackgroundColor": "#FFF",
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id8",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id13": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id1",
|
|
"type": "text",
|
|
},
|
|
{
|
|
"id": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id0",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id2",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id2",
|
|
"focus": -0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"id": "id13",
|
|
"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": "id0",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 10,
|
|
"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] 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`] = `12`;
|
|
|
|
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] redo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id13": true,
|
|
},
|
|
"selectedLinearElementId": "id13",
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id13": {
|
|
"deleted": {
|
|
"isDeleted": false,
|
|
"version": 10,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 7,
|
|
},
|
|
},
|
|
},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 8,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 5,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"version": 6,
|
|
},
|
|
"inserted": {
|
|
"version": 4,
|
|
},
|
|
},
|
|
"id2": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 7,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 4,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id18",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "ola",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"version": 2,
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
"id2": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id4",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id7",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id10",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id1",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"version": 3,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 2,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"containerId": "id0",
|
|
"height": 25,
|
|
"textAlign": "center",
|
|
"version": 4,
|
|
"verticalAlign": "middle",
|
|
"width": 30,
|
|
"x": -65,
|
|
"y": "-12.50000",
|
|
},
|
|
"inserted": {
|
|
"containerId": null,
|
|
"height": 100,
|
|
"textAlign": "left",
|
|
"version": 2,
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id12",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id13": true,
|
|
},
|
|
"selectedLinearElementId": "id13",
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id13": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id2",
|
|
"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": "id0",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"version": 6,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 5,
|
|
},
|
|
},
|
|
},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 4,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 3,
|
|
},
|
|
},
|
|
"id2": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 3,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 2,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id15",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id13": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id1",
|
|
"type": "text",
|
|
},
|
|
{
|
|
"id": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id0",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id2",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id2",
|
|
"focus": -0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"id": "id13",
|
|
"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": "id0",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 10,
|
|
"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] 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`] = `12`;
|
|
|
|
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] redo stack 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] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "ola",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"version": 2,
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
"id2": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id4",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id7",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id10",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id1",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"version": 3,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 2,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"containerId": "id0",
|
|
"height": 25,
|
|
"textAlign": "center",
|
|
"version": 4,
|
|
"verticalAlign": "middle",
|
|
"width": 30,
|
|
"x": -65,
|
|
"y": "-12.50000",
|
|
},
|
|
"inserted": {
|
|
"containerId": null,
|
|
"height": 100,
|
|
"textAlign": "left",
|
|
"version": 2,
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id12",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id13": true,
|
|
},
|
|
"selectedLinearElementId": "id13",
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id13": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id2",
|
|
"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,
|
|
],
|
|
[
|
|
98,
|
|
0,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id0",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"version": 10,
|
|
"width": 98,
|
|
"x": 1,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 7,
|
|
},
|
|
},
|
|
},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 8,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 5,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"version": 8,
|
|
},
|
|
"inserted": {
|
|
"version": 6,
|
|
},
|
|
},
|
|
"id2": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 7,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 4,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id17",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id13": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id1",
|
|
"type": "text",
|
|
},
|
|
{
|
|
"id": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id0",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id2",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id2",
|
|
"focus": -0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"id": "id13",
|
|
"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": "id0",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 10,
|
|
"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] 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`] = `20`;
|
|
|
|
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] redo stack 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] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 8,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 7,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "ola",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"version": 9,
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 8,
|
|
},
|
|
},
|
|
"id2": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 6,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 5,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id21",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id22",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id23",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id1",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"version": 9,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 8,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"containerId": "id0",
|
|
"height": 25,
|
|
"textAlign": "center",
|
|
"version": 10,
|
|
"verticalAlign": "middle",
|
|
"width": 30,
|
|
"x": -65,
|
|
"y": "-12.50000",
|
|
},
|
|
"inserted": {
|
|
"containerId": null,
|
|
"height": 100,
|
|
"textAlign": "left",
|
|
"version": 9,
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id24",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id13": true,
|
|
},
|
|
"selectedLinearElementId": "id13",
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id13": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id2",
|
|
"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,
|
|
],
|
|
[
|
|
98,
|
|
0,
|
|
],
|
|
],
|
|
"roughness": 1,
|
|
"roundness": {
|
|
"type": 2,
|
|
},
|
|
"startArrowhead": null,
|
|
"startBinding": {
|
|
"elementId": "id0",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"version": 10,
|
|
"width": 98,
|
|
"x": 1,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 7,
|
|
},
|
|
},
|
|
},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 12,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 9,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"version": 12,
|
|
},
|
|
"inserted": {
|
|
"version": 10,
|
|
},
|
|
},
|
|
"id2": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 9,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 6,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id25",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id13",
|
|
"type": "arrow",
|
|
},
|
|
{
|
|
"id": "id1",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id0",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id2",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id2",
|
|
"focus": -0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"id": "id13",
|
|
"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": "id0",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 10,
|
|
"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] 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`] = `14`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] redo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"deleted": {
|
|
"isDeleted": false,
|
|
"version": 8,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 5,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"isDeleted": false,
|
|
"version": 8,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 5,
|
|
},
|
|
},
|
|
},
|
|
"updated": {
|
|
"id13": {
|
|
"deleted": {
|
|
"startBinding": {
|
|
"elementId": "id0",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"version": 10,
|
|
},
|
|
"inserted": {
|
|
"startBinding": null,
|
|
"version": 7,
|
|
},
|
|
},
|
|
"id2": {
|
|
"deleted": {
|
|
"version": 5,
|
|
},
|
|
"inserted": {
|
|
"version": 3,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id21",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "ola",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"version": 2,
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
"id2": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id4",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id7",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id10",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id1",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"version": 3,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 2,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"containerId": "id0",
|
|
"height": 25,
|
|
"textAlign": "center",
|
|
"version": 4,
|
|
"verticalAlign": "middle",
|
|
"width": 30,
|
|
"x": -65,
|
|
"y": "-12.50000",
|
|
},
|
|
"inserted": {
|
|
"containerId": null,
|
|
"height": 100,
|
|
"textAlign": "left",
|
|
"version": 2,
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id12",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id13": true,
|
|
},
|
|
"selectedLinearElementId": "id13",
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id13": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id2",
|
|
"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": "id0",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"version": 6,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 5,
|
|
},
|
|
},
|
|
},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 4,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 3,
|
|
},
|
|
},
|
|
"id2": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 3,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 2,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id15",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id13": true,
|
|
},
|
|
"selectedLinearElementId": "id13",
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id18",
|
|
},
|
|
]
|
|
`;
|
|
|
|
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,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
"id2": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id13",
|
|
"type": "arrow",
|
|
},
|
|
{
|
|
"id": "id1",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id0",
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"fontSize": 20,
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 25,
|
|
"id": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"lineHeight": "1.25000",
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"originalText": "ola",
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 100,
|
|
"id": "id2",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id2",
|
|
"focus": -0,
|
|
"gap": 1,
|
|
},
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 0,
|
|
"id": "id13",
|
|
"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": "id0",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"updated": 1,
|
|
"version": 11,
|
|
"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] 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`] = `15`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] redo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
"id2": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"deleted": {
|
|
"isDeleted": false,
|
|
"version": 8,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 5,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"isDeleted": false,
|
|
"version": 8,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 5,
|
|
},
|
|
},
|
|
"id2": {
|
|
"deleted": {
|
|
"isDeleted": false,
|
|
"version": 5,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 4,
|
|
},
|
|
},
|
|
},
|
|
"updated": {
|
|
"id13": {
|
|
"deleted": {
|
|
"endBinding": {
|
|
"elementId": "id2",
|
|
"focus": -0,
|
|
"gap": 1,
|
|
},
|
|
"startBinding": {
|
|
"elementId": "id0",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"version": 11,
|
|
},
|
|
"inserted": {
|
|
"endBinding": null,
|
|
"startBinding": null,
|
|
"version": 8,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id24",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": -100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"autoResize": true,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"containerId": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"fontFamily": 5,
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"text": "ola",
|
|
"textAlign": "left",
|
|
"type": "text",
|
|
"version": 2,
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
"id2": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": -50,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id4",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id7",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id10",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id1",
|
|
"type": "text",
|
|
},
|
|
],
|
|
"version": 3,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 2,
|
|
},
|
|
},
|
|
"id1": {
|
|
"deleted": {
|
|
"containerId": "id0",
|
|
"height": 25,
|
|
"textAlign": "center",
|
|
"version": 4,
|
|
"verticalAlign": "middle",
|
|
"width": 30,
|
|
"x": -65,
|
|
"y": "-12.50000",
|
|
},
|
|
"inserted": {
|
|
"containerId": null,
|
|
"height": 100,
|
|
"textAlign": "left",
|
|
"version": 2,
|
|
"verticalAlign": "top",
|
|
"width": 100,
|
|
"x": -200,
|
|
"y": -200,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id12",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id13": true,
|
|
},
|
|
"selectedLinearElementId": "id13",
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id13": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": {
|
|
"elementId": "id2",
|
|
"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": "id0",
|
|
"focus": 0,
|
|
"gap": 1,
|
|
},
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "arrow",
|
|
"version": 6,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 5,
|
|
},
|
|
},
|
|
},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 4,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 3,
|
|
},
|
|
},
|
|
"id2": {
|
|
"deleted": {
|
|
"boundElements": [
|
|
{
|
|
"id": "id13",
|
|
"type": "arrow",
|
|
},
|
|
],
|
|
"version": 3,
|
|
},
|
|
"inserted": {
|
|
"boundElements": [],
|
|
"version": 2,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id15",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedLinearElementId": null,
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id13": true,
|
|
},
|
|
"selectedLinearElementId": "id13",
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id18",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id2": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id21",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
"id6": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id3",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id0",
|
|
"index": "a2",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id6",
|
|
"index": "a3",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] number of elements 1`] = `3`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] number of renders 1`] = `20`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 3,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 2,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id2",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id3": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id3": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 3,
|
|
"width": 10,
|
|
"x": 20,
|
|
"y": 20,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 2,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id5",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id6": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id3": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id6": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 3,
|
|
"width": 10,
|
|
"x": 40,
|
|
"y": 40,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 2,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id8",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id6": {
|
|
"deleted": {
|
|
"index": "a0V",
|
|
"version": 6,
|
|
},
|
|
"inserted": {
|
|
"index": "a2",
|
|
"version": 5,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id12",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id6": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id15",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id6": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id18",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"index": "a2",
|
|
"version": 7,
|
|
},
|
|
"inserted": {
|
|
"index": "Zz",
|
|
"version": 6,
|
|
},
|
|
},
|
|
"id6": {
|
|
"deleted": {
|
|
"index": "a3",
|
|
"version": 10,
|
|
},
|
|
"inserted": {
|
|
"index": "a0",
|
|
"version": 9,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id22",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {
|
|
"id1": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id24": true,
|
|
"id26": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {
|
|
"id25": true,
|
|
},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id1",
|
|
"index": "a1",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": [
|
|
"id25",
|
|
],
|
|
"height": 100,
|
|
"id": "id24",
|
|
"index": "a1G",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 4,
|
|
"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": [
|
|
"id25",
|
|
],
|
|
"height": 100,
|
|
"id": "id26",
|
|
"index": "a1V",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 4,
|
|
"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": [
|
|
"id17",
|
|
],
|
|
"height": 100,
|
|
"id": "id16",
|
|
"index": "a2",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"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": [
|
|
"id17",
|
|
],
|
|
"height": 100,
|
|
"id": "id18",
|
|
"index": "a3",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"updated": 1,
|
|
"version": 7,
|
|
"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] 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 duplication of groups, appstate group selection and editing group > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support duplication of groups, appstate group selection and editing group > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
"id1": true,
|
|
},
|
|
"selectedGroupIds": {
|
|
"A": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
"selectedGroupIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
"id1": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 2,
|
|
"width": 100,
|
|
"x": 100,
|
|
"y": 100,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 1,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id4",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id24": true,
|
|
"id26": true,
|
|
},
|
|
"selectedGroupIds": {
|
|
"id25": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
"id1": true,
|
|
},
|
|
"selectedGroupIds": {
|
|
"A": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id24": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"id25",
|
|
],
|
|
"height": 100,
|
|
"index": "a1G",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 4,
|
|
"width": 100,
|
|
"x": 10,
|
|
"y": 10,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 3,
|
|
},
|
|
},
|
|
"id26": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [
|
|
"id25",
|
|
],
|
|
"height": 100,
|
|
"index": "a1V",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 4,
|
|
"width": 100,
|
|
"x": 110,
|
|
"y": 110,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 3,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id28",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support element creation, deletion and appstate element selection change > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {
|
|
"id3": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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": "id0",
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id3",
|
|
"index": "a1",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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": "id6",
|
|
"index": "a2",
|
|
"isDeleted": true,
|
|
"link": null,
|
|
"locked": false,
|
|
"opacity": 100,
|
|
"roughness": 1,
|
|
"roundness": null,
|
|
"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] 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`] = `29`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support element creation, deletion and appstate element selection change > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support element creation, deletion and appstate element selection change > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 5,
|
|
"width": 10,
|
|
"x": 10,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 4,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id23",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id3": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id3": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 7,
|
|
"width": 10,
|
|
"x": 20,
|
|
"y": 20,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 6,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id24",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id6": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id3": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id6": {
|
|
"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": null,
|
|
"strokeColor": "#1e1e1e",
|
|
"strokeStyle": "solid",
|
|
"strokeWidth": 2,
|
|
"type": "rectangle",
|
|
"version": 7,
|
|
"width": 10,
|
|
"x": 40,
|
|
"y": 40,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 6,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id25",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id3": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id6": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id26",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id6": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id27",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {
|
|
"id3": true,
|
|
"id6": true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {
|
|
"id3": {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
"version": 8,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": false,
|
|
"version": 7,
|
|
},
|
|
},
|
|
"id6": {
|
|
"deleted": {
|
|
"isDeleted": true,
|
|
"version": 8,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": false,
|
|
"version": 7,
|
|
},
|
|
},
|
|
},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id28",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support linear element creation and points manipulation through the editor > [end of test] appState 1`] = `
|
|
{
|
|
"activeEmbeddable": null,
|
|
"activeLockedId": null,
|
|
"activeTool": {
|
|
"customType": null,
|
|
"fromSelection": false,
|
|
"lastActiveTool": null,
|
|
"locked": false,
|
|
"type": "selection",
|
|
},
|
|
"collaborators": Map {},
|
|
"contextMenu": null,
|
|
"croppingElementId": null,
|
|
"currentChartType": "bar",
|
|
"currentHoveredFontFamily": null,
|
|
"currentItemArrowType": "round",
|
|
"currentItemBackgroundColor": "transparent",
|
|
"currentItemEndArrowhead": "arrow",
|
|
"currentItemFillStyle": "solid",
|
|
"currentItemFontFamily": 5,
|
|
"currentItemFontSize": 20,
|
|
"currentItemOpacity": 100,
|
|
"currentItemRoughness": 1,
|
|
"currentItemRoundness": "sharp",
|
|
"currentItemStartArrowhead": null,
|
|
"currentItemStrokeColor": "#1e1e1e",
|
|
"currentItemStrokeStyle": "solid",
|
|
"currentItemStrokeWidth": 2,
|
|
"currentItemTextAlign": "left",
|
|
"cursorButton": "up",
|
|
"defaultSidebarDockedPreference": false,
|
|
"editingFrame": null,
|
|
"editingGroupId": null,
|
|
"editingLinearElement": null,
|
|
"editingTextElement": null,
|
|
"elementsToHighlight": null,
|
|
"errorMessage": null,
|
|
"exportBackground": true,
|
|
"exportEmbedScene": false,
|
|
"exportScale": 1,
|
|
"exportWithDarkMode": false,
|
|
"fileHandle": null,
|
|
"followedBy": Set {},
|
|
"frameRendering": {
|
|
"clip": true,
|
|
"enabled": true,
|
|
"name": true,
|
|
"outline": true,
|
|
},
|
|
"frameToHighlight": null,
|
|
"gridModeEnabled": false,
|
|
"gridSize": 20,
|
|
"gridStep": 5,
|
|
"height": 0,
|
|
"hoveredElementIds": {},
|
|
"isBindingEnabled": true,
|
|
"isCropping": false,
|
|
"isLoading": false,
|
|
"isResizing": false,
|
|
"isRotating": false,
|
|
"lastPointerDownWith": "mouse",
|
|
"lockedMultiSelections": {},
|
|
"multiElement": null,
|
|
"newElement": null,
|
|
"objectsSnapModeEnabled": false,
|
|
"offsetLeft": 0,
|
|
"offsetTop": 0,
|
|
"openDialog": null,
|
|
"openMenu": null,
|
|
"openPopup": null,
|
|
"openSidebar": null,
|
|
"originSnapOffset": null,
|
|
"pasteDialog": {
|
|
"data": null,
|
|
"shown": false,
|
|
},
|
|
"penDetected": false,
|
|
"penMode": false,
|
|
"previousSelectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"resizingElement": null,
|
|
"scrollX": 0,
|
|
"scrollY": 0,
|
|
"searchMatches": null,
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
"selectedElementsAreBeingDragged": false,
|
|
"selectedGroupIds": {},
|
|
"selectionElement": null,
|
|
"shouldCacheIgnoreZoom": false,
|
|
"showHyperlinkPopup": false,
|
|
"showWelcomeScreen": true,
|
|
"snapLines": [],
|
|
"startBoundElement": null,
|
|
"stats": {
|
|
"open": false,
|
|
"panels": 3,
|
|
},
|
|
"suggestedBindings": [],
|
|
"theme": "light",
|
|
"toast": null,
|
|
"userToFollow": null,
|
|
"viewBackgroundColor": "#ffffff",
|
|
"viewModeEnabled": false,
|
|
"width": 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,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": null,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 20,
|
|
"id": "id0",
|
|
"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] 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`] = `20`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support linear element creation and points manipulation through the editor > [end of test] redo stack 1`] = `[]`;
|
|
|
|
exports[`history > singleplayer undo/redo > should support linear element creation and points manipulation through the editor > [end of test] undo stack 1`] = `
|
|
[
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedElementIds": {
|
|
"id0": true,
|
|
},
|
|
},
|
|
"inserted": {
|
|
"selectedElementIds": {},
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {
|
|
"id0": {
|
|
"deleted": {
|
|
"angle": 0,
|
|
"backgroundColor": "transparent",
|
|
"boundElements": null,
|
|
"customData": undefined,
|
|
"elbowed": false,
|
|
"endArrowhead": "arrow",
|
|
"endBinding": null,
|
|
"fillStyle": "solid",
|
|
"frameId": null,
|
|
"groupIds": [],
|
|
"height": 10,
|
|
"index": "a0",
|
|
"isDeleted": false,
|
|
"lastCommittedPoint": [
|
|
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",
|
|
"version": 13,
|
|
"width": 10,
|
|
"x": 0,
|
|
"y": 0,
|
|
},
|
|
"inserted": {
|
|
"isDeleted": true,
|
|
"version": 12,
|
|
},
|
|
},
|
|
},
|
|
"updated": {},
|
|
},
|
|
"id": "id23",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"lastCommittedPoint": [
|
|
20,
|
|
0,
|
|
],
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
10,
|
|
10,
|
|
],
|
|
[
|
|
20,
|
|
0,
|
|
],
|
|
],
|
|
"version": 14,
|
|
"width": 20,
|
|
},
|
|
"inserted": {
|
|
"lastCommittedPoint": [
|
|
10,
|
|
10,
|
|
],
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
10,
|
|
10,
|
|
],
|
|
],
|
|
"version": 13,
|
|
"width": 10,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id24",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"selectedLinearElementId": "id0",
|
|
},
|
|
"inserted": {
|
|
"selectedLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id25",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"editingLinearElementId": "id0",
|
|
},
|
|
"inserted": {
|
|
"editingLinearElementId": null,
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id26",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {},
|
|
"inserted": {},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {
|
|
"id0": {
|
|
"deleted": {
|
|
"height": 20,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
10,
|
|
10,
|
|
],
|
|
[
|
|
20,
|
|
20,
|
|
],
|
|
],
|
|
"version": 15,
|
|
},
|
|
"inserted": {
|
|
"height": 10,
|
|
"points": [
|
|
[
|
|
0,
|
|
0,
|
|
],
|
|
[
|
|
10,
|
|
10,
|
|
],
|
|
[
|
|
20,
|
|
0,
|
|
],
|
|
],
|
|
"version": 14,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"id": "id27",
|
|
},
|
|
{
|
|
"appState": AppStateDelta {
|
|
"delta": Delta {
|
|
"deleted": {
|
|
"editingLinearElementId": null,
|
|
},
|
|
"inserted": {
|
|
"editingLinearElementId": "id0",
|
|
},
|
|
},
|
|
},
|
|
"elements": {
|
|
"added": {},
|
|
"removed": {},
|
|
"updated": {},
|
|
},
|
|
"id": "id28",
|
|
},
|
|
]
|
|
`;
|