diff --git a/testsuite/integration-arquillian/tests/other/webauthn/src/test/java/org/keycloak/testsuite/webauthn/account/AbstractWebAuthnAccountTest.java b/testsuite/integration-arquillian/tests/other/webauthn/src/test/java/org/keycloak/testsuite/webauthn/account/AbstractWebAuthnAccountTest.java index c2baa3f7a4..107a22990a 100644 --- a/testsuite/integration-arquillian/tests/other/webauthn/src/test/java/org/keycloak/testsuite/webauthn/account/AbstractWebAuthnAccountTest.java +++ b/testsuite/integration-arquillian/tests/other/webauthn/src/test/java/org/keycloak/testsuite/webauthn/account/AbstractWebAuthnAccountTest.java @@ -30,6 +30,7 @@ import org.keycloak.models.AuthenticationExecutionModel; import org.keycloak.models.credential.WebAuthnCredentialModel; import org.keycloak.representations.idm.AuthenticationExecutionRepresentation; import org.keycloak.representations.idm.AuthenticationFlowRepresentation; +import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.representations.idm.RequiredActionProviderSimpleRepresentation; import org.keycloak.testsuite.AbstractAuthTest; import org.keycloak.testsuite.arquillian.annotation.EnableFeature; @@ -46,6 +47,8 @@ import org.keycloak.testsuite.webauthn.pages.WebAuthnLoginPage; import org.keycloak.testsuite.webauthn.pages.WebAuthnRegisterPage; import org.openqa.selenium.virtualauthenticator.VirtualAuthenticatorOptions; +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.hamcrest.MatcherAssert.assertThat; import static org.keycloak.models.AuthenticationExecutionModel.Requirement.REQUIRED; import static org.keycloak.testsuite.util.WaitUtils.waitForPageToLoad; @@ -66,6 +69,7 @@ public abstract class AbstractWebAuthnAccountTest extends AbstractAuthTest imple protected SigningInPage.CredentialType webAuthnPwdlessCredentialType; protected static final String WEBAUTHN_FLOW_ID = "75e2390e-f296-49e6-acf8-6d21071d7e10"; + protected static final String DEFAULT_FLOW = "browser"; @Override @Before @@ -83,6 +87,11 @@ public abstract class AbstractWebAuthnAccountTest extends AbstractAuthTest imple public void navigateBeforeTest() { driver.manage().window().maximize(); + RealmRepresentation realm = testRealmResource().toRepresentation(); + assertThat(realm, notNullValue()); + realm.setBrowserFlow(DEFAULT_FLOW); + testRealmResource().update(realm); + webAuthnCredentialType = signingInPage.getCredentialType(WebAuthnCredentialModel.TYPE_TWOFACTOR); webAuthnPwdlessCredentialType = signingInPage.getCredentialType(WebAuthnCredentialModel.TYPE_PASSWORDLESS);