diff --git a/authenticator-required-action/src/test/java/de/conciso/keycloak/authentication/required_action/RequiredActionAuthenticatorIT.java b/authenticator-required-action/src/test/java/de/conciso/keycloak/authentication/required_action/RequiredActionAuthenticatorIT.java index c074793..55470f8 100644 --- a/authenticator-required-action/src/test/java/de/conciso/keycloak/authentication/required_action/RequiredActionAuthenticatorIT.java +++ b/authenticator-required-action/src/test/java/de/conciso/keycloak/authentication/required_action/RequiredActionAuthenticatorIT.java @@ -110,9 +110,9 @@ void executeBrowserFlow(String userName, String password, String requiredAction) Assertions.fail(); } - page.waitForURL(String.format("%s/realms/required-action/account/#/security/signingin", keycloak.getAuthServerUrl())); + page.waitForURL(String.format("%s/realms/required-action/account/", keycloak.getAuthServerUrl())); - assertThat(page.getByRole(AriaRole.HEADING, new Page.GetByRoleOptions().setName("Signing in")).first()).isVisible(); + assertThat(page.getByRole(AriaRole.HEADING, new Page.GetByRoleOptions().setName("Personal info")).first()).isVisible(); browser.close(); } @@ -189,7 +189,6 @@ void testThatErrorIsLoggedWhenAuthenticatorConfigReferencesNonExistentRequiredAc private void loginUser(Browser browser, Page page, String username, String password) { page.navigate(String.format("%s/realms/required-action/account/", keycloak.getAuthServerUrl())); - page.getByText("Signing in").click(); page.waitForURL("**/realms/required-action/protocol/openid-connect/auth**"); // Login Page diff --git a/keycloak-extension-rest/src/test/java/de/conciso/keycloak/resource/GetUsersByIdResourceProviderTest.java b/keycloak-extension-rest/src/test/java/de/conciso/keycloak/resource/GetUsersByIdResourceProviderTest.java index 200f60e..e05d305 100644 --- a/keycloak-extension-rest/src/test/java/de/conciso/keycloak/resource/GetUsersByIdResourceProviderTest.java +++ b/keycloak-extension-rest/src/test/java/de/conciso/keycloak/resource/GetUsersByIdResourceProviderTest.java @@ -1,33 +1,28 @@ package de.conciso.keycloak.resource; import de.conciso.keycloak.resource.admin.GetUsersByIdResource; +import jakarta.ws.rs.ForbiddenException; import jakarta.ws.rs.core.Response; -import java.util.List; -import java.util.UUID; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.keycloak.common.Profile; -import org.keycloak.models.KeycloakContext; -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmModel; -import org.keycloak.models.UserModel; -import org.keycloak.models.UserProvider; +import org.keycloak.models.*; import org.keycloak.models.light.LightweightUserAdapter; import org.keycloak.representations.idm.UserRepresentation; -import org.keycloak.services.ForbiddenException; import org.keycloak.services.resources.admin.permissions.AdminPermissionEvaluator; import org.keycloak.services.resources.admin.permissions.UserPermissionEvaluator; import org.mockito.InjectMocks; import org.mockito.Mock; -import org.mockito.MockedStatic; -import org.mockito.Mockito; import org.mockito.Spy; import org.mockito.junit.jupiter.MockitoExtension; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.List; +import java.util.UUID; + import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.mockito.BDDMockito.given; @@ -144,8 +139,8 @@ void thenReturnsCorrectUser() { var userRepresentations = (List) response.getEntity(); assertThat(userRepresentations) - .extracting(UserRepresentation::getEmail) - .containsExactly("test@gmail.com"); + .extracting(UserRepresentation::getEmail) + .containsExactly("test@gmail.com"); } } } @@ -185,8 +180,8 @@ void setUp() { void thenReturns404() { assertThat(response.getStatus()).isEqualTo(404); assertThat((String) response.getEntity()) - .contains(NOT_KNOWN_ID.toString()) - .contains("could not be Found"); + .contains(NOT_KNOWN_ID.toString()) + .contains("could not be Found"); } } @@ -217,8 +212,8 @@ void setUp() { void thenReturns404() { assertThat(response.getStatus()).isEqualTo(404); assertThat((String) response.getEntity()) - .contains(NOT_KNOWN_ID.toString()) - .contains("could not be Found"); + .contains(NOT_KNOWN_ID.toString()) + .contains("could not be Found"); } } @@ -242,9 +237,9 @@ class WhenGetAllUsersById { @Test void thenReturnsForbidden() { assertThatThrownBy(() -> - cut.getAllUsersByListOfIds(listWithOneID, true)) - .isInstanceOf(ForbiddenException.class); + cut.getAllUsersByListOfIds(listWithOneID, true)) + .isInstanceOf(ForbiddenException.class); } } } -} \ No newline at end of file +} diff --git a/pom.xml b/pom.xml index 2a14a3a..ace5e0d 100644 --- a/pom.xml +++ b/pom.xml @@ -44,13 +44,13 @@ 17 17 - 23.0.4 + 25.0.6 3.5.1 5.14.2 3.26.3 1.20.3 - 3.3.0 + 3.5.1 5.5.0 5.11.3 2.24.1