From 5e0238ad41c7e5140237e8f110e7f50651f9ab1e Mon Sep 17 00:00:00 2001 From: John S Date: Thu, 11 Apr 2019 10:47:36 -0500 Subject: [PATCH] magento-pangolin/magento2-functional-testing-framework#MQE-1456: The 'amOnPage' action always waits for the full timeout value. - Adding new action to MagentoPwaWebDriver for "amOnPage". --- .../Module/MagentoPwaWebDriver.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/Magento/FunctionalTestingFramework/Module/MagentoPwaWebDriver.php b/src/Magento/FunctionalTestingFramework/Module/MagentoPwaWebDriver.php index 98b13fe90..36bfa3439 100644 --- a/src/Magento/FunctionalTestingFramework/Module/MagentoPwaWebDriver.php +++ b/src/Magento/FunctionalTestingFramework/Module/MagentoPwaWebDriver.php @@ -6,6 +6,8 @@ namespace Magento\FunctionalTestingFramework\Module; +use Codeception\Module\WebDriver; + /** * Class MagentoPwaActions * @@ -15,6 +17,21 @@ */ class MagentoPwaWebDriver extends MagentoWebDriver { + /** + * Go to the page. + * + * Overriding the MagentoWebDriver version because it contains 'waitForPageLoad'. + * The AJAX check in 'waitForPageLoad' does NOT work with a PWA. + * + * @param string $page + * @throws \Exception + * @return void + */ + public function amOnPage($page) + { + WebDriver::amOnPage($page); + } + /** * Wait for a PWA Element to NOT be visible using JavaScript. *