Skip to content

Commit

Permalink
E2E: Fix confirmValidDropZonePosition() when dropzone not ready (#46677)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla authored Dec 20, 2022
1 parent a12b449 commit 511428e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/e2e/specs/editor/blocks/paragraph.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,10 @@ class DraggingUtils {
// Check that both x and y axis of the dropzone
// have a less than 1 difference with a given target element
const box = await this.dropZone.boundingBox();
if ( ! box ) {
return false;
}

return (
Math.abs( element.x - box.x ) < 1 &&
Math.abs( element.y - box.y ) < 1
Expand Down

0 comments on commit 511428e

Please sign in to comment.