()
| 87 | }) |
| 88 | |
| 89 | function getShapes() { |
| 90 | const arr = editor.getCurrentPageShapes() as any[] |
| 91 | |
| 92 | const results = { old: {}, new: {} } as { |
| 93 | old: Record<string, TLGeoShape | TLFrameShape> |
| 94 | new: Record<string, TLGeoShape | TLFrameShape> |
| 95 | } |
| 96 | |
| 97 | Object.entries(ids).map(([normalId, shapeId]) => { |
| 98 | const shape = editor.getShape(shapeId as any) as any |
| 99 | const newShape = arr.find((s) => s.id !== shapeId && s.props.w === shape?.props.w) |
| 100 | results.old[normalId] = shape |
| 101 | results.new[normalId] = newShape |
| 102 | }) |
| 103 | |
| 104 | return results |
| 105 | } |
| 106 | |
| 107 | it('Gets pasted shapes correctly', () => { |
| 108 | editor.select(ids.box1, ids.box2, ids.frame1, ids.box3) |
no test coverage detected
searching dependent graphs…