|
@@ -298,6 +298,21 @@ describe('Translate session', () => {
|
298
|
298
|
.updateSession([20, 20], false, false)
|
299
|
299
|
.updateSession([20, 20], false, true)
|
300
|
300
|
.completeSession()
|
|
301
|
+
|
|
302
|
+ expect(tlstate.shapes.filter((shape) => shape.type === TLDrawShapeType.Group).length).toBe(2)
|
|
303
|
+ })
|
|
304
|
+
|
|
305
|
+ it('deletes clones when not cloning anymore', () => {
|
|
306
|
+ tlstate
|
|
307
|
+ .loadDocument(mockDocument)
|
|
308
|
+ .select('rect1', 'rect2')
|
|
309
|
+ .group()
|
|
310
|
+ .startSession(SessionType.Translate, [10, 10])
|
|
311
|
+ .updateSession([20, 20], false, true)
|
|
312
|
+ .updateSession([20, 20], false, false)
|
|
313
|
+ .completeSession()
|
|
314
|
+
|
|
315
|
+ expect(tlstate.shapes.filter((shape) => shape.type === TLDrawShapeType.Group).length).toBe(1)
|
301
|
316
|
})
|
302
|
317
|
|
303
|
318
|
it('clones the shapes and children when selecting a group and a different shape', () => {
|