From 3c429b75063d7c88c0d3d5b50203e6d9174a12a0 Mon Sep 17 00:00:00 2001 From: wojnarfilip Date: Thu, 27 Jun 2024 09:09:30 +0200 Subject: [PATCH] Update social login tests login flows Signed-off-by: wojnarfilip --- .../testsuite/pages/social/BitbucketLoginPage.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/pages/social/BitbucketLoginPage.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/pages/social/BitbucketLoginPage.java index a7ac7a30b0..7e44a2217f 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/pages/social/BitbucketLoginPage.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/pages/social/BitbucketLoginPage.java @@ -35,6 +35,9 @@ public class BitbucketLoginPage extends AbstractSocialLoginPage { @FindBy(id = "password") private WebElement passwordInput; + @FindBy(id = "mfa-promote-dismiss") + private WebElement dismissMFA; + @FindBy(xpath = "//div[contains(@class,'additional-auths')]/p/a") private WebElement loginWithAtlassianButton; @@ -54,5 +57,12 @@ public class BitbucketLoginPage extends AbstractSocialLoginPage { passwordInput.sendKeys(password); passwordInput.sendKeys(Keys.RETURN); + + try { + clickLink(dismissMFA); + } + catch (NoSuchElementException e) { + log.info("MFA already dismissed"); + } } }