WelcomeScreenTest#resourcesTest (#16761)

* Fix WelcomeScreenTest#resourcesTest

Closes #16669

* Add one more retry
This commit is contained in:
Stian Thorgersen 2023-02-03 09:41:48 +01:00 committed by GitHub
parent 263e86e434
commit 0fa209c29a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,6 +19,7 @@ package org.keycloak.testsuite.ui.account2;
import org.jboss.arquillian.graphene.page.Page;
import org.junit.Test;
import org.keycloak.common.util.Retry;
import org.keycloak.representations.idm.RealmRepresentation;
import org.keycloak.testsuite.ui.account2.page.ApplicationsPage;
import org.keycloak.testsuite.ui.account2.page.DeviceActivityPage;
@ -27,6 +28,7 @@ import org.keycloak.testsuite.ui.account2.page.MyResourcesPage;
import org.keycloak.testsuite.ui.account2.page.PersonalInfoPage;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.keycloak.testsuite.util.URLAssert.assertCurrentUrlStartsWithLoginUrlOf;
/**
@ -141,10 +143,10 @@ public class WelcomeScreenTest extends AbstractAccountTest {
// test my resources appeared
accountWelcomeScreen.navigateTo();
accountWelcomeScreen.assertMyResourcesCardVisible(true);
Retry.execute(() -> accountWelcomeScreen.assertMyResourcesCardVisible(true), 10, 500);
accountWelcomeScreen.clickMyResourcesLink();
loginToAccount();
myResourcesPage.assertCurrent();
Retry.execute(() -> myResourcesPage.assertCurrent(), 10, 500);
// no need to disable user managed access
}
}