Skip to content

Commit ec349fc

Browse files
authored
Merge pull request #33791 from nextcloud/backport/stable24-wait-for-the-new-user-form-to-be-visible-in-acceptance-tests
[stable24] Wait for the new user form to be visible in acceptance tests
2 parents 0afc3d5 + 33b6740 commit ec349fc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/acceptance/features/bootstrap/UsersSettingsContext.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,12 @@ public function iSeeThatTheListOfUsersDoesNotContainsTheUser($user) {
293293
* @Then I see that the new user form is shown
294294
*/
295295
public function iSeeThatTheNewUserFormIsShown() {
296-
Assert::assertTrue(
297-
$this->actor->find(self::newUserForm(), 10)->isVisible());
296+
if (!WaitFor::elementToBeEventuallyShown(
297+
$this->actor,
298+
self::newUserForm(),
299+
$timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
300+
Assert::fail("The new user form is not shown yet after $timeout seconds");
301+
}
298302
}
299303

300304
/**

0 commit comments

Comments
 (0)