Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/Magento/FunctionalTestingFramework/Util/TestGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -1866,4 +1866,19 @@ private function printRuleErrorToConsole($key, $tagName, $attributes)
$message .= '" can be use for action "' . $tagName . "\".\n";
print $message;
}

/**
* Go to a page and wait for ajax requests to finish
*
* @param string $page
* @throws \Exception
* @return void
*/
public function amOnPage($page)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume that the goal here was to override the WebDriver's definition of amOnPage correct? If so, this function belongs in MagentoWebDriver.php, where we provide custom functions and redefinitions of some of the base Codeception commands.

{
$url = Uri::appendPath($this->config['url'], $page);
$this->debugSection('GET', $url);
$this->webDriver->get($url);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of defining these three lines, you should just call parent::amOnPage($page) to prevent duplicate code (since we're not changing amOnPage behaviour, just adding to it).

$this->waitForPageLoad();
}
}