Add missing waits when finding elements in the acceptance tests
As no timeout was specified the elements were tried to be found just once. This caused the steps to fail if the elements did not appear yet in the page when they were tried to be found. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
48df1bef17
commit
f3a4ec723a
|
@ -74,7 +74,7 @@ class AppSettingsContext implements Context, ActorAwareInterface {
|
||||||
* @Given I open the settings
|
* @Given I open the settings
|
||||||
*/
|
*/
|
||||||
public function iOpenTheSettings() {
|
public function iOpenTheSettings() {
|
||||||
$this->actor->find(self::appSettingsOpenButton())->click();
|
$this->actor->find(self::appSettingsOpenButton(), 10)->click();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -84,11 +84,11 @@ class AppSettingsContext implements Context, ActorAwareInterface {
|
||||||
$locator = self::CheckboxInTheSettings($id);
|
$locator = self::CheckboxInTheSettings($id);
|
||||||
|
|
||||||
// If locator is not visible, fallback to label
|
// If locator is not visible, fallback to label
|
||||||
if (!$this->actor->find(self::CheckboxInTheSettings($id))->isVisible()) {
|
if (!$this->actor->find(self::CheckboxInTheSettings($id), 10)->isVisible()) {
|
||||||
$locator = self::checkboxLabelInTheSettings($id);
|
$locator = self::checkboxLabelInTheSettings($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->actor->find($locator)->click();
|
$this->actor->find($locator, 10)->click();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -209,7 +209,7 @@ class AppsManagementContext implements Context, ActorAwareInterface {
|
||||||
* @Given /^I see that the "([^"]*)" is disabled$/
|
* @Given /^I see that the "([^"]*)" is disabled$/
|
||||||
*/
|
*/
|
||||||
public function iSeeThatTheIsDisabled($bundle) {
|
public function iSeeThatTheIsDisabled($bundle) {
|
||||||
PHPUnit\Framework\Assert::assertEquals('Enable all', $this->actor->find(self::bundleButton($bundle))->getValue());
|
PHPUnit\Framework\Assert::assertEquals('Enable all', $this->actor->find(self::bundleButton($bundle), 2)->getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -176,21 +176,21 @@ class UsersSettingsContext implements Context, ActorAwareInterface {
|
||||||
* @When I click the New user button
|
* @When I click the New user button
|
||||||
*/
|
*/
|
||||||
public function iClickTheNewUserButton() {
|
public function iClickTheNewUserButton() {
|
||||||
$this->actor->find(self::newUserButton())->click();
|
$this->actor->find(self::newUserButton(), 10)->click();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @When I click the :action action in the :user actions menu
|
* @When I click the :action action in the :user actions menu
|
||||||
*/
|
*/
|
||||||
public function iClickTheAction($action, $user) {
|
public function iClickTheAction($action, $user) {
|
||||||
$this->actor->find(self::theAction($action, $user))->click();
|
$this->actor->find(self::theAction($action, $user), 10)->click();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @When I open the actions menu for the user :user
|
* @When I open the actions menu for the user :user
|
||||||
*/
|
*/
|
||||||
public function iOpenTheActionsMenuOf($user) {
|
public function iOpenTheActionsMenuOf($user) {
|
||||||
$this->actor->find(self::actionsMenuOf($user))->click();
|
$this->actor->find(self::actionsMenuOf($user), 10)->click();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue