From 0fa209c29af6a495e7dce1e34cca4d97cb906ce0 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Fri, 3 Feb 2023 09:41:48 +0100 Subject: [PATCH] WelcomeScreenTest#resourcesTest (#16761) * Fix WelcomeScreenTest#resourcesTest Closes #16669 * Add one more retry --- .../keycloak/testsuite/ui/account2/WelcomeScreenTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/WelcomeScreenTest.java b/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/WelcomeScreenTest.java index e4a81ea728..150f5c107c 100644 --- a/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/WelcomeScreenTest.java +++ b/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/WelcomeScreenTest.java @@ -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 } }