-
Notifications
You must be signed in to change notification settings - Fork 132
Added the 'waitForPageLoad' action after every 'amOnPage' action #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added the 'waitForPageLoad' action after every 'amOnPage' action #79
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two comments, the idea is solid but it just needs to be moved and trimmed a bit!
* @throws \Exception | ||
* @return void | ||
*/ | ||
public function amOnPage($page) |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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).
…ing-framework into waitforpageload-after-amonpage
Changes look great, thank you very much for your contribution! |
…2-functional-testing-framework-850 [Imported] 33309: Eliminated AspectMock usage from TestGeneratorTest.php
Description
Many times when various tests are running, there will be times when using the 'amOnPage' action, which will throw various errors due to the fact that some of the javascript elements, that the test is supposed to interact with, haven't loaded it. It might make sense to just automatically add the 'waitForPageLoad' action after the 'amOnPage' action.
Contribution checklist