Skip to content

Commit

Permalink
zoom before select
Browse files Browse the repository at this point in the history
  • Loading branch information
ruggi committed Dec 13, 2024
1 parent 7a4717a commit 3f79745
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export async function runGridMoveTest(
},
midDragCallback?: (editor: EditorRenderResult) => void,
) {
if (props.scale !== 1) {
await editor.dispatch([CanvasActions.zoom(props.scale)], true)
}

await selectComponentsForTest(editor, [EP.fromString(props.gridPath)])
const elementPathToDrag = EP.appendToPath(EP.fromString(props.gridPath), props.testId)
// trigger the grid controls so we know where to find the cells
Expand All @@ -42,10 +46,6 @@ export async function runGridMoveTest(

await selectComponentsForTest(editor, [elementPathToDrag])

if (props.scale !== 1) {
await editor.dispatch([CanvasActions.zoom(props.scale)], true)
}

await mouseDownAtPoint(sourceGridCell, dragFrom)
await mouseMoveToPoint(sourceGridCell, dragTo)
if (props.tab) {
Expand Down

0 comments on commit 3f79745

Please sign in to comment.