forked from keycloak/keycloak
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- FreeMarkerLoginFormsProvider - extract helper methods to build the locale bean (see #createLocaleBean), in order to reduce cyclomatic complexity - introduce new logic for custom forms in new method #createCustomFormLocaleUrlBuilder (with separate logic for "../login-actions" urls and other URLs such as authorization endpoint URL) - AuthorizationEndpoint#buildAuthorizationCodeAuthorizationResponse: add call to processLocaleParam, to make sure that locale switch is also evaluated for custom forms - LoginActionsService#authenticate: move up the call to processLocaleParam, to support localization of "expired page" - add test CustomFlowTest#customAuthenticatorLocalization - Adjust test class ClickThroughAuthenticator to succeed only when "accept" has been clicked (before the check was that "decline" has NOT been clicked) - otherwise locale switch does not work as expected Closes keycloak#16063 Signed-off-by: Daniel Fesenmeyer <[email protected]>
- Loading branch information
1 parent
f7e21af
commit 469acc4
Showing
7 changed files
with
243 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,10 @@ | |
import org.keycloak.testsuite.util.oauth.OAuthClient; | ||
import org.openqa.selenium.WebDriver; | ||
|
||
import java.util.Objects; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Stian Thorgersen</a> | ||
*/ | ||
|
@@ -42,7 +46,15 @@ public void assertCurrent() { | |
abstract public boolean isCurrent(); | ||
|
||
public boolean isCurrent(String expectedTitle) { | ||
return PageUtils.getPageTitle(driver).equals(expectedTitle); | ||
return Objects.equals(getPageTitle(), expectedTitle); | ||
} | ||
|
||
public void assertPageTitle(final String expectedTitle) { | ||
assertEquals(expectedTitle, getPageTitle()); | ||
} | ||
|
||
private String getPageTitle() { | ||
return PageUtils.getPageTitle(driver); | ||
} | ||
|
||
public void setDriver(WebDriver driver) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ | |
/** | ||
* @author <a href="mailto:[email protected]">Stian Thorgersen</a> | ||
*/ | ||
public class TermsAndConditionsPage extends AbstractPage { | ||
public class TermsAndConditionsPage extends LanguageComboboxAwarePage { | ||
|
||
@FindBy(id = "kc-accept") | ||
private WebElement submitButton; | ||
|
Oops, something went wrong.