Merge pull request #33792 from nextcloud/backport/stable23-wait-for-the-new-user-form-to-be-visible-in-acceptance-tests

[stable23] Wait for the new user form to be visible in acceptance tests
This commit is contained in:
blizzz 2022-09-27 08:29:38 +02:00 committed by GitHub
commit 2cd11e23cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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");
}
}
/**