From 877c6902c60e69e30f748b7d4f9b190cf6417836 Mon Sep 17 00:00:00 2001 From: Soumya Unnikrishnan Date: Fri, 29 May 2020 12:06:39 -0500 Subject: [PATCH 1/4] MQE-2143: [chrome81] dragAndDrop with x and y offsets no longer works --- .../FunctionalTestingFramework/Module/MagentoWebDriver.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php index 5ee26cf92..a3870bee0 100644 --- a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php +++ b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php @@ -756,10 +756,7 @@ public function dragAndDrop($source, $target, $xOffset = null, $yOffset = null) $travelY = intval($targetY - $snodes->getLocation()->getY()); $action = new WebDriverActions($this->webDriver); - $action->moveToElement($snodes)->perform(); - $action->clickAndHold($snodes)->perform(); - $action->moveByOffset($travelX, $travelY)->perform(); - $action->release()->perform(); + $action->dragAndDropBy($snodes, $travelX, $travelY)->perform(); } else { parent::dragAndDrop($source, $target); } From 9d8385f9b85703d695e2590b4a0aef7c769211dc Mon Sep 17 00:00:00 2001 From: Soumya Unnikrishnan Date: Thu, 4 Jun 2020 11:33:07 -0500 Subject: [PATCH 2/4] MQE-2140: [chrome81] dragAndDrop with x and y offsets no longer works --- .../Module/MagentoWebDriver.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php index a3870bee0..9e1fd5b72 100644 --- a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php +++ b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php @@ -745,20 +745,22 @@ public function _before(TestInterface $test) */ public function dragAndDrop($source, $target, $xOffset = null, $yOffset = null) { - if ($xOffset !== null || $yOffset !== null) { - $snodes = $this->matchFirstOrFail($this->baseElement, $source); - $tnodes = $this->matchFirstOrFail($this->baseElement, $target); + $snodes = $this->matchFirstOrFail($this->baseElement, $source); + $tnodes = $this->matchFirstOrFail($this->baseElement, $target); + $action = new WebDriverActions($this->webDriver); + if ($xOffset !== null || $yOffset !== null) { $targetX = intval($tnodes->getLocation()->getX() + $xOffset); $targetY = intval($tnodes->getLocation()->getY() + $yOffset); $travelX = intval($targetX - $snodes->getLocation()->getX()); $travelY = intval($targetY - $snodes->getLocation()->getY()); - $action = new WebDriverActions($this->webDriver); $action->dragAndDropBy($snodes, $travelX, $travelY)->perform(); } else { - parent::dragAndDrop($source, $target); + $action->clickAndHold($snodes)->perform(); + $action->moveToElement($tnodes)->perform(); + $action->release($tnodes)->perform(); } } From d4c4d1e5821d931f6fbe9cc9e783d79666a0a747 Mon Sep 17 00:00:00 2001 From: Soumya Unnikrishnan Date: Thu, 4 Jun 2020 15:46:35 -0500 Subject: [PATCH 3/4] MQE-2140: [chrome81] dragAndDrop with x and y offsets no longer works --- .../Module/MagentoWebDriver.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php index cf88a9a8c..d0cf27434 100644 --- a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php +++ b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php @@ -754,11 +754,14 @@ public function dragAndDrop($source, $target, $xOffset = null, $yOffset = null) $travelX = intval($targetX - $snodes->getLocation()->getX()); $travelY = intval($targetY - $snodes->getLocation()->getY()); + $action->moveToElement($snodes); + $action->clickAndHold($snodes); + $action->moveByOffset($travelX, $travelY); + $action->release()->perform(); - $action->dragAndDropBy($snodes, $travelX, $travelY)->perform(); } else { - $action->clickAndHold($snodes)->perform(); - $action->moveToElement($tnodes)->perform(); + $action->clickAndHold($snodes); + $action->moveToElement($tnodes); $action->release($tnodes)->perform(); } } From 45b035438b13ebc150583dfd23aeb020bb1d462e Mon Sep 17 00:00:00 2001 From: Soumya Unnikrishnan Date: Fri, 5 Jun 2020 17:54:47 -0500 Subject: [PATCH 4/4] MQE-2140: [chrome81] dragAndDrop with x and y offsets no longer works --- .../FunctionalTestingFramework/Module/MagentoWebDriver.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php index d0cf27434..65e191dca 100644 --- a/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php +++ b/src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php @@ -758,7 +758,6 @@ public function dragAndDrop($source, $target, $xOffset = null, $yOffset = null) $action->clickAndHold($snodes); $action->moveByOffset($travelX, $travelY); $action->release()->perform(); - } else { $action->clickAndHold($snodes); $action->moveToElement($tnodes);