Skip to content

Commit

Permalink
Merge pull request #33792 from nextcloud/backport/stable23-wait-for-t…
Browse files Browse the repository at this point in the history
…he-new-user-form-to-be-visible-in-acceptance-tests

[stable23] Wait for the new user form to be visible in acceptance tests
  • Loading branch information
blizzz authored Sep 27, 2022
2 parents 067f62c + ee68e4c commit 2cd11e2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/acceptance/features/bootstrap/UsersSettingsContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,12 @@ public function iSeeThatTheListOfUsersDoesNotContainsTheUser($user) {
* @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");
}
}

/**
Expand Down

0 comments on commit 2cd11e2

Please sign in to comment.