summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2021-01-17 17:39:35 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-03-08 07:55:40 +0000
commitf3a4ec723a96864ad2f0b8248da0e2579a8467f0 (patch)
treecfd65ed0b1f236c17e1a0d25afe047635e7a7607
parent48df1bef17800889d3ce0960fb7c44d190121899 (diff)
downloadnextcloud-server-f3a4ec723a96864ad2f0b8248da0e2579a8467f0.tar.gz
nextcloud-server-f3a4ec723a96864ad2f0b8248da0e2579a8467f0.zip
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>
-rw-r--r--tests/acceptance/features/bootstrap/AppSettingsContext.php6
-rw-r--r--tests/acceptance/features/bootstrap/AppsManagementContext.php2
-rw-r--r--tests/acceptance/features/bootstrap/UsersSettingsContext.php6
3 files changed, 7 insertions, 7 deletions
diff --git a/tests/acceptance/features/bootstrap/AppSettingsContext.php b/tests/acceptance/features/bootstrap/AppSettingsContext.php
index b2b6744a36b..d7ee4a2eb00 100644
--- a/tests/acceptance/features/bootstrap/AppSettingsContext.php
+++ b/tests/acceptance/features/bootstrap/AppSettingsContext.php
@@ -74,7 +74,7 @@ class AppSettingsContext implements Context, ActorAwareInterface {
* @Given I open the settings
*/
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);
// 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);
}
- $this->actor->find($locator)->click();
+ $this->actor->find($locator, 10)->click();
}
/**
diff --git a/tests/acceptance/features/bootstrap/AppsManagementContext.php b/tests/acceptance/features/bootstrap/AppsManagementContext.php
index 1f3b2dbe28a..d86b972c85b 100644
--- a/tests/acceptance/features/bootstrap/AppsManagementContext.php
+++ b/tests/acceptance/features/bootstrap/AppsManagementContext.php
@@ -209,7 +209,7 @@ class AppsManagementContext implements Context, ActorAwareInterface {
* @Given /^I see that the "([^"]*)" is disabled$/
*/
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());
}
/**
diff --git a/tests/acceptance/features/bootstrap/UsersSettingsContext.php b/tests/acceptance/features/bootstrap/UsersSettingsContext.php
index 020da466128..cc542bf2fc4 100644
--- a/tests/acceptance/features/bootstrap/UsersSettingsContext.php
+++ b/tests/acceptance/features/bootstrap/UsersSettingsContext.php
@@ -176,21 +176,21 @@ class UsersSettingsContext implements Context, ActorAwareInterface {
* @When I click the New user button
*/
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
*/
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
*/
public function iOpenTheActionsMenuOf($user) {
- $this->actor->find(self::actionsMenuOf($user))->click();
+ $this->actor->find(self::actionsMenuOf($user), 10)->click();
}
/**