66
77namespace Magento \FunctionalTestingFramework \Module ;
88
9+ use Codeception \Module \WebDriver ;
10+
911/**
1012 * Class MagentoPwaActions
1113 *
1517 */
1618class MagentoPwaWebDriver extends MagentoWebDriver
1719{
20+ /**
21+ * Go to the page.
22+ *
23+ * Overriding the MagentoWebDriver version because it contains 'waitForPageLoad'.
24+ * The AJAX check in 'waitForPageLoad' does NOT work with a PWA.
25+ *
26+ * @param string $page
27+ * @throws \Exception
28+ * @return void
29+ */
30+ public function amOnPage ($ page )
31+ {
32+ WebDriver::amOnPage ($ page );
33+ }
34+
1835 /**
1936 * Wait for a PWA Element to NOT be visible using JavaScript.
37+ * Add the WAIT_TIMEOUT variable to your .env file for this action.
2038 *
2139 * @param null $selector
2240 * @param null $timeout
@@ -25,8 +43,6 @@ class MagentoPwaWebDriver extends MagentoWebDriver
2543 */
2644 public function waitForPwaElementNotVisible ($ selector , $ timeout = null )
2745 {
28- $ timeout = $ timeout ?? $ this ->_getConfig ()['pageload_timeout ' ];
29-
3046 // Determine what type of Selector is used.
3147 // Then use the correct JavaScript to locate the Element.
3248 if (\Codeception \Util \Locator::isXPath ($ selector )) {
@@ -38,6 +54,7 @@ public function waitForPwaElementNotVisible($selector, $timeout = null)
3854
3955 /**
4056 * Wait for a PWA Element to be visible using JavaScript.
57+ * Add the WAIT_TIMEOUT variable to your .env file for this action.
4158 *
4259 * @param null $selector
4360 * @param null $timeout
@@ -46,8 +63,6 @@ public function waitForPwaElementNotVisible($selector, $timeout = null)
4663 */
4764 public function waitForPwaElementVisible ($ selector , $ timeout = null )
4865 {
49- $ timeout = $ timeout ?? $ this ->_getConfig ()['pageload_timeout ' ];
50-
5166 // Determine what type of Selector is used.
5267 // Then use the correct JavaScript to locate the Element.
5368 if (\Codeception \Util \Locator::isXPath ($ selector )) {
0 commit comments