From 700ceb77ec2acd977c2adefbc9509c6e12a3611a Mon Sep 17 00:00:00 2001 From: wojnarfilip Date: Tue, 1 Mar 2022 13:43:49 +0100 Subject: [PATCH] Removal of invalid(depricated) SpringBootTest Closes #10218 --- .../springboot/AccountLinkSpringBootTest.java | 50 ------------------- 1 file changed, 50 deletions(-) diff --git a/testsuite/integration-arquillian/tests/other/springboot-tests/src/test/java/org/keycloak/testsuite/springboot/AccountLinkSpringBootTest.java b/testsuite/integration-arquillian/tests/other/springboot-tests/src/test/java/org/keycloak/testsuite/springboot/AccountLinkSpringBootTest.java index 07ff7ade32..06f12f2f07 100644 --- a/testsuite/integration-arquillian/tests/other/springboot-tests/src/test/java/org/keycloak/testsuite/springboot/AccountLinkSpringBootTest.java +++ b/testsuite/integration-arquillian/tests/other/springboot-tests/src/test/java/org/keycloak/testsuite/springboot/AccountLinkSpringBootTest.java @@ -492,56 +492,6 @@ public class AccountLinkSpringBootTest extends AbstractSpringBootTest { } } - @Test - public void testAccountNotLinkedAutomatically() throws Exception { - RealmResource realm = adminClient.realms().realm(REALM_NAME); - List links = realm.users().get(childUserId).getFederatedIdentity(); - assertThat(links, is(empty())); - - // Login to account mgmt first - profilePage.open(REALM_NAME); - WaitUtils.waitForPageToLoad(); - - assertCurrentUrlStartsWith(testRealmLoginPage); - testRealmLoginPage.form().login(CHILD_USERNAME_1, CHILD_PASSWORD_1); - profilePage.assertCurrent(); - - // Now in another tab, open login screen with "prompt=login" . Login screen will be displayed even if I have SSO cookie - UriBuilder linkBuilder = UriBuilder.fromUri(LINKING_URL); - String linkUrl = linkBuilder.clone() - .queryParam(OIDCLoginProtocol.PROMPT_PARAM, OIDCLoginProtocol.PROMPT_VALUE_LOGIN) - .build().toString(); - - navigateTo(linkUrl); - assertCurrentUrlStartsWith(testRealmLoginPage); - - loginPage.clickSocial(PARENT_REALM); - - testRealmLoginPage.setAuthRealm(PARENT_REALM); - assertCurrentUrlStartsWith(testRealmLoginPage); - testRealmLoginPage.form().login(PARENT_USERNAME, PARENT_PASSWORD); - testRealmLoginPage.setAuthRealm(REALM_NAME); - - // Test I was not automatically linked. - links = realm.users().get(childUserId).getFederatedIdentity(); - assertThat(links, is(empty())); - - loginUpdateProfilePage.assertCurrent(); - loginUpdateProfilePage.update("Joe", "Doe", "joe@parent.com"); - - errorPage.assertCurrent(); - - assertThat(errorPage.getError(), is(equalTo("You are already authenticated as different user '" - + CHILD_USERNAME_1 - + "' in this session. Please sign out first."))); - - logoutAll(); - - // Remove newly created user - String newUserId = ApiUtil.findUserByUsername(realm, PARENT_USERNAME).getId(); - getCleanup(REALM_NAME).addUserId(newUserId); - } - @Test public void testAccountLinkingExpired() throws Exception { RealmResource realm = adminClient.realms().realm(REALM_NAME);