Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2022-09-01 13:46:37 +0300
committerJulius Härtl <jus@bitgrid.net>2022-09-01 15:15:43 +0300
commit76b0947022bbf6ebcf50dbe92a5116ee7e3de2a9 (patch)
tree478ebc9fc58c4e099522a5ed2cb199fbbc724057
parent3147585344eb2b1e7844e96e71a5888a7c3317c3 (diff)
Wait for the new user form to be visible
Before it was checked if the new user form was visible, but it was not waited for it. It seems that it can happen that the new user form is in the DOM, and therefore found, but not visible yet when the tests run, which caused them to (randomly) fail. Due to that now it is explicitly waited until it is visible, rather than assuming that it is visible as soon as it appears in the DOM. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r--tests/acceptance/features/bootstrap/UsersSettingsContext.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/acceptance/features/bootstrap/UsersSettingsContext.php b/tests/acceptance/features/bootstrap/UsersSettingsContext.php
index 074a9ff5f1a..4d17b3b5118 100644
--- a/tests/acceptance/features/bootstrap/UsersSettingsContext.php
+++ b/tests/acceptance/features/bootstrap/UsersSettingsContext.php
@@ -293,8 +293,12 @@ class UsersSettingsContext implements Context, ActorAwareInterface {
* @Then I see that the new user form is shown
*/
public function iSeeThatTheNewUserFormIsShown() {
- Assert::assertTrue(
- $this->actor->find(self::newUserForm(), 10)->isVisible());
+ if (!WaitFor::elementToBeEventuallyShown(
+ $this->actor,
+ self::newUserForm(),
+ $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
+ Assert::fail("The new user form is not shown yet after $timeout seconds");
+ }
}
/**