Skip to content

Commit 97a7e64

Browse files
authored
MQE-2133: Make tests green for Chrome 84
1 parent f815e78 commit 97a7e64

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,19 +761,25 @@ public function dragAndDrop($source, $target, $xOffset = null, $yOffset = null)
761761
$snodes = $this->matchFirstOrFail($this->baseElement, $source);
762762
$tnodes = $this->matchFirstOrFail($this->baseElement, $target);
763763
$action = new WebDriverActions($this->webDriver);
764-
765764
if ($xOffset !== null || $yOffset !== null) {
766765
$targetX = intval($tnodes->getLocation()->getX() + $xOffset);
767766
$targetY = intval($tnodes->getLocation()->getY() + $yOffset);
768-
769767
$travelX = intval($targetX - $snodes->getLocation()->getX());
770768
$travelY = intval($targetY - $snodes->getLocation()->getY());
771769
$action->moveToElement($snodes);
772770
$action->clickAndHold($snodes);
771+
// Fix Start
772+
$action->moveByOffset(-1,-1);
773+
$action->moveByOffset(1,1);
774+
// Fix End
773775
$action->moveByOffset($travelX, $travelY);
774776
$action->release()->perform();
775777
} else {
776778
$action->clickAndHold($snodes);
779+
// Fix Start
780+
$action->moveByOffset(-1,-1);
781+
$action->moveByOffset(1,1);
782+
// Fix End
777783
$action->moveToElement($tnodes);
778784
$action->release($tnodes)->perform();
779785
}

0 commit comments

Comments
 (0)