KEYCLOAK-17784: Remember me - fix test

This commit is contained in:
Martin Bartoš 2021-05-11 10:29:35 +02:00 committed by Marek Posolda
parent 5c3d7f186e
commit 8c299b417a

View file

@ -40,7 +40,9 @@ import java.util.Set;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertNotNull;
import static org.keycloak.representations.idm.CredentialRepresentation.PASSWORD;
import static org.keycloak.testsuite.admin.ApiUtil.createUserWithAdminClient;
import static org.keycloak.testsuite.admin.ApiUtil.createUserAndResetPasswordWithAdminClient;
import static org.keycloak.testsuite.admin.Users.setPasswordFor;
import static org.keycloak.testsuite.util.ServerURLs.AUTH_SERVER_PORT;
@ -238,6 +240,9 @@ public class LoginSettingsTest extends AbstractRealmTest {
UserRepresentation utf8TestUser = createUserRepresentation("täst", "test-utf8@email.test", "utf8", "test", true);
setPasswordFor(utf8TestUser, PASSWORD);
String id = createUserWithAdminClient(testRealmResource(), utf8TestUser);
assertNotNull(id);
log.info("enabling remember me");
loginSettingsPage.form().setRememberMeAllowed(true);
assertTrue(loginSettingsPage.form().isRememberMeAllowed());