From f3a96b9da9131a8da1f8b280af870b1150a6be6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Barto=C5=A1?= Date: Thu, 8 Jul 2021 14:49:48 +0200 Subject: [PATCH] KEYCLOAK-18644 New Account Console Tests failures --- .../org/keycloak/testsuite/ui/account2/AbstractAccountTest.java | 2 +- .../org/keycloak/testsuite/ui/account2/LDAPAccountTest.java | 2 +- .../org/keycloak/testsuite/ui/account2/PersonalInfoTest.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/AbstractAccountTest.java b/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/AbstractAccountTest.java index 22f5b9c390..60423b0b90 100644 --- a/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/AbstractAccountTest.java +++ b/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/AbstractAccountTest.java @@ -67,6 +67,6 @@ public abstract class AbstractAccountTest extends AbstractUiTest { } protected String getAccountThemeName() { - return suiteContext.getAuthServerInfo().isEAP() ? ACCOUNT_THEME_NAME_RHSSO : ACCOUNT_THEME_NAME_KC; + return getProjectName().equals(Profile.PRODUCT_NAME) ? ACCOUNT_THEME_NAME_RHSSO : ACCOUNT_THEME_NAME_KC; } } diff --git a/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/LDAPAccountTest.java b/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/LDAPAccountTest.java index 5c01b0f1f6..866996ae38 100644 --- a/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/LDAPAccountTest.java +++ b/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/LDAPAccountTest.java @@ -108,7 +108,7 @@ public class LDAPAccountTest extends AbstractAccountTest { public void updateProfileWithAttributePresent() { RealmResource testRealm = adminClient.realm("test"); - assertEquals("keycloak.v2", testRealm.toRepresentation().getAccountTheme()); + assertEquals(getAccountThemeName(), testRealm.toRepresentation().getAccountTheme()); UserRepresentation userRepBefore = ApiUtil.findUserByUsername(testRealm,"keycloak-15634"); assertNull("User should not exist", userRepBefore); diff --git a/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/PersonalInfoTest.java b/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/PersonalInfoTest.java index eb8ab35c2a..7f4f8e3d0a 100644 --- a/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/PersonalInfoTest.java +++ b/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/PersonalInfoTest.java @@ -215,7 +215,7 @@ public class PersonalInfoTest extends BaseAccountPageTest { public void updateProfileWithAttributePresent() { RealmResource testRealm = adminClient.realm("test"); - assertEquals("keycloak.v2", testRealm.toRepresentation().getAccountTheme()); + assertEquals(getAccountThemeName(), testRealm.toRepresentation().getAccountTheme()); // Add a user and set a test attribute addUser("keycloak-15634","keycloak-15634@test.local");