docstring_tokens
stringlengths
18
16.9k
code_tokens
stringlengths
75
1.81M
html_url
stringlengths
74
116
file_name
stringlengths
3
311
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "mouse", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": false, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> `; <mask> <mask> exports[`regression tests selecting 'Paste styles' in context menu pastes styles: [end of test] number of elements 1`] = `2`; <mask> <mask> exports[`regression tests selecting 'Paste styles' in context menu pastes styles: [end of test] number of renders 1`] = `21`; <mask> <mask> exports[`regression tests selecting 'Send backward' in context menu sends element backward: [end of test] appState 1`] = ` <mask> Object { <mask> "appearance": "light", <mask> "collaborators": Map {}, </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests selecting 'Send backward' in context menu sends element backward: [end of test] number of renders 1`] = `11`; </s> add exports[`regression tests selecting 'Send backward' in context menu sends element backward: [end of test] number of renders 1`] = `10`; </s> remove exports[`regression tests selecting 'Group selection' in context menu groups selected elements: [end of test] number of renders 1`] = `13`; </s> add exports[`regression tests selecting 'Group selection' in context menu groups selected elements: [end of test] number of renders 1`] = `12`; </s> remove exports[`regression tests selecting 'Copy styles' in context menu copies styles: [end of test] number of renders 1`] = `6`; </s> add exports[`regression tests selecting 'Copy styles' in context menu copies styles: [end of test] number of renders 1`] = `5`; </s> remove exports[`regression tests selecting 'Send to back' in context menu sends element to back: [end of test] number of renders 1`] = `11`; </s> add exports[`regression tests selecting 'Send to back' in context menu sends element to back: [end of test] number of renders 1`] = `10`; </s> remove exports[`regression tests selecting 'Bring to front' in context menu brings element to front: [end of test] number of renders 1`] = `12`; </s> add exports[`regression tests selecting 'Bring to front' in context menu brings element to front: [end of test] number of renders 1`] = `11`; </s> remove exports[`regression tests selecting 'Duplicate' in context menu duplicates element: [end of test] number of renders 1`] = `7`; </s> add exports[`regression tests selecting 'Duplicate' in context menu duplicates element: [end of test] number of renders 1`] = `6`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "mouse", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": false, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> `; <mask> <mask> exports[`regression tests selecting 'Send backward' in context menu sends element backward: [end of test] number of elements 1`] = `2`; <mask> <mask> exports[`regression tests selecting 'Send backward' in context menu sends element backward: [end of test] number of renders 1`] = `11`; <mask> <mask> exports[`regression tests selecting 'Send to back' in context menu sends element to back: [end of test] appState 1`] = ` <mask> Object { <mask> "appearance": "light", <mask> "collaborators": Map {}, </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests selecting 'Send to back' in context menu sends element to back: [end of test] number of renders 1`] = `11`; </s> add exports[`regression tests selecting 'Send to back' in context menu sends element to back: [end of test] number of renders 1`] = `10`; </s> remove exports[`regression tests selecting 'Paste styles' in context menu pastes styles: [end of test] number of renders 1`] = `21`; </s> add exports[`regression tests selecting 'Paste styles' in context menu pastes styles: [end of test] number of renders 1`] = `20`; </s> remove exports[`regression tests selecting 'Bring forward' in context menu brings element forward: [end of test] number of renders 1`] = `12`; </s> add exports[`regression tests selecting 'Bring forward' in context menu brings element forward: [end of test] number of renders 1`] = `11`; </s> remove exports[`regression tests selecting 'Bring to front' in context menu brings element to front: [end of test] number of renders 1`] = `12`; </s> add exports[`regression tests selecting 'Bring to front' in context menu brings element to front: [end of test] number of renders 1`] = `11`; </s> remove exports[`regression tests selecting 'Add to library' in context menu adds element to library: [end of test] number of renders 1`] = `6`; </s> add exports[`regression tests selecting 'Add to library' in context menu adds element to library: [end of test] number of renders 1`] = `5`; </s> remove exports[`regression tests selecting 'Duplicate' in context menu duplicates element: [end of test] number of renders 1`] = `7`; </s> add exports[`regression tests selecting 'Duplicate' in context menu duplicates element: [end of test] number of renders 1`] = `6`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "mouse", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": false, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> `; <mask> <mask> exports[`regression tests selecting 'Send to back' in context menu sends element to back: [end of test] number of elements 1`] = `2`; <mask> <mask> exports[`regression tests selecting 'Send to back' in context menu sends element to back: [end of test] number of renders 1`] = `11`; <mask> <mask> exports[`regression tests selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] appState 1`] = ` <mask> Object { <mask> "appearance": "light", <mask> "collaborators": Map {}, </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests selecting 'Send backward' in context menu sends element backward: [end of test] number of renders 1`] = `11`; </s> add exports[`regression tests selecting 'Send backward' in context menu sends element backward: [end of test] number of renders 1`] = `10`; </s> remove exports[`regression tests selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] number of renders 1`] = `14`; </s> add exports[`regression tests selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] number of renders 1`] = `13`; </s> remove exports[`regression tests selecting 'Paste styles' in context menu pastes styles: [end of test] number of renders 1`] = `21`; </s> add exports[`regression tests selecting 'Paste styles' in context menu pastes styles: [end of test] number of renders 1`] = `20`; </s> remove exports[`regression tests selecting 'Bring to front' in context menu brings element to front: [end of test] number of renders 1`] = `12`; </s> add exports[`regression tests selecting 'Bring to front' in context menu brings element to front: [end of test] number of renders 1`] = `11`; </s> remove exports[`regression tests selecting 'Bring forward' in context menu brings element forward: [end of test] number of renders 1`] = `12`; </s> add exports[`regression tests selecting 'Bring forward' in context menu brings element forward: [end of test] number of renders 1`] = `11`; </s> remove exports[`regression tests selecting 'Group selection' in context menu groups selected elements: [end of test] number of renders 1`] = `13`; </s> add exports[`regression tests selecting 'Group selection' in context menu groups selected elements: [end of test] number of renders 1`] = `12`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "mouse", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": false, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> `; <mask> <mask> exports[`regression tests selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] number of elements 1`] = `2`; <mask> <mask> exports[`regression tests selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] number of renders 1`] = `14`; <mask> <mask> exports[`regression tests shift click on selected element should deselect it on pointer up: [end of test] appState 1`] = ` <mask> Object { <mask> "appearance": "light", <mask> "collaborators": Map {}, </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests selecting 'Send to back' in context menu sends element to back: [end of test] number of renders 1`] = `11`; </s> add exports[`regression tests selecting 'Send to back' in context menu sends element to back: [end of test] number of renders 1`] = `10`; </s> remove exports[`regression tests shows 'Ungroup selection' in context menu for group inside selected elements: [end of test] number of renders 1`] = `15`; </s> add exports[`regression tests shows 'Ungroup selection' in context menu for group inside selected elements: [end of test] number of renders 1`] = `14`; </s> remove exports[`regression tests selecting 'Group selection' in context menu groups selected elements: [end of test] number of renders 1`] = `13`; </s> add exports[`regression tests selecting 'Group selection' in context menu groups selected elements: [end of test] number of renders 1`] = `12`; </s> remove exports[`regression tests shift click on selected element should deselect it on pointer up: [end of test] number of renders 1`] = `8`; </s> add exports[`regression tests shift click on selected element should deselect it on pointer up: [end of test] number of renders 1`] = `7`; </s> remove exports[`regression tests shows 'Group selection' in context menu for multiple selected elements: [end of test] number of renders 1`] = `14`; </s> add exports[`regression tests shows 'Group selection' in context menu for multiple selected elements: [end of test] number of renders 1`] = `13`; </s> remove exports[`regression tests selecting 'Duplicate' in context menu duplicates element: [end of test] number of renders 1`] = `7`; </s> add exports[`regression tests selecting 'Duplicate' in context menu duplicates element: [end of test] number of renders 1`] = `6`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "mouse", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": false, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> `; <mask> <mask> exports[`regression tests shift click on selected element should deselect it on pointer up: [end of test] number of elements 1`] = `1`; <mask> <mask> exports[`regression tests shift click on selected element should deselect it on pointer up: [end of test] number of renders 1`] = `8`; <mask> <mask> exports[`regression tests shift-click to multiselect, then drag: [end of test] appState 1`] = ` <mask> Object { <mask> "appearance": "light", <mask> "collaborators": Map {}, </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] number of renders 1`] = `14`; </s> add exports[`regression tests selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] number of renders 1`] = `13`; </s> remove exports[`regression tests switches selected element on pointer down: [end of test] number of renders 1`] = `11`; </s> add exports[`regression tests switches selected element on pointer down: [end of test] number of renders 1`] = `10`; </s> remove exports[`regression tests switches from group of selected elements to another element on pointer down: [end of test] number of renders 1`] = `17`; </s> add exports[`regression tests switches from group of selected elements to another element on pointer down: [end of test] number of renders 1`] = `16`; </s> remove exports[`regression tests shift-click to multiselect, then drag: [end of test] number of renders 1`] = `17`; </s> add exports[`regression tests shift-click to multiselect, then drag: [end of test] number of renders 1`] = `16`; </s> remove exports[`regression tests deselects selected element, on pointer up, when click hits element bounding box but doesn't hit the element: [end of test] number of renders 1`] = `8`; </s> add exports[`regression tests deselects selected element, on pointer up, when click hits element bounding box but doesn't hit the element: [end of test] number of renders 1`] = `7`; </s> remove exports[`regression tests click on an element and drag it: [dragged] number of renders 1`] = `9`; </s> add exports[`regression tests click on an element and drag it: [dragged] number of renders 1`] = `8`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "mouse", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": false, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> `; <mask> <mask> exports[`regression tests shift-click to multiselect, then drag: [end of test] number of elements 1`] = `2`; <mask> <mask> exports[`regression tests shift-click to multiselect, then drag: [end of test] number of renders 1`] = `17`; <mask> <mask> exports[`regression tests should show fill icons when element has non transparent background: [end of test] appState 1`] = ` <mask> Object { <mask> "appearance": "light", <mask> "collaborators": Map {}, </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests should show fill icons when element has non transparent background: [end of test] number of renders 1`] = `10`; </s> add exports[`regression tests should show fill icons when element has non transparent background: [end of test] number of renders 1`] = `9`; </s> remove exports[`regression tests shift click on selected element should deselect it on pointer up: [end of test] number of renders 1`] = `8`; </s> add exports[`regression tests shift click on selected element should deselect it on pointer up: [end of test] number of renders 1`] = `7`; </s> remove exports[`regression tests pinch-to-zoom works: [end of test] number of renders 1`] = `8`; </s> add exports[`regression tests pinch-to-zoom works: [end of test] number of renders 1`] = `7`; </s> remove exports[`regression tests supports nested groups: [end of test] number of renders 1`] = `30`; </s> add exports[`regression tests supports nested groups: [end of test] number of renders 1`] = `29`; </s> remove exports[`regression tests switches selected element on pointer down: [end of test] number of renders 1`] = `11`; </s> add exports[`regression tests switches selected element on pointer down: [end of test] number of renders 1`] = `10`; </s> remove exports[`regression tests two-finger scroll works: [end of test] number of renders 1`] = `10`; </s> add exports[`regression tests two-finger scroll works: [end of test] number of renders 1`] = `9`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "mouse", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": false, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> `; <mask> <mask> exports[`regression tests should show fill icons when element has non transparent background: [end of test] number of elements 1`] = `1`; <mask> <mask> exports[`regression tests should show fill icons when element has non transparent background: [end of test] number of renders 1`] = `10`; <mask> <mask> exports[`regression tests shows 'Group selection' in context menu for multiple selected elements: [end of test] appState 1`] = ` <mask> Object { <mask> "appearance": "light", <mask> "collaborators": Map {}, </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests shift-click to multiselect, then drag: [end of test] number of renders 1`] = `17`; </s> add exports[`regression tests shift-click to multiselect, then drag: [end of test] number of renders 1`] = `16`; </s> remove exports[`regression tests shows 'Group selection' in context menu for multiple selected elements: [end of test] number of renders 1`] = `14`; </s> add exports[`regression tests shows 'Group selection' in context menu for multiple selected elements: [end of test] number of renders 1`] = `13`; </s> remove exports[`regression tests shows 'Ungroup selection' in context menu for group inside selected elements: [end of test] number of renders 1`] = `15`; </s> add exports[`regression tests shows 'Ungroup selection' in context menu for group inside selected elements: [end of test] number of renders 1`] = `14`; </s> remove exports[`regression tests selecting 'Group selection' in context menu groups selected elements: [end of test] number of renders 1`] = `13`; </s> add exports[`regression tests selecting 'Group selection' in context menu groups selected elements: [end of test] number of renders 1`] = `12`; </s> remove exports[`regression tests shows context menu for element: [end of test] number of renders 1`] = `6`; </s> add exports[`regression tests shows context menu for element: [end of test] number of renders 1`] = `5`; </s> remove exports[`regression tests shows context menu for canvas: [end of test] number of renders 1`] = `2`; </s> add exports[`regression tests shows context menu for canvas: [end of test] number of renders 1`] = `1`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "mouse", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": false, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> `; <mask> <mask> exports[`regression tests shows 'Group selection' in context menu for multiple selected elements: [end of test] number of elements 1`] = `2`; <mask> <mask> exports[`regression tests shows 'Group selection' in context menu for multiple selected elements: [end of test] number of renders 1`] = `14`; <mask> <mask> exports[`regression tests shows 'Ungroup selection' in context menu for group inside selected elements: [end of test] appState 1`] = ` <mask> Object { <mask> "appearance": "light", <mask> "collaborators": Map {}, </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests shows 'Ungroup selection' in context menu for group inside selected elements: [end of test] number of renders 1`] = `15`; </s> add exports[`regression tests shows 'Ungroup selection' in context menu for group inside selected elements: [end of test] number of renders 1`] = `14`; </s> remove exports[`regression tests selecting 'Group selection' in context menu groups selected elements: [end of test] number of renders 1`] = `13`; </s> add exports[`regression tests selecting 'Group selection' in context menu groups selected elements: [end of test] number of renders 1`] = `12`; </s> remove exports[`regression tests shows context menu for canvas: [end of test] number of renders 1`] = `2`; </s> add exports[`regression tests shows context menu for canvas: [end of test] number of renders 1`] = `1`; </s> remove exports[`regression tests selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] number of renders 1`] = `14`; </s> add exports[`regression tests selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] number of renders 1`] = `13`; </s> remove exports[`regression tests selecting 'Duplicate' in context menu duplicates element: [end of test] number of renders 1`] = `7`; </s> add exports[`regression tests selecting 'Duplicate' in context menu duplicates element: [end of test] number of renders 1`] = `6`; </s> remove exports[`regression tests shows context menu for element: [end of test] number of renders 1`] = `6`; </s> add exports[`regression tests shows context menu for element: [end of test] number of renders 1`] = `5`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "mouse", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": false, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> `; <mask> <mask> exports[`regression tests shows 'Ungroup selection' in context menu for group inside selected elements: [end of test] number of elements 1`] = `2`; <mask> <mask> exports[`regression tests shows 'Ungroup selection' in context menu for group inside selected elements: [end of test] number of renders 1`] = `15`; <mask> <mask> exports[`regression tests shows context menu for canvas: [end of test] appState 1`] = ` <mask> Object { <mask> "appearance": "light", <mask> "collaborators": Map {}, </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests shows 'Group selection' in context menu for multiple selected elements: [end of test] number of renders 1`] = `14`; </s> add exports[`regression tests shows 'Group selection' in context menu for multiple selected elements: [end of test] number of renders 1`] = `13`; </s> remove exports[`regression tests shows context menu for canvas: [end of test] number of renders 1`] = `2`; </s> add exports[`regression tests shows context menu for canvas: [end of test] number of renders 1`] = `1`; </s> remove exports[`regression tests shows context menu for element: [end of test] number of renders 1`] = `6`; </s> add exports[`regression tests shows context menu for element: [end of test] number of renders 1`] = `5`; </s> remove exports[`regression tests selecting 'Group selection' in context menu groups selected elements: [end of test] number of renders 1`] = `13`; </s> add exports[`regression tests selecting 'Group selection' in context menu groups selected elements: [end of test] number of renders 1`] = `12`; </s> remove exports[`regression tests selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] number of renders 1`] = `14`; </s> add exports[`regression tests selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] number of renders 1`] = `13`; </s> remove exports[`regression tests selecting 'Duplicate' in context menu duplicates element: [end of test] number of renders 1`] = `7`; </s> add exports[`regression tests selecting 'Duplicate' in context menu duplicates element: [end of test] number of renders 1`] = `6`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "mouse", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": false, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> `; <mask> <mask> exports[`regression tests shows context menu for canvas: [end of test] number of elements 1`] = `0`; <mask> <mask> exports[`regression tests shows context menu for canvas: [end of test] number of renders 1`] = `2`; <mask> <mask> exports[`regression tests shows context menu for element: [end of test] appState 1`] = ` <mask> Object { <mask> "appearance": "light", <mask> "collaborators": Map {}, </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests shows 'Ungroup selection' in context menu for group inside selected elements: [end of test] number of renders 1`] = `15`; </s> add exports[`regression tests shows 'Ungroup selection' in context menu for group inside selected elements: [end of test] number of renders 1`] = `14`; </s> remove exports[`regression tests shows context menu for element: [end of test] number of renders 1`] = `6`; </s> add exports[`regression tests shows context menu for element: [end of test] number of renders 1`] = `5`; </s> remove exports[`regression tests shows 'Group selection' in context menu for multiple selected elements: [end of test] number of renders 1`] = `14`; </s> add exports[`regression tests shows 'Group selection' in context menu for multiple selected elements: [end of test] number of renders 1`] = `13`; </s> remove exports[`regression tests selecting 'Duplicate' in context menu duplicates element: [end of test] number of renders 1`] = `7`; </s> add exports[`regression tests selecting 'Duplicate' in context menu duplicates element: [end of test] number of renders 1`] = `6`; </s> remove exports[`regression tests selecting 'Delete' in context menu deletes element: [end of test] number of renders 1`] = `7`; </s> add exports[`regression tests selecting 'Delete' in context menu deletes element: [end of test] number of renders 1`] = `6`; </s> remove exports[`regression tests selecting 'Copy styles' in context menu copies styles: [end of test] number of renders 1`] = `6`; </s> add exports[`regression tests selecting 'Copy styles' in context menu copies styles: [end of test] number of renders 1`] = `5`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "mouse", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": false, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> `; <mask> <mask> exports[`regression tests shows context menu for element: [end of test] number of elements 1`] = `1`; <mask> <mask> exports[`regression tests shows context menu for element: [end of test] number of renders 1`] = `6`; <mask> <mask> exports[`regression tests single-clicking on a subgroup of a selected group should not alter selection: [end of test] appState 1`] = ` <mask> Object { <mask> "appearance": "light", <mask> "collaborators": Map {}, </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests shows context menu for canvas: [end of test] number of renders 1`] = `2`; </s> add exports[`regression tests shows context menu for canvas: [end of test] number of renders 1`] = `1`; </s> remove exports[`regression tests single-clicking on a subgroup of a selected group should not alter selection: [end of test] number of renders 1`] = `36`; </s> add exports[`regression tests single-clicking on a subgroup of a selected group should not alter selection: [end of test] number of renders 1`] = `35`; </s> remove exports[`regression tests shows 'Ungroup selection' in context menu for group inside selected elements: [end of test] number of renders 1`] = `15`; </s> add exports[`regression tests shows 'Ungroup selection' in context menu for group inside selected elements: [end of test] number of renders 1`] = `14`; </s> remove exports[`regression tests shows 'Group selection' in context menu for multiple selected elements: [end of test] number of renders 1`] = `14`; </s> add exports[`regression tests shows 'Group selection' in context menu for multiple selected elements: [end of test] number of renders 1`] = `13`; </s> remove exports[`regression tests selecting 'Delete' in context menu deletes element: [end of test] number of renders 1`] = `7`; </s> add exports[`regression tests selecting 'Delete' in context menu deletes element: [end of test] number of renders 1`] = `6`; </s> remove exports[`regression tests selecting 'Duplicate' in context menu duplicates element: [end of test] number of renders 1`] = `7`; </s> add exports[`regression tests selecting 'Duplicate' in context menu duplicates element: [end of test] number of renders 1`] = `6`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "mouse", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": false, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> `; <mask> <mask> exports[`regression tests single-clicking on a subgroup of a selected group should not alter selection: [end of test] number of elements 1`] = `4`; <mask> <mask> exports[`regression tests single-clicking on a subgroup of a selected group should not alter selection: [end of test] number of renders 1`] = `36`; <mask> <mask> exports[`regression tests spacebar + drag scrolls the canvas: [end of test] appState 1`] = ` <mask> Object { <mask> "appearance": "light", <mask> "collaborators": Map {}, </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests shows context menu for element: [end of test] number of renders 1`] = `6`; </s> add exports[`regression tests shows context menu for element: [end of test] number of renders 1`] = `5`; </s> remove exports[`regression tests spacebar + drag scrolls the canvas: [end of test] number of renders 1`] = `5`; </s> add exports[`regression tests spacebar + drag scrolls the canvas: [end of test] number of renders 1`] = `4`; </s> remove exports[`regression tests shift click on selected element should deselect it on pointer up: [end of test] number of renders 1`] = `8`; </s> add exports[`regression tests shift click on selected element should deselect it on pointer up: [end of test] number of renders 1`] = `7`; </s> remove exports[`regression tests switches selected element on pointer down: [end of test] number of renders 1`] = `11`; </s> add exports[`regression tests switches selected element on pointer down: [end of test] number of renders 1`] = `10`; </s> remove exports[`regression tests switches from group of selected elements to another element on pointer down: [end of test] number of renders 1`] = `17`; </s> add exports[`regression tests switches from group of selected elements to another element on pointer down: [end of test] number of renders 1`] = `16`; </s> remove exports[`regression tests make a group and duplicate it: [end of test] number of renders 1`] = `21`; </s> add exports[`regression tests make a group and duplicate it: [end of test] number of renders 1`] = `20`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "mouse", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": false, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> `; <mask> <mask> exports[`regression tests spacebar + drag scrolls the canvas: [end of test] number of elements 1`] = `0`; <mask> <mask> exports[`regression tests spacebar + drag scrolls the canvas: [end of test] number of renders 1`] = `5`; <mask> <mask> exports[`regression tests supports nested groups: [end of test] appState 1`] = ` <mask> Object { <mask> "appearance": "light", <mask> "collaborators": Map {}, </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests single-clicking on a subgroup of a selected group should not alter selection: [end of test] number of renders 1`] = `36`; </s> add exports[`regression tests single-clicking on a subgroup of a selected group should not alter selection: [end of test] number of renders 1`] = `35`; </s> remove exports[`regression tests supports nested groups: [end of test] number of renders 1`] = `30`; </s> add exports[`regression tests supports nested groups: [end of test] number of renders 1`] = `29`; </s> remove exports[`regression tests shows context menu for canvas: [end of test] number of renders 1`] = `2`; </s> add exports[`regression tests shows context menu for canvas: [end of test] number of renders 1`] = `1`; </s> remove exports[`regression tests pinch-to-zoom works: [end of test] number of renders 1`] = `8`; </s> add exports[`regression tests pinch-to-zoom works: [end of test] number of renders 1`] = `7`; </s> remove exports[`regression tests two-finger scroll works: [end of test] number of renders 1`] = `10`; </s> add exports[`regression tests two-finger scroll works: [end of test] number of renders 1`] = `9`; </s> remove exports[`regression tests rerenders UI on language change: [end of test] number of renders 1`] = `5`; </s> add exports[`regression tests rerenders UI on language change: [end of test] number of renders 1`] = `4`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "mouse", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": false, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> `; <mask> <mask> exports[`regression tests supports nested groups: [end of test] number of elements 1`] = `3`; <mask> <mask> exports[`regression tests supports nested groups: [end of test] number of renders 1`] = `30`; <mask> <mask> exports[`regression tests switches from group of selected elements to another element on pointer down: [end of test] appState 1`] = ` <mask> Object { <mask> "appearance": "light", <mask> "collaborators": Map {}, </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests switches from group of selected elements to another element on pointer down: [end of test] number of renders 1`] = `17`; </s> add exports[`regression tests switches from group of selected elements to another element on pointer down: [end of test] number of renders 1`] = `16`; </s> remove exports[`regression tests switches selected element on pointer down: [end of test] number of renders 1`] = `11`; </s> add exports[`regression tests switches selected element on pointer down: [end of test] number of renders 1`] = `10`; </s> remove exports[`regression tests spacebar + drag scrolls the canvas: [end of test] number of renders 1`] = `5`; </s> add exports[`regression tests spacebar + drag scrolls the canvas: [end of test] number of renders 1`] = `4`; </s> remove exports[`regression tests shift click on selected element should deselect it on pointer up: [end of test] number of renders 1`] = `8`; </s> add exports[`regression tests shift click on selected element should deselect it on pointer up: [end of test] number of renders 1`] = `7`; </s> remove exports[`regression tests pinch-to-zoom works: [end of test] number of renders 1`] = `8`; </s> add exports[`regression tests pinch-to-zoom works: [end of test] number of renders 1`] = `7`; </s> remove exports[`regression tests undo/redo drawing an element: [end of test] number of renders 1`] = `27`; </s> add exports[`regression tests undo/redo drawing an element: [end of test] number of renders 1`] = `26`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "mouse", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": false, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> `; <mask> <mask> exports[`regression tests switches from group of selected elements to another element on pointer down: [end of test] number of elements 1`] = `3`; <mask> <mask> exports[`regression tests switches from group of selected elements to another element on pointer down: [end of test] number of renders 1`] = `17`; <mask> <mask> exports[`regression tests switches selected element on pointer down: [end of test] appState 1`] = ` <mask> Object { <mask> "appearance": "light", <mask> "collaborators": Map {}, </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests switches selected element on pointer down: [end of test] number of renders 1`] = `11`; </s> add exports[`regression tests switches selected element on pointer down: [end of test] number of renders 1`] = `10`; </s> remove exports[`regression tests supports nested groups: [end of test] number of renders 1`] = `30`; </s> add exports[`regression tests supports nested groups: [end of test] number of renders 1`] = `29`; </s> remove exports[`regression tests shift click on selected element should deselect it on pointer up: [end of test] number of renders 1`] = `8`; </s> add exports[`regression tests shift click on selected element should deselect it on pointer up: [end of test] number of renders 1`] = `7`; </s> remove exports[`regression tests deselects selected element, on pointer up, when click hits element bounding box but doesn't hit the element: [end of test] number of renders 1`] = `8`; </s> add exports[`regression tests deselects selected element, on pointer up, when click hits element bounding box but doesn't hit the element: [end of test] number of renders 1`] = `7`; </s> remove exports[`regression tests selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] number of renders 1`] = `14`; </s> add exports[`regression tests selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] number of renders 1`] = `13`; </s> remove exports[`regression tests single-clicking on a subgroup of a selected group should not alter selection: [end of test] number of renders 1`] = `36`; </s> add exports[`regression tests single-clicking on a subgroup of a selected group should not alter selection: [end of test] number of renders 1`] = `35`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "mouse", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": false, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> `; <mask> <mask> exports[`regression tests switches selected element on pointer down: [end of test] number of elements 1`] = `2`; <mask> <mask> exports[`regression tests switches selected element on pointer down: [end of test] number of renders 1`] = `11`; <mask> <mask> exports[`regression tests two-finger scroll works: [end of test] appState 1`] = ` <mask> Object { <mask> "appearance": "light", <mask> "collaborators": Map {}, </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests switches from group of selected elements to another element on pointer down: [end of test] number of renders 1`] = `17`; </s> add exports[`regression tests switches from group of selected elements to another element on pointer down: [end of test] number of renders 1`] = `16`; </s> remove exports[`regression tests supports nested groups: [end of test] number of renders 1`] = `30`; </s> add exports[`regression tests supports nested groups: [end of test] number of renders 1`] = `29`; </s> remove exports[`regression tests two-finger scroll works: [end of test] number of renders 1`] = `10`; </s> add exports[`regression tests two-finger scroll works: [end of test] number of renders 1`] = `9`; </s> remove exports[`regression tests shift click on selected element should deselect it on pointer up: [end of test] number of renders 1`] = `8`; </s> add exports[`regression tests shift click on selected element should deselect it on pointer up: [end of test] number of renders 1`] = `7`; </s> remove exports[`regression tests selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] number of renders 1`] = `14`; </s> add exports[`regression tests selecting 'Ungroup selection' in context menu ungroups selected group: [end of test] number of renders 1`] = `13`; </s> remove exports[`regression tests pinch-to-zoom works: [end of test] number of renders 1`] = `8`; </s> add exports[`regression tests pinch-to-zoom works: [end of test] number of renders 1`] = `7`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "touch", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": true, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> `; <mask> <mask> exports[`regression tests two-finger scroll works: [end of test] number of elements 1`] = `0`; <mask> <mask> exports[`regression tests two-finger scroll works: [end of test] number of renders 1`] = `10`; <mask> <mask> exports[`regression tests undo/redo drawing an element: [end of test] appState 1`] = ` <mask> Object { <mask> "appearance": "light", <mask> "collaborators": Map {}, </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests undo/redo drawing an element: [end of test] number of renders 1`] = `27`; </s> add exports[`regression tests undo/redo drawing an element: [end of test] number of renders 1`] = `26`; </s> remove exports[`regression tests switches selected element on pointer down: [end of test] number of renders 1`] = `11`; </s> add exports[`regression tests switches selected element on pointer down: [end of test] number of renders 1`] = `10`; </s> remove exports[`regression tests pinch-to-zoom works: [end of test] number of renders 1`] = `8`; </s> add exports[`regression tests pinch-to-zoom works: [end of test] number of renders 1`] = `7`; </s> remove exports[`regression tests shows context menu for canvas: [end of test] number of renders 1`] = `2`; </s> add exports[`regression tests shows context menu for canvas: [end of test] number of renders 1`] = `1`; </s> remove exports[`regression tests updates fontSize & fontFamily appState: [end of test] number of renders 1`] = `4`; </s> add exports[`regression tests updates fontSize & fontFamily appState: [end of test] number of renders 1`] = `3`; </s> remove exports[`regression tests rerenders UI on language change: [end of test] number of renders 1`] = `5`; </s> add exports[`regression tests rerenders UI on language change: [end of test] number of renders 1`] = `4`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "mouse", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": false, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> `; <mask> <mask> exports[`regression tests undo/redo drawing an element: [end of test] number of elements 1`] = `3`; <mask> <mask> exports[`regression tests undo/redo drawing an element: [end of test] number of renders 1`] = `27`; <mask> <mask> exports[`regression tests updates fontSize & fontFamily appState: [end of test] appState 1`] = ` <mask> Object { <mask> "appearance": "light", <mask> "collaborators": Map {}, </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests updates fontSize & fontFamily appState: [end of test] number of renders 1`] = `4`; </s> add exports[`regression tests updates fontSize & fontFamily appState: [end of test] number of renders 1`] = `3`; </s> remove exports[`regression tests two-finger scroll works: [end of test] number of renders 1`] = `10`; </s> add exports[`regression tests two-finger scroll works: [end of test] number of renders 1`] = `9`; </s> remove exports[`regression tests selecting 'Delete' in context menu deletes element: [end of test] number of renders 1`] = `7`; </s> add exports[`regression tests selecting 'Delete' in context menu deletes element: [end of test] number of renders 1`] = `6`; </s> remove exports[`regression tests shows context menu for element: [end of test] number of renders 1`] = `6`; </s> add exports[`regression tests shows context menu for element: [end of test] number of renders 1`] = `5`; </s> remove exports[`regression tests selecting 'Duplicate' in context menu duplicates element: [end of test] number of renders 1`] = `7`; </s> add exports[`regression tests selecting 'Duplicate' in context menu duplicates element: [end of test] number of renders 1`] = `6`; </s> remove exports[`regression tests shows context menu for canvas: [end of test] number of renders 1`] = `2`; </s> add exports[`regression tests shows context menu for canvas: [end of test] number of renders 1`] = `1`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "mouse", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": false, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> `; <mask> <mask> exports[`regression tests updates fontSize & fontFamily appState: [end of test] number of elements 1`] = `0`; <mask> <mask> exports[`regression tests updates fontSize & fontFamily appState: [end of test] number of renders 1`] = `4`; <mask> <mask> exports[`regression tests zoom hotkeys: [end of test] appState 1`] = ` <mask> Object { <mask> "appearance": "light", <mask> "collaborators": Map {}, </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests undo/redo drawing an element: [end of test] number of renders 1`] = `27`; </s> add exports[`regression tests undo/redo drawing an element: [end of test] number of renders 1`] = `26`; </s> remove exports[`regression tests zoom hotkeys: [end of test] number of renders 1`] = `4`; </s> add exports[`regression tests zoom hotkeys: [end of test] number of renders 1`] = `3`; </s> remove exports[`regression tests pinch-to-zoom works: [end of test] number of renders 1`] = `8`; </s> add exports[`regression tests pinch-to-zoom works: [end of test] number of renders 1`] = `7`; </s> remove exports[`regression tests two-finger scroll works: [end of test] number of renders 1`] = `10`; </s> add exports[`regression tests two-finger scroll works: [end of test] number of renders 1`] = `9`; </s> remove exports[`regression tests spacebar + drag scrolls the canvas: [end of test] number of renders 1`] = `5`; </s> add exports[`regression tests spacebar + drag scrolls the canvas: [end of test] number of renders 1`] = `4`; </s> remove exports[`regression tests rerenders UI on language change: [end of test] number of renders 1`] = `5`; </s> add exports[`regression tests rerenders UI on language change: [end of test] number of renders 1`] = `4`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "fileHandle": null, <mask> "gridSize": null, <mask> "height": 768, <mask> "isBindingEnabled": true, <mask> "isCollaborating": false, <mask> "isLibraryOpen": false, <mask> "isLoading": false, <mask> "isResizing": false, <mask> "isRotating": false, <mask> "lastPointerDownWith": "mouse", </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace keep keep keep keep keep
<mask> "shouldCacheIgnoreZoom": false, <mask> "showShortcutsDialog": false, <mask> "startBoundElement": null, <mask> "suggestedBindings": Array [], <mask> "username": "", <mask> "viewBackgroundColor": "#ffffff", <mask> "width": 1024, <mask> "zenModeEnabled": false, <mask> "zoom": Object { <mask> "translation": Object { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep keep replace
<mask> `; <mask> <mask> exports[`regression tests zoom hotkeys: [end of test] number of elements 1`] = `0`; <mask> <mask> exports[`regression tests zoom hotkeys: [end of test] number of renders 1`] = `4`; </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove exports[`regression tests updates fontSize & fontFamily appState: [end of test] number of renders 1`] = `4`; </s> add exports[`regression tests updates fontSize & fontFamily appState: [end of test] number of renders 1`] = `3`; </s> remove exports[`regression tests spacebar + drag scrolls the canvas: [end of test] number of renders 1`] = `5`; </s> add exports[`regression tests spacebar + drag scrolls the canvas: [end of test] number of renders 1`] = `4`; </s> remove exports[`regression tests pinch-to-zoom works: [end of test] number of renders 1`] = `8`; </s> add exports[`regression tests pinch-to-zoom works: [end of test] number of renders 1`] = `7`; </s> remove exports[`regression tests rerenders UI on language change: [end of test] number of renders 1`] = `5`; </s> add exports[`regression tests rerenders UI on language change: [end of test] number of renders 1`] = `4`; </s> remove exports[`regression tests two-finger scroll works: [end of test] number of renders 1`] = `10`; </s> add exports[`regression tests two-finger scroll works: [end of test] number of renders 1`] = `9`; </s> remove exports[`regression tests shows context menu for canvas: [end of test] number of renders 1`] = `2`; </s> add exports[`regression tests shows context menu for canvas: [end of test] number of renders 1`] = `1`;
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/__snapshots__/regressionTests.test.tsx.snap
keep keep keep replace keep keep keep keep keep
<mask> import React from "react"; <mask> import ReactDOM from "react-dom"; <mask> import { render } from "./test-utils"; <mask> import App from "../components/App"; <mask> import { setLanguage } from "../i18n"; <mask> import { UI, Pointer, Keyboard } from "./helpers/ui"; <mask> import { API } from "./helpers/api"; <mask> import { KEYS } from "../keys"; <mask> import { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove import App from "../components/App"; </s> add import ExcalidrawApp from "../excalidraw-app"; </s> remove import App from "../components/App"; </s> add import ExcalidrawApp from "../excalidraw-app"; </s> remove import App from "../components/App"; </s> add import ExcalidrawApp from "../excalidraw-app"; </s> remove import App from "../components/App"; </s> add import ExcalidrawApp from "../excalidraw-app"; </s> remove import App from "../components/App"; </s> add import ExcalidrawApp from "../excalidraw-app"; </s> remove import App from "../components/App"; </s> add import ExcalidrawApp from "../excalidraw-app";
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace replace replace replace replace replace replace replace keep keep keep keep keep
<mask> const { h } = window; <mask> <mask> const mouse = new Pointer("mouse"); <mask> <mask> beforeEach(async () => { <mask> // Unmount ReactDOM from root <mask> ReactDOM.unmountComponentAtNode(document.getElementById("root")!); <mask> mouse.reset(); <mask> <mask> await setLanguage("en.json"); <mask> render(<App />); <mask> }); <mask> <mask> const createAndSelectTwoRectangles = () => { <mask> UI.clickTool("rectangle"); <mask> mouse.down(); <mask> mouse.up(100, 100); <mask> </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove beforeEach(() => { render(<App />); </s> add beforeEach(async () => { await render(<ExcalidrawApp />); </s> remove it("aligns two objects correctly to the top", () => { createAndSelectTwoRectangles(); </s> add describe("aligning", () => { beforeEach(async () => { // Unmount ReactDOM from root ReactDOM.unmountComponentAtNode(document.getElementById("root")!); mouse.reset(); </s> remove it("rectangle", () => { const { getByToolName, container } = render(<App />); </s> add it("rectangle", async () => { const { getByToolName, container } = await render(<ExcalidrawApp />); </s> remove it("rectangle", () => { const { getByToolName, container } = render(<App />); </s> add it("rectangle", async () => { const { getByToolName, container } = await render(<ExcalidrawApp />); </s> remove beforeEach(() => { </s> add beforeEach(async () => { </s> remove it("rectangle", () => { const { getByToolName, container } = render(<App />); </s> add it("rectangle", async () => { const { getByToolName, container } = await render(<ExcalidrawApp />);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace keep keep keep keep keep
<mask> mouse.click(); <mask> }); <mask> }; <mask> <mask> it("aligns two objects correctly to the top", () => { <mask> createAndSelectTwoRectangles(); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(110); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove it("aligns two objects correctly to the bottom", () => { createAndSelectTwoRectangles(); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> remove it("aligns two objects correctly to the right", () => { createAndSelectTwoRectangles(); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> remove it("aligns two objects correctly to the left", () => { createAndSelectTwoRectangles(); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(0); }); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add it("aligns two objects correctly to the top", () => { createAndSelectTwoRectangles(); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_UP); </s> add await setLanguage("en.json"); await render(<ExcalidrawApp />);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep replace replace replace replace replace replace replace replace keep keep replace replace replace keep keep keep
<mask> createAndSelectTwoRectangles(); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(110); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> <mask> Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { <mask> Keyboard.keyPress(KEYS.ARROW_UP); <mask> }); <mask> <mask> // Check if x position did not change <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(110); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(0); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_DOWN); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(0); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> add // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> add // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove h.app.actionManager.executeAction(actionAlignVerticallyCentered); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_RIGHT); }); </s> remove Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_RIGHT); </s> add // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep replace replace replace keep replace replace keep keep keep
<mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(0); <mask> }); <mask> <mask> it("aligns two objects correctly to the bottom", () => { <mask> createAndSelectTwoRectangles(); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(110); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove it("aligns two objects correctly to the right", () => { createAndSelectTwoRectangles(); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> remove it("aligns two objects correctly to the left", () => { createAndSelectTwoRectangles(); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> remove // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add it("aligns two objects correctly to the top", () => { createAndSelectTwoRectangles(); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_UP); }); </s> remove // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); }); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace keep keep keep keep keep
<mask> <mask> it("aligns two objects correctly to the bottom", () => { <mask> createAndSelectTwoRectangles(); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(110); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> <mask> Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_LEFT); }); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_DOWN); }); </s> remove // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add it("aligns two objects correctly to the bottom", () => { createAndSelectTwoRectangles(); </s> remove expect(API.getSelectedElements()[0].x).toEqual(110); expect(API.getSelectedElements()[1].x).toEqual(110); // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); }); it("centers two objects with different sizes correctly vertically", () => { createAndSelectTwoRectanglesWithDifferentSizes(); </s> add it("aligns two objects correctly to the right", () => { createAndSelectTwoRectangles(); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_UP); </s> add await setLanguage("en.json"); await render(<ExcalidrawApp />); </s> remove // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add it("aligns two objects correctly to the top", () => { createAndSelectTwoRectangles();
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep replace replace keep keep keep keep keep keep keep keep replace replace keep keep
<mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(110); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> <mask> Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { <mask> Keyboard.keyPress(KEYS.ARROW_DOWN); <mask> }); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> <mask> Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { <mask> Keyboard.keyPress(KEYS.ARROW_DOWN); <mask> }); <mask> </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_DOWN); }); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_LEFT); }); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_UP); }); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(0); </s> remove Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_LEFT); </s> add expect(API.getSelectedElements()[0].y).toEqual(110); expect(API.getSelectedElements()[1].y).toEqual(110);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep replace replace replace keep replace replace replace keep keep keep
<mask> }); <mask> <mask> // Check if x position did not change <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(110); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(110); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> }); <mask> <mask> it("aligns two objects correctly to the left", () => { <mask> createAndSelectTwoRectangles(); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(0); }); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); }); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove expect(API.getSelectedElements()[0].y).toEqual(60); expect(API.getSelectedElements()[1].y).toEqual(55); }); </s> add // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); }); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_UP); </s> add await setLanguage("en.json"); await render(<ExcalidrawApp />); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(0); </s> add it("aligns two objects correctly to the left", () => { createAndSelectTwoRectangles();
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace keep keep keep keep keep
<mask> expect(API.getSelectedElements()[0].y).toEqual(110); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> }); <mask> <mask> it("aligns two objects correctly to the left", () => { <mask> createAndSelectTwoRectangles(); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(110); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove expect(API.getSelectedElements()[0].y).toEqual(110); expect(API.getSelectedElements()[1].y).toEqual(110); }); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove it("aligns two objects correctly to the right", () => { createAndSelectTwoRectangles(); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> remove it("aligns two objects correctly to the bottom", () => { createAndSelectTwoRectangles(); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_DOWN); }); </s> remove // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); }); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add it("aligns two objects correctly to the bottom", () => { createAndSelectTwoRectangles();
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace keep keep keep keep keep
<mask> <mask> it("aligns two objects correctly to the left", () => { <mask> createAndSelectTwoRectangles(); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(110); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> <mask> Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_LEFT); }); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_UP); }); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(0); </s> add it("aligns two objects correctly to the left", () => { createAndSelectTwoRectangles(); </s> remove expect(API.getSelectedElements()[0].x).toEqual(110); expect(API.getSelectedElements()[1].x).toEqual(110); // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); }); it("centers two objects with different sizes correctly vertically", () => { createAndSelectTwoRectanglesWithDifferentSizes(); </s> add it("aligns two objects correctly to the right", () => { createAndSelectTwoRectangles(); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_UP); </s> add await setLanguage("en.json"); await render(<ExcalidrawApp />); </s> remove // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add it("aligns two objects correctly to the bottom", () => { createAndSelectTwoRectangles();
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep replace replace keep keep keep keep keep keep keep keep replace replace keep keep
<mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> <mask> Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { <mask> Keyboard.keyPress(KEYS.ARROW_LEFT); <mask> }); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> <mask> Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { <mask> Keyboard.keyPress(KEYS.ARROW_LEFT); <mask> }); <mask> </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_LEFT); }); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_DOWN); }); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_UP); }); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(0); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(0); </s> add it("aligns two objects correctly to the left", () => { createAndSelectTwoRectangles();
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace keep keep keep keep keep
<mask> Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { <mask> Keyboard.keyPress(KEYS.ARROW_LEFT); <mask> }); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(0); <mask> <mask> // Check if y position did not change <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> }); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> add // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_RIGHT); </s> add // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> remove Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_DOWN); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(0); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> add // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove h.app.actionManager.executeAction(actionAlignVerticallyCentered); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_RIGHT); }); </s> remove Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_LEFT); </s> add expect(API.getSelectedElements()[0].y).toEqual(110); expect(API.getSelectedElements()[1].y).toEqual(110);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace replace replace keep replace replace keep
<mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(0); <mask> <mask> // Check if y position did not change <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> }); <mask> <mask> it("aligns two objects correctly to the right", () => { <mask> createAndSelectTwoRectangles(); <mask> </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace keep keep keep keep keep
<mask> <mask> it("aligns two objects correctly to the right", () => { <mask> createAndSelectTwoRectangles(); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(110); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> <mask> Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_DOWN); }); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_UP); }); </s> remove expect(API.getSelectedElements()[0].x).toEqual(110); expect(API.getSelectedElements()[1].x).toEqual(110); // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); }); it("centers two objects with different sizes correctly vertically", () => { createAndSelectTwoRectanglesWithDifferentSizes(); </s> add it("aligns two objects correctly to the right", () => { createAndSelectTwoRectangles(); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_UP); </s> add await setLanguage("en.json"); await render(<ExcalidrawApp />); </s> remove // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add it("aligns two objects correctly to the bottom", () => { createAndSelectTwoRectangles(); </s> remove it("aligns two objects correctly to the right", () => { createAndSelectTwoRectangles(); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep replace replace keep keep keep keep keep keep keep keep replace replace keep
<mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(110); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> <mask> Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { <mask> Keyboard.keyPress(KEYS.ARROW_RIGHT); <mask> }); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> <mask> Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { <mask> Keyboard.keyPress(KEYS.ARROW_RIGHT); <mask> }); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove h.app.actionManager.executeAction(actionAlignVerticallyCentered); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_RIGHT); }); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_UP); }); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_DOWN); }); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_LEFT); }); </s> remove Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_LEFT); </s> add expect(API.getSelectedElements()[0].y).toEqual(110); expect(API.getSelectedElements()[1].y).toEqual(110);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
<mask> Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { <mask> Keyboard.keyPress(KEYS.ARROW_RIGHT); <mask> }); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(110); <mask> expect(API.getSelectedElements()[1].x).toEqual(110); <mask> <mask> // Check if y position did not change <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> }); <mask> <mask> it("centers two objects with different sizes correctly vertically", () => { <mask> createAndSelectTwoRectanglesWithDifferentSizes(); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(110); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_RIGHT); </s> add // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> remove expect(API.getSelectedElements()[0].y).toEqual(60); expect(API.getSelectedElements()[1].y).toEqual(55); }); </s> add // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); }); </s> remove h.app.actionManager.executeAction(actionAlignVerticallyCentered); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_RIGHT); }); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> add // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> add // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace keep keep keep keep keep
<mask> <mask> it("centers two objects with different sizes correctly vertically", () => { <mask> createAndSelectTwoRectanglesWithDifferentSizes(); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(110); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> <mask> h.app.actionManager.executeAction(actionAlignVerticallyCentered); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove it("centers two objects with different sizes correctly horizontally", () => { createAndSelectTwoRectanglesWithDifferentSizes(); </s> add it("centers two objects with different sizes correctly vertically", () => { createAndSelectTwoRectanglesWithDifferentSizes(); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove expect(API.getSelectedElements()[0].x).toEqual(110); expect(API.getSelectedElements()[1].x).toEqual(110); // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); }); it("centers two objects with different sizes correctly vertically", () => { createAndSelectTwoRectanglesWithDifferentSizes(); </s> add it("aligns two objects correctly to the right", () => { createAndSelectTwoRectangles(); </s> remove expect(API.getSelectedElements()[0].y).toEqual(60); expect(API.getSelectedElements()[1].y).toEqual(55); }); </s> add // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); }); </s> remove const createAndSelectGroupAndRectangle = () => { UI.clickTool("rectangle"); mouse.down(); mouse.up(100, 100); </s> add it("centers two objects with different sizes correctly horizontally", () => { createAndSelectTwoRectanglesWithDifferentSizes(); </s> remove it("aligns two objects correctly to the right", () => { createAndSelectTwoRectangles(); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace keep keep keep keep keep
<mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(110); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> <mask> h.app.actionManager.executeAction(actionAlignVerticallyCentered); <mask> <mask> // Check if x position did not change <mask> expect(API.getSelectedElements()[0].x).toEqual(0); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove expect(API.getSelectedElements()[0].x).toEqual(60); expect(API.getSelectedElements()[1].x).toEqual(55); </s> add // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add expect(API.getSelectedElements()[0].x).toEqual(110); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove h.app.actionManager.executeAction(actionAlignVerticallyCentered); </s> add Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_RIGHT); }); </s> remove expect(API.getSelectedElements()[0].y).toEqual(60); expect(API.getSelectedElements()[1].y).toEqual(55); }); </s> add // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); }); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> add // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> add // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep replace keep replace replace replace keep keep keep keep
<mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> <mask> h.app.actionManager.executeAction(actionAlignVerticallyCentered); <mask> <mask> // Check if x position did not change <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(110); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(60); <mask> expect(API.getSelectedElements()[1].y).toEqual(55); <mask> }); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove expect(API.getSelectedElements()[0].y).toEqual(60); expect(API.getSelectedElements()[1].y).toEqual(55); }); </s> add // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); }); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> remove expect(API.getSelectedElements()[0].x).toEqual(60); expect(API.getSelectedElements()[1].x).toEqual(55); </s> add // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> add // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> add // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep replace replace replace keep replace replace keep keep
<mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(110); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(60); <mask> expect(API.getSelectedElements()[1].y).toEqual(55); <mask> }); <mask> <mask> it("centers two objects with different sizes correctly horizontally", () => { <mask> createAndSelectTwoRectanglesWithDifferentSizes(); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove expect(API.getSelectedElements()[0].x).toEqual(110); expect(API.getSelectedElements()[1].x).toEqual(110); // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); }); it("centers two objects with different sizes correctly vertically", () => { createAndSelectTwoRectanglesWithDifferentSizes(); </s> add it("aligns two objects correctly to the right", () => { createAndSelectTwoRectangles(); </s> remove const createAndSelectGroupAndRectangle = () => { UI.clickTool("rectangle"); mouse.down(); mouse.up(100, 100); </s> add it("centers two objects with different sizes correctly horizontally", () => { createAndSelectTwoRectanglesWithDifferentSizes(); </s> remove // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add expect(API.getSelectedElements()[0].x).toEqual(110); expect(API.getSelectedElements()[1].x).toEqual(110);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace keep keep keep keep keep
<mask> <mask> it("centers two objects with different sizes correctly horizontally", () => { <mask> createAndSelectTwoRectanglesWithDifferentSizes(); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(110); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> <mask> h.app.actionManager.executeAction(actionAlignHorizontallyCentered); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove it("centers two objects with different sizes correctly horizontally", () => { createAndSelectTwoRectanglesWithDifferentSizes(); </s> add it("centers two objects with different sizes correctly vertically", () => { createAndSelectTwoRectanglesWithDifferentSizes(); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove expect(API.getSelectedElements()[0].y).toEqual(60); expect(API.getSelectedElements()[1].y).toEqual(55); }); </s> add // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); }); </s> remove const createAndSelectGroupAndRectangle = () => { UI.clickTool("rectangle"); mouse.down(); mouse.up(100, 100); </s> add it("centers two objects with different sizes correctly horizontally", () => { createAndSelectTwoRectanglesWithDifferentSizes(); </s> remove expect(API.getSelectedElements()[0].x).toEqual(110); expect(API.getSelectedElements()[1].x).toEqual(110); // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); }); it("centers two objects with different sizes correctly vertically", () => { createAndSelectTwoRectanglesWithDifferentSizes(); </s> add it("aligns two objects correctly to the right", () => { createAndSelectTwoRectangles(); </s> remove it("aligns two objects correctly to the right", () => { createAndSelectTwoRectangles(); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace keep keep keep keep keep
<mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(110); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> <mask> h.app.actionManager.executeAction(actionAlignHorizontallyCentered); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(60); <mask> expect(API.getSelectedElements()[1].x).toEqual(55); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove expect(API.getSelectedElements()[0].x).toEqual(60); expect(API.getSelectedElements()[1].x).toEqual(55); </s> add // Check if x position did not change expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove h.app.actionManager.executeAction(actionAlignHorizontallyCentered); </s> add h.app.actionManager.executeAction(actionAlignVerticallyCentered); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); }); </s> add expect(API.getSelectedElements()[0].y).toEqual(60); expect(API.getSelectedElements()[1].y).toEqual(55); }); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> remove it("aligns two objects correctly to the right", () => { createAndSelectTwoRectangles(); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep replace keep replace replace keep keep
<mask> <mask> h.app.actionManager.executeAction(actionAlignHorizontallyCentered); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(60); <mask> expect(API.getSelectedElements()[1].x).toEqual(55); <mask> <mask> // Check if y position did not change </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); }); </s> add expect(API.getSelectedElements()[0].y).toEqual(60); expect(API.getSelectedElements()[1].y).toEqual(55); }); </s> remove expect(API.getSelectedElements()[0].y).toEqual(60); expect(API.getSelectedElements()[1].y).toEqual(55); }); </s> add // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); }); </s> remove Keyboard.withModifierKeys({ ctrl: true, shift: true }, () => { Keyboard.keyPress(KEYS.ARROW_RIGHT); </s> add // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> remove // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); }); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace replace replace keep replace replace replace replace
<mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(60); <mask> expect(API.getSelectedElements()[1].x).toEqual(55); <mask> <mask> // Check if y position did not change <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(110); <mask> }); <mask> <mask> const createAndSelectGroupAndRectangle = () => { <mask> UI.clickTool("rectangle"); <mask> mouse.down(); <mask> mouse.up(100, 100); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace replace keep replace replace replace replace replace replace keep keep keep keep
<mask> UI.clickTool("rectangle"); <mask> mouse.down(); <mask> mouse.up(100, 100); <mask> <mask> UI.clickTool("rectangle"); <mask> mouse.down(0, 0); <mask> mouse.up(100, 100); <mask> <mask> // Select the first element. <mask> // The second rectangle is already reselected because it was the last element created <mask> mouse.reset(); <mask> Keyboard.withModifierKeys({ shift: true }, () => { <mask> mouse.click(); <mask> }); <mask> <mask> h.app.actionManager.executeAction(actionGroup); <mask> <mask> mouse.reset(); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove UI.clickTool("rectangle"); mouse.down(0, 0); mouse.up(100, 100); // Select the first element. // The second rectangle is already selected because it was the last element created mouse.reset(); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); </s> add expect(API.getSelectedElements()[0].y).toEqual(50); expect(API.getSelectedElements()[1].y).toEqual(150); expect(API.getSelectedElements()[2].y).toEqual(100); </s> remove const createAndSelectNestedGroupAndRectangle = () => { UI.clickTool("rectangle"); mouse.down(); mouse.up(100, 100); UI.clickTool("rectangle"); mouse.down(0, 0); mouse.up(100, 100); </s> add h.app.actionManager.executeAction(actionAlignVerticallyCentered); </s> remove // Select the first element. // The second rectangle is already reselected because it was the last element created mouse.reset(); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); </s> add expect(API.getSelectedElements()[0].y).toEqual(100); expect(API.getSelectedElements()[1].y).toEqual(200); expect(API.getSelectedElements()[2].y).toEqual(100); expect(API.getSelectedElements()[3].y).toEqual(200); </s> remove h.app.actionManager.executeAction(actionGroup); // Select the first group. // The second group is already selected because it was the last group created mouse.reset(); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); </s> add const createAndSelectTwoGroups = () => { UI.clickTool("rectangle"); mouse.down(); mouse.up(100, 100); UI.clickTool("rectangle"); mouse.down(0, 0); mouse.up(100, 100); // Select the first element. // The second rectangle is already selected because it was the last element created mouse.reset(); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); h.app.actionManager.executeAction(actionGroup); mouse.reset(); UI.clickTool("rectangle"); mouse.down(200, 200); mouse.up(100, 100); UI.clickTool("rectangle"); mouse.down(); mouse.up(100, 100); mouse.restorePosition(200, 200); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); h.app.actionManager.executeAction(actionGroup); // Select the first group. // The second group is already selected because it was the last group created mouse.reset(); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); }; it("aligns two groups correctly to the top", () => { createAndSelectTwoGroups(); expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(300); h.app.actionManager.executeAction(actionAlignTop); expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(0); expect(API.getSelectedElements()[3].y).toEqual(100); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(0); }); </s> add const createAndSelectNestedGroupAndRectangle = () => { UI.clickTool("rectangle"); mouse.down(); mouse.up(100, 100); UI.clickTool("rectangle"); mouse.down(0, 0); mouse.up(100, 100); // Select the first element. // The second rectangle is already reselected because it was the last element created mouse.reset(); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); // Create first group of rectangles h.app.actionManager.executeAction(actionGroup); mouse.reset(); UI.clickTool("rectangle"); mouse.down(200, 200); mouse.up(100, 100); // Add group to current selection mouse.restorePosition(0, 0); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); // Create the nested group h.app.actionManager.executeAction(actionGroup); mouse.reset(); UI.clickTool("rectangle"); mouse.down(300, 300); mouse.up(100, 100); // Select the nested group, the rectangle is already selected mouse.reset(); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); }; it("aligns nested group and other element correctly to the top", () => { createAndSelectNestedGroupAndRectangle(); expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(300); h.app.actionManager.executeAction(actionAlignTop); expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(0); });
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace keep replace replace replace replace keep keep keep
<mask> Keyboard.withModifierKeys({ shift: true }, () => { <mask> mouse.click(); <mask> }); <mask> <mask> h.app.actionManager.executeAction(actionGroup); <mask> <mask> mouse.reset(); <mask> UI.clickTool("rectangle"); <mask> mouse.down(200, 200); <mask> mouse.up(100, 100); <mask> <mask> // Add the created group to the current selection <mask> mouse.restorePosition(0, 0); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove // Create first group of rectangles h.app.actionManager.executeAction(actionGroup); mouse.reset(); UI.clickTool("rectangle"); mouse.down(200, 200); mouse.up(100, 100); // Add group to current selection mouse.restorePosition(0, 0); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); </s> add it("centers two groups correctly horizontally", () => { createAndSelectTwoGroups(); </s> remove // Add the created group to the current selection mouse.restorePosition(0, 0); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); </s> add // Check if y position did not change expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(110); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(0); }); </s> add const createAndSelectNestedGroupAndRectangle = () => { UI.clickTool("rectangle"); mouse.down(); mouse.up(100, 100); UI.clickTool("rectangle"); mouse.down(0, 0); mouse.up(100, 100); // Select the first element. // The second rectangle is already reselected because it was the last element created mouse.reset(); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); // Create first group of rectangles h.app.actionManager.executeAction(actionGroup); mouse.reset(); UI.clickTool("rectangle"); mouse.down(200, 200); mouse.up(100, 100); // Add group to current selection mouse.restorePosition(0, 0); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); // Create the nested group h.app.actionManager.executeAction(actionGroup); mouse.reset(); UI.clickTool("rectangle"); mouse.down(300, 300); mouse.up(100, 100); // Select the nested group, the rectangle is already selected mouse.reset(); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); }; it("aligns nested group and other element correctly to the top", () => { createAndSelectNestedGroupAndRectangle(); expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(300); h.app.actionManager.executeAction(actionAlignTop); expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(0); }); </s> remove h.app.actionManager.executeAction(actionGroup); // Select the first group. // The second group is already selected because it was the last group created mouse.reset(); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); </s> add const createAndSelectTwoGroups = () => { UI.clickTool("rectangle"); mouse.down(); mouse.up(100, 100); UI.clickTool("rectangle"); mouse.down(0, 0); mouse.up(100, 100); // Select the first element. // The second rectangle is already selected because it was the last element created mouse.reset(); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); h.app.actionManager.executeAction(actionGroup); mouse.reset(); UI.clickTool("rectangle"); mouse.down(200, 200); mouse.up(100, 100); UI.clickTool("rectangle"); mouse.down(); mouse.up(100, 100); mouse.restorePosition(200, 200); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); h.app.actionManager.executeAction(actionGroup); // Select the first group. // The second group is already selected because it was the last group created mouse.reset(); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); }; it("aligns two groups correctly to the top", () => { createAndSelectTwoGroups(); expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(300); h.app.actionManager.executeAction(actionAlignTop); expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(0); expect(API.getSelectedElements()[3].y).toEqual(100); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); </s> add // Add the created group to the current selection mouse.restorePosition(0, 0); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); };
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep replace replace replace replace keep replace keep
<mask> mouse.up(100, 100); <mask> <mask> // Add the created group to the current selection <mask> mouse.restorePosition(0, 0); <mask> Keyboard.withModifierKeys({ shift: true }, () => { <mask> mouse.click(); <mask> }); <mask> }; <mask> </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove mouse.reset(); UI.clickTool("rectangle"); mouse.down(200, 200); mouse.up(100, 100); </s> add expect(API.getSelectedElements()[0].x).toEqual(60); expect(API.getSelectedElements()[1].x).toEqual(55); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); </s> add // Add the created group to the current selection mouse.restorePosition(0, 0); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); }; </s> remove // Create first group of rectangles h.app.actionManager.executeAction(actionGroup); mouse.reset(); UI.clickTool("rectangle"); mouse.down(200, 200); mouse.up(100, 100); // Add group to current selection mouse.restorePosition(0, 0); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); </s> add it("centers two groups correctly horizontally", () => { createAndSelectTwoGroups(); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(0); }); </s> add const createAndSelectNestedGroupAndRectangle = () => { UI.clickTool("rectangle"); mouse.down(); mouse.up(100, 100); UI.clickTool("rectangle"); mouse.down(0, 0); mouse.up(100, 100); // Select the first element. // The second rectangle is already reselected because it was the last element created mouse.reset(); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); // Create first group of rectangles h.app.actionManager.executeAction(actionGroup); mouse.reset(); UI.clickTool("rectangle"); mouse.down(200, 200); mouse.up(100, 100); // Add group to current selection mouse.restorePosition(0, 0); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); // Create the nested group h.app.actionManager.executeAction(actionGroup); mouse.reset(); UI.clickTool("rectangle"); mouse.down(300, 300); mouse.up(100, 100); // Select the nested group, the rectangle is already selected mouse.reset(); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); }; it("aligns nested group and other element correctly to the top", () => { createAndSelectNestedGroupAndRectangle(); expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(300); h.app.actionManager.executeAction(actionAlignTop); expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(0); }); </s> remove h.app.actionManager.executeAction(actionGroup); // Select the first group. // The second group is already selected because it was the last group created mouse.reset(); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); </s> add const createAndSelectTwoGroups = () => { UI.clickTool("rectangle"); mouse.down(); mouse.up(100, 100); UI.clickTool("rectangle"); mouse.down(0, 0); mouse.up(100, 100); // Select the first element. // The second rectangle is already selected because it was the last element created mouse.reset(); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); h.app.actionManager.executeAction(actionGroup); mouse.reset(); UI.clickTool("rectangle"); mouse.down(200, 200); mouse.up(100, 100); UI.clickTool("rectangle"); mouse.down(); mouse.up(100, 100); mouse.restorePosition(200, 200); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); h.app.actionManager.executeAction(actionGroup); // Select the first group. // The second group is already selected because it was the last group created mouse.reset(); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); }; it("aligns two groups correctly to the top", () => { createAndSelectTwoGroups(); expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(300); h.app.actionManager.executeAction(actionAlignTop); expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(0); expect(API.getSelectedElements()[3].y).toEqual(100);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep replace replace keep keep keep keep keep keep keep keep replace replace replace keep keep
<mask> }; <mask> <mask> it("aligns a group with another element correctly to the top", () => { <mask> createAndSelectGroupAndRectangle(); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(100); <mask> expect(API.getSelectedElements()[2].y).toEqual(200); <mask> <mask> it("aligns a group with another element correctly to the top", () => { <mask> createAndSelectGroupAndRectangle(); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(100); <mask> expect(API.getSelectedElements()[2].y).toEqual(200); <mask> <mask> h.app.actionManager.executeAction(actionAlignTop); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove h.app.actionManager.executeAction(actionAlignBottom); </s> add it("aligns a group with another element correctly to the top", () => { createAndSelectGroupAndRectangle(); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(0); }); </s> add h.app.actionManager.executeAction(actionGroup); </s> remove expect(API.getSelectedElements()[0].y).toEqual(100); expect(API.getSelectedElements()[1].y).toEqual(200); expect(API.getSelectedElements()[2].y).toEqual(200); }); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); </s> remove h.app.actionManager.executeAction(actionAlignVerticallyCentered); </s> add it("aligns a group with another element correctly to the right", () => { createAndSelectGroupAndRectangle(); </s> remove it("aligns a group with another element correctly to the bottom", () => { createAndSelectGroupAndRectangle(); </s> add mouse.reset(); UI.clickTool("rectangle"); mouse.down(200, 200); mouse.up(100, 100);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace keep replace replace replace replace keep keep keep
<mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(100); <mask> expect(API.getSelectedElements()[2].y).toEqual(200); <mask> <mask> h.app.actionManager.executeAction(actionAlignTop); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(100); <mask> expect(API.getSelectedElements()[2].y).toEqual(0); <mask> }); <mask> <mask> it("aligns a group with another element correctly to the bottom", () => { <mask> createAndSelectGroupAndRectangle(); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]>
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace keep keep keep keep keep keep keep keep replace replace replace keep keep keep
<mask> expect(API.getSelectedElements()[1].y).toEqual(100); <mask> expect(API.getSelectedElements()[2].y).toEqual(0); <mask> }); <mask> <mask> it("aligns a group with another element correctly to the bottom", () => { <mask> createAndSelectGroupAndRectangle(); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(100); <mask> expect(API.getSelectedElements()[2].y).toEqual(200); <mask> <mask> it("aligns a group with another element correctly to the bottom", () => { <mask> createAndSelectGroupAndRectangle(); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(100); <mask> expect(API.getSelectedElements()[2].y).toEqual(200); <mask> <mask> h.app.actionManager.executeAction(actionAlignBottom); <mask> </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(0); }); </s> add h.app.actionManager.executeAction(actionGroup); </s> remove h.app.actionManager.executeAction(actionAlignBottom); </s> add it("aligns a group with another element correctly to the top", () => { createAndSelectGroupAndRectangle(); </s> remove expect(API.getSelectedElements()[0].y).toEqual(100); expect(API.getSelectedElements()[1].y).toEqual(200); expect(API.getSelectedElements()[2].y).toEqual(200); }); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); </s> add UI.clickTool("rectangle"); mouse.down(0, 0); mouse.up(100, 100); </s> remove h.app.actionManager.executeAction(actionAlignVerticallyCentered); </s> add it("aligns a group with another element correctly to the right", () => { createAndSelectGroupAndRectangle();
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(100); <mask> expect(API.getSelectedElements()[2].y).toEqual(200); <mask> <mask> h.app.actionManager.executeAction(actionAlignBottom); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(100); <mask> expect(API.getSelectedElements()[1].y).toEqual(200); <mask> expect(API.getSelectedElements()[2].y).toEqual(200); <mask> }); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove h.app.actionManager.executeAction(actionAlignBottom); </s> add h.app.actionManager.executeAction(actionAlignBottom); </s> remove expect(API.getSelectedElements()[0].y).toEqual(100); expect(API.getSelectedElements()[1].y).toEqual(200); expect(API.getSelectedElements()[2].y).toEqual(200); }); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(300); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(300); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(300); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(100); expect(API.getSelectedElements()[2].x).toEqual(0); expect(API.getSelectedElements()[3].x).toEqual(100); }); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); </s> add // Add the created group to the current selection mouse.restorePosition(0, 0); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); }; </s> remove h.app.actionManager.executeAction(actionAlignVerticallyCentered); </s> add it("aligns two groups correctly to the right", () => { createAndSelectTwoGroups();
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace replace replace keep replace replace keep keep
<mask> expect(API.getSelectedElements()[2].y).toEqual(200); <mask> <mask> h.app.actionManager.executeAction(actionAlignBottom); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(100); <mask> expect(API.getSelectedElements()[1].y).toEqual(200); <mask> expect(API.getSelectedElements()[2].y).toEqual(200); <mask> }); <mask> <mask> it("aligns a group with another element correctly to the left", () => { <mask> createAndSelectGroupAndRectangle(); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove h.app.actionManager.executeAction(actionAlignBottom); </s> add it("aligns a group with another element correctly to the top", () => { createAndSelectGroupAndRectangle(); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(100); expect(API.getSelectedElements()[2].x).toEqual(200); </s> add expect(API.getSelectedElements()[0].y).toEqual(100); expect(API.getSelectedElements()[1].y).toEqual(200); expect(API.getSelectedElements()[2].y).toEqual(200); }); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); </s> add // Add the created group to the current selection mouse.restorePosition(0, 0); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); }); }; </s> remove expect(API.getSelectedElements()[0].y).toEqual(100); expect(API.getSelectedElements()[1].y).toEqual(200); expect(API.getSelectedElements()[2].y).toEqual(300); expect(API.getSelectedElements()[3].y).toEqual(300); }); </s> add expect(API.getSelectedElements()[0].y).toEqual(100); expect(API.getSelectedElements()[1].y).toEqual(200); expect(API.getSelectedElements()[2].y).toEqual(300); expect(API.getSelectedElements()[3].y).toEqual(300); }); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(100); expect(API.getSelectedElements()[2].x).toEqual(0); }); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace replace keep keep keep keep keep keep keep replace
<mask> <mask> it("aligns a group with another element correctly to the left", () => { <mask> createAndSelectGroupAndRectangle(); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(100); <mask> expect(API.getSelectedElements()[2].x).toEqual(200); <mask> <mask> h.app.actionManager.executeAction(actionAlignLeft); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(100); <mask> expect(API.getSelectedElements()[2].x).toEqual(200); <mask> <mask> h.app.actionManager.executeAction(actionAlignLeft); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(100); expect(API.getSelectedElements()[2].x).toEqual(0); }); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(100); expect(API.getSelectedElements()[2].x).toEqual(200); expect(API.getSelectedElements()[3].x).toEqual(300); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(100); expect(API.getSelectedElements()[2].x).toEqual(200); expect(API.getSelectedElements()[3].x).toEqual(300); </s> remove h.app.actionManager.executeAction(actionAlignRight); </s> add it("aligns a group with another element correctly to the left", () => { createAndSelectGroupAndRectangle(); </s> remove it("aligns a group with another element correctly to the left", () => { createAndSelectGroupAndRectangle(); </s> add h.app.actionManager.executeAction(actionAlignTop); </s> remove it("aligns a group with another element correctly to the right", () => { createAndSelectGroupAndRectangle(); </s> add h.app.actionManager.executeAction(actionAlignBottom);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace replace replace keep replace replace keep
<mask> expect(API.getSelectedElements()[2].x).toEqual(200); <mask> <mask> h.app.actionManager.executeAction(actionAlignLeft); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(100); <mask> expect(API.getSelectedElements()[2].x).toEqual(0); <mask> }); <mask> <mask> it("aligns a group with another element correctly to the right", () => { <mask> createAndSelectGroupAndRectangle(); <mask> </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove h.app.actionManager.executeAction(actionAlignLeft); </s> add it("aligns a group with another element correctly to the bottom", () => { createAndSelectGroupAndRectangle(); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(100); expect(API.getSelectedElements()[2].x).toEqual(200); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(0); }); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(100); expect(API.getSelectedElements()[2].x).toEqual(200); </s> add expect(API.getSelectedElements()[0].y).toEqual(100); expect(API.getSelectedElements()[1].y).toEqual(200); expect(API.getSelectedElements()[2].y).toEqual(200); }); </s> remove h.app.actionManager.executeAction(actionAlignRight); </s> add it("aligns a group with another element correctly to the left", () => { createAndSelectGroupAndRectangle(); </s> remove it("aligns a group with another element correctly to the left", () => { createAndSelectGroupAndRectangle(); </s> add h.app.actionManager.executeAction(actionAlignTop);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep keep keep replace replace replace keep replace keep
<mask> <mask> it("aligns a group with another element correctly to the right", () => { <mask> createAndSelectGroupAndRectangle(); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(100); <mask> expect(API.getSelectedElements()[2].x).toEqual(200); <mask> <mask> h.app.actionManager.executeAction(actionAlignRight); <mask> </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove it("aligns a group with another element correctly to the right", () => { createAndSelectGroupAndRectangle(); </s> add h.app.actionManager.executeAction(actionAlignBottom); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(100); expect(API.getSelectedElements()[2].x).toEqual(0); }); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); </s> remove h.app.actionManager.executeAction(actionAlignLeft); </s> add it("aligns a group with another element correctly to the bottom", () => { createAndSelectGroupAndRectangle(); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(100); expect(API.getSelectedElements()[2].x).toEqual(200); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(0); }); </s> remove it("aligns a group with another element correctly to the left", () => { createAndSelectGroupAndRectangle(); </s> add h.app.actionManager.executeAction(actionAlignTop);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep replace replace replace replace keep replace replace keep keep
<mask> h.app.actionManager.executeAction(actionAlignRight); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(100); <mask> expect(API.getSelectedElements()[1].x).toEqual(200); <mask> expect(API.getSelectedElements()[2].x).toEqual(200); <mask> }); <mask> <mask> it("centers a group with another element correctly vertically", () => { <mask> createAndSelectGroupAndRectangle(); <mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove h.app.actionManager.executeAction(actionAlignRight); </s> add it("aligns a group with another element correctly to the left", () => { createAndSelectGroupAndRectangle(); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(100); expect(API.getSelectedElements()[2].x).toEqual(200); </s> add expect(API.getSelectedElements()[0].x).toEqual(100); expect(API.getSelectedElements()[1].x).toEqual(200); expect(API.getSelectedElements()[2].x).toEqual(200); }); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(100); expect(API.getSelectedElements()[2].x).toEqual(200); </s> add expect(API.getSelectedElements()[0].y).toEqual(100); expect(API.getSelectedElements()[1].y).toEqual(200); expect(API.getSelectedElements()[2].y).toEqual(200); }); </s> remove expect(API.getSelectedElements()[0].x).toEqual(100); expect(API.getSelectedElements()[1].x).toEqual(200); expect(API.getSelectedElements()[2].x).toEqual(300); expect(API.getSelectedElements()[3].x).toEqual(300); }); </s> add expect(API.getSelectedElements()[0].x).toEqual(100); expect(API.getSelectedElements()[1].x).toEqual(200); expect(API.getSelectedElements()[2].x).toEqual(300); expect(API.getSelectedElements()[3].x).toEqual(300); }); </s> remove it("centers a group with another element correctly horizontally", () => { createAndSelectGroupAndRectangle(); </s> add h.app.actionManager.executeAction(actionAlignRight);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep replace replace replace keep replace keep
<mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(0); <mask> expect(API.getSelectedElements()[1].y).toEqual(100); <mask> expect(API.getSelectedElements()[2].y).toEqual(200); <mask> <mask> h.app.actionManager.executeAction(actionAlignVerticallyCentered); <mask> </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(300); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(300); </s> remove h.app.actionManager.executeAction(actionAlignVerticallyCentered); </s> add h.app.actionManager.executeAction(actionAlignVerticallyCentered); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(300); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(100); expect(API.getSelectedElements()[2].x).toEqual(0); expect(API.getSelectedElements()[3].x).toEqual(100); }); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(300); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(300); </s> remove h.app.actionManager.executeAction(actionAlignVerticallyCentered); </s> add it("aligns two groups correctly to the right", () => { createAndSelectTwoGroups();
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep replace replace replace replace keep replace replace
<mask> <mask> expect(API.getSelectedElements()[0].y).toEqual(50); <mask> expect(API.getSelectedElements()[1].y).toEqual(150); <mask> expect(API.getSelectedElements()[2].y).toEqual(100); <mask> }); <mask> <mask> it("centers a group with another element correctly horizontally", () => { <mask> createAndSelectGroupAndRectangle(); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove h.app.actionManager.executeAction(actionAlignVerticallyCentered); </s> add it("aligns a group with another element correctly to the right", () => { createAndSelectGroupAndRectangle(); </s> remove expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(100); expect(API.getSelectedElements()[2].x).toEqual(0); }); </s> remove expect(API.getSelectedElements()[0].y).toEqual(50); expect(API.getSelectedElements()[1].y).toEqual(150); expect(API.getSelectedElements()[2].y).toEqual(250); expect(API.getSelectedElements()[3].y).toEqual(150); }); </s> add expect(API.getSelectedElements()[0].y).toEqual(50); expect(API.getSelectedElements()[1].y).toEqual(150); expect(API.getSelectedElements()[2].y).toEqual(250); expect(API.getSelectedElements()[3].y).toEqual(150); }); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(100); expect(API.getSelectedElements()[2].x).toEqual(200); </s> add expect(API.getSelectedElements()[0].x).toEqual(100); expect(API.getSelectedElements()[1].x).toEqual(200); expect(API.getSelectedElements()[2].x).toEqual(200); }); </s> remove h.app.actionManager.executeAction(actionGroup); </s> add it("centers a group with another element correctly horizontally", () => { createAndSelectGroupAndRectangle();
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep keep replace replace replace keep replace keep keep
<mask> createAndSelectGroupAndRectangle(); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(0); <mask> expect(API.getSelectedElements()[1].x).toEqual(100); <mask> expect(API.getSelectedElements()[2].x).toEqual(200); <mask> <mask> h.app.actionManager.executeAction(actionAlignHorizontallyCentered); <mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(50); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove h.app.actionManager.executeAction(actionAlignHorizontallyCentered); </s> add h.app.actionManager.executeAction(actionAlignHorizontallyCentered); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(100); expect(API.getSelectedElements()[2].x).toEqual(200); expect(API.getSelectedElements()[3].x).toEqual(300); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(100); expect(API.getSelectedElements()[2].x).toEqual(200); expect(API.getSelectedElements()[3].x).toEqual(300); </s> remove expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(100); expect(API.getSelectedElements()[2].x).toEqual(200); expect(API.getSelectedElements()[3].x).toEqual(300); </s> add expect(API.getSelectedElements()[0].x).toEqual(200); expect(API.getSelectedElements()[1].x).toEqual(300); expect(API.getSelectedElements()[2].x).toEqual(200); expect(API.getSelectedElements()[3].x).toEqual(300); }); </s> remove h.app.actionManager.executeAction(actionAlignLeft); </s> add it("aligns a group with another element correctly to the bottom", () => { createAndSelectGroupAndRectangle(); </s> remove expect(API.getSelectedElements()[0].x).toEqual(100); expect(API.getSelectedElements()[1].x).toEqual(200); expect(API.getSelectedElements()[2].x).toEqual(200); }); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(100); expect(API.getSelectedElements()[2].x).toEqual(200);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx
keep replace replace replace replace keep replace replace replace replace keep keep keep keep
<mask> <mask> expect(API.getSelectedElements()[0].x).toEqual(50); <mask> expect(API.getSelectedElements()[1].x).toEqual(150); <mask> expect(API.getSelectedElements()[2].x).toEqual(100); <mask> }); <mask> <mask> const createAndSelectTwoGroups = () => { <mask> UI.clickTool("rectangle"); <mask> mouse.down(); <mask> mouse.up(100, 100); <mask> <mask> UI.clickTool("rectangle"); <mask> mouse.down(0, 0); <mask> mouse.up(100, 100); </s> Factor out collaboration code (#2313) Co-authored-by: Lipis <[email protected]> Co-authored-by: dwelle <[email protected]> </s> remove const createAndSelectGroupAndRectangle = () => { UI.clickTool("rectangle"); mouse.down(); mouse.up(100, 100); </s> add it("centers two objects with different sizes correctly horizontally", () => { createAndSelectTwoRectanglesWithDifferentSizes(); </s> remove mouse.restorePosition(200, 200); Keyboard.withModifierKeys({ shift: true }, () => { mouse.click(); </s> add expect(API.getSelectedElements()[0].x).toEqual(50); expect(API.getSelectedElements()[1].x).toEqual(150); expect(API.getSelectedElements()[2].x).toEqual(100); </s> remove const createAndSelectNestedGroupAndRectangle = () => { UI.clickTool("rectangle"); mouse.down(); mouse.up(100, 100); UI.clickTool("rectangle"); mouse.down(0, 0); mouse.up(100, 100); </s> add h.app.actionManager.executeAction(actionAlignVerticallyCentered); </s> remove expect(API.getSelectedElements()[0].x).toEqual(100); expect(API.getSelectedElements()[1].x).toEqual(200); expect(API.getSelectedElements()[2].x).toEqual(100); expect(API.getSelectedElements()[3].x).toEqual(200); }); </s> add expect(API.getSelectedElements()[0].y).toEqual(0); expect(API.getSelectedElements()[1].y).toEqual(100); expect(API.getSelectedElements()[2].y).toEqual(200); expect(API.getSelectedElements()[3].y).toEqual(300); </s> remove UI.clickTool("rectangle"); mouse.down(0, 0); mouse.up(100, 100); </s> add expect(API.getSelectedElements()[0].x).toEqual(0); expect(API.getSelectedElements()[1].x).toEqual(110);
https://github.com/excalidraw/excalidraw/commit/e617ccc2521b46bc1e25a1a771019e09d12ea338
src/tests/align.test.tsx