Update social login tests login flows

Signed-off-by: wojnarfilip <fwojnar@redhat.com>
This commit is contained in:
wojnarfilip 2024-06-27 09:09:30 +02:00 committed by Alexander Schwartz
parent 0caca2d6f5
commit 3c429b7506

View file

@ -35,6 +35,9 @@ public class BitbucketLoginPage extends AbstractSocialLoginPage {
@FindBy(id = "password") @FindBy(id = "password")
private WebElement passwordInput; private WebElement passwordInput;
@FindBy(id = "mfa-promote-dismiss")
private WebElement dismissMFA;
@FindBy(xpath = "//div[contains(@class,'additional-auths')]/p/a") @FindBy(xpath = "//div[contains(@class,'additional-auths')]/p/a")
private WebElement loginWithAtlassianButton; private WebElement loginWithAtlassianButton;
@ -54,5 +57,12 @@ public class BitbucketLoginPage extends AbstractSocialLoginPage {
passwordInput.sendKeys(password); passwordInput.sendKeys(password);
passwordInput.sendKeys(Keys.RETURN); passwordInput.sendKeys(Keys.RETURN);
try {
clickLink(dismissMFA);
}
catch (NoSuchElementException e) {
log.info("MFA already dismissed");
}
} }
} }