Skip to content

Conversation

CaptainAye
Copy link
Contributor

The PR aims to fix the DefaultLoginPageConfigurerTests.loginPageWhenErrorThenDefaultLoginPageWithError() failure given the system language is set to something else than english.

When asserting the Bad credentials login page, the expected template contains the hardcoded "Bad credentials" message.
When the system language is other than english, this test fails locally as the actual code will produce the localized version of this page.

This PR fixes the issue adding the localized message to the expected page template in order to make sure that it will match the actual response regardless the locale setting.

@pivotal-cla
Copy link

@CaptainAye Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 4, 2024
@pivotal-cla
Copy link

@CaptainAye Thank you for signing the Contributor License Agreement!

…avoid failure when system language is different
@CaptainAye CaptainAye force-pushed the fix-login-page-test-localization branch from 792b576 to dcb7c66 Compare October 5, 2024 08:08
@sjohnr sjohnr self-assigned this Oct 24, 2024
@sjohnr sjohnr added in: config An issue in spring-security-config type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 24, 2024
@sjohnr sjohnr merged commit b2e0539 into spring-projects:main Oct 24, 2024
6 checks passed
@sjohnr
Copy link
Contributor

sjohnr commented Oct 24, 2024

Thanks for the PR @CaptainAye! This is now merged into main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: config An issue in spring-security-config type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants