Skip to content

Commit d26a1c1

Browse files
committed
Added the 'waitForPageLoad' action after every 'amOnPage' action
1 parent bf24553 commit d26a1c1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Magento/FunctionalTestingFramework/Util/TestGenerator.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,4 +1866,18 @@ private function printRuleErrorToConsole($key, $tagName, $attributes)
18661866
$message .= '" can be use for action "' . $tagName . "\".\n";
18671867
print $message;
18681868
}
1869+
1870+
/**
1871+
* Go to a page and wait for ajax requests to finish
1872+
*
1873+
* @param string $page
1874+
* @throws \Exception
1875+
*/
1876+
public function amOnPage($page)
1877+
{
1878+
$url = Uri::appendPath($this->config['url'], $page);
1879+
$this->debugSection('GET', $url);
1880+
$this->webDriver->get($url);
1881+
$this->waitForPageLoad();
1882+
}
18691883
}

0 commit comments

Comments
 (0)