Repository navigation
Add Behat and Cypress coverage for the WAYF remember-my-choice epic - #2112
Merged
Merged
Conversation
kayjoosten
added a commit
that referenced
this pull request
Sep 22, 2026
# If applied, this commit will assert the remembered IdP's SSO URL in the WAYF-skip scenario before continuing through the IdP. # Why is this change needed? Prior to this change, the scenario only proved that the WAYF was skipped; it would still pass if EngineBlock auto-selected the wrong remembered IdP. # How does it address the issue? This change checks that the browser lands on the remembered mock IdP's /sso route immediately after EngineBlock skips the WAYF. # Provide links to any relevant tickets, articles or other resources Found during review of PR #2112.
kayjoosten
added a commit
that referenced
this pull request
Sep 22, 2026
# If applied, this commit will add Cypress coverage for the non-per-SP remember-choice flow by checking that selecting an IdP with the checkbox set creates the rememberchoice cookie. # Why is this change needed? Prior to this change, only the per-SP hidden-field branch had Cypress coverage, so the legacy cookie-writing branch could regress without a test failure. # How does it address the issue? This change adds a global remember-choice test that clears the cookie, stubs form submission, selects an IdP, and asserts that the rememberchoice cookie is created. # Provide links to any relevant tickets, articles or other resources Found during review of PR #2112.
kayjoosten
added a commit
that referenced
this pull request
Sep 24, 2026
# If applied, this commit will assert the remembered IdP's SSO URL in the WAYF-skip scenario before continuing through the IdP. # Why is this change needed? Prior to this change, the scenario only proved that the WAYF was skipped; it would still pass if EngineBlock auto-selected the wrong remembered IdP. # How does it address the issue? This change checks that the browser lands on the remembered mock IdP's /sso route immediately after EngineBlock skips the WAYF. # Provide links to any relevant tickets, articles or other resources Found during review of PR #2112.
kayjoosten
added a commit
that referenced
this pull request
Sep 24, 2026
# If applied, this commit will add Cypress coverage for the non-per-SP remember-choice flow by checking that selecting an IdP with the checkbox set creates the rememberchoice cookie. # Why is this change needed? Prior to this change, only the per-SP hidden-field branch had Cypress coverage, so the legacy cookie-writing branch could regress without a test failure. # How does it address the issue? This change adds a global remember-choice test that clears the cookie, stubs form submission, selects an IdP, and asserts that the rememberchoice cookie is created. # Provide links to any relevant tickets, articles or other resources Found during review of PR #2112.
kayjoosten
force-pushed
the
wayf-epic-test-coverage
branch
from
September 24, 2026 07:23
16f6803 to
2494753
Compare
kayjoosten
added a commit
that referenced
this pull request
Sep 24, 2026
# If applied, this commit will assert the remembered IdP's SSO URL in the WAYF-skip scenario before continuing through the IdP. # Why is this change needed? Prior to this change, the scenario only proved that the WAYF was skipped; it would still pass if EngineBlock auto-selected the wrong remembered IdP. # How does it address the issue? This change checks that the browser lands on the remembered mock IdP's /sso route immediately after EngineBlock skips the WAYF. # Provide links to any relevant tickets, articles or other resources Found during review of PR #2112.
kayjoosten
added a commit
that referenced
this pull request
Sep 24, 2026
# If applied, this commit will add Cypress coverage for the non-per-SP remember-choice flow by checking that selecting an IdP with the checkbox set creates the rememberchoice cookie. # Why is this change needed? Prior to this change, only the per-SP hidden-field branch had Cypress coverage, so the legacy cookie-writing branch could regress without a test failure. # How does it address the issue? This change adds a global remember-choice test that clears the cookie, stubs form submission, selects an IdP, and asserts that the rememberchoice cookie is created. # Provide links to any relevant tickets, articles or other resources Found during review of PR #2112.
kayjoosten
added a commit
that referenced
this pull request
Sep 24, 2026
# If applied, this commit will... Remove the .only restriction on the site notice test again. # Why is this change needed? Prior to this change, rebasing this branch onto the checkbox branch's latest commit reintroduced it.only on the site notice test, because that commit restores it.only there to keep the checkbox PR's own CI run scoped to its own changes. This branch exists specifically to run the full spec file. # How does it address the issue? This change removes .only again so the full wayf.general.spec.js suite runs here, consistent with the earlier fix in this branch. # Provide links to any relevant tickets, articles or other resources #2112
kayjoosten
force-pushed
the
wayf-epic-test-coverage
branch
from
September 24, 2026 08:18
2494753 to
e7edd2d
Compare
johanib
reviewed
Oct 6, 2026
johanib
requested changes
Oct 6, 2026
kayjoosten
added a commit
that referenced
this pull request
Oct 8, 2026
# If applied, this commit will assert the remembered IdP's SSO URL in the WAYF-skip scenario before continuing through the IdP. # Why is this change needed? Prior to this change, the scenario only proved that the WAYF was skipped; it would still pass if EngineBlock auto-selected the wrong remembered IdP. # How does it address the issue? This change checks that the browser lands on the remembered mock IdP's /sso route immediately after EngineBlock skips the WAYF. # Provide links to any relevant tickets, articles or other resources Found during review of PR #2112.
kayjoosten
added a commit
that referenced
this pull request
Oct 8, 2026
# If applied, this commit will add Cypress coverage for the non-per-SP remember-choice flow by checking that selecting an IdP with the checkbox set creates the rememberchoice cookie. # Why is this change needed? Prior to this change, only the per-SP hidden-field branch had Cypress coverage, so the legacy cookie-writing branch could regress without a test failure. # How does it address the issue? This change adds a global remember-choice test that clears the cookie, stubs form submission, selects an IdP, and asserts that the rememberchoice cookie is created. # Provide links to any relevant tickets, articles or other resources Found during review of PR #2112.
kayjoosten
force-pushed
the
wayf-epic-test-coverage
branch
from
October 8, 2026 08:28
e7edd2d to
575ad91
Compare
kayjoosten
added a commit
that referenced
this pull request
Oct 8, 2026
# If applied, this commit will... Remove the .only restriction on the site notice test again. # Why is this change needed? Prior to this change, rebasing this branch onto the checkbox branch's latest commit reintroduced it.only on the site notice test, because that commit restores it.only there to keep the checkbox PR's own CI run scoped to its own changes. This branch exists specifically to run the full spec file. # How does it address the issue? This change removes .only again so the full wayf.general.spec.js suite runs here, consistent with the earlier fix in this branch. # Provide links to any relevant tickets, articles or other resources #2112
kayjoosten
added a commit
that referenced
this pull request
Oct 8, 2026
# If applied, this commit will assert the remembered IdP's SSO URL in the WAYF-skip scenario before continuing through the IdP. # Why is this change needed? Prior to this change, the scenario only proved that the WAYF was skipped; it would still pass if EngineBlock auto-selected the wrong remembered IdP. # How does it address the issue? This change checks that the browser lands on the remembered mock IdP's /sso route immediately after EngineBlock skips the WAYF. # Provide links to any relevant tickets, articles or other resources Found during review of PR #2112.
kayjoosten
added a commit
that referenced
this pull request
Oct 8, 2026
# If applied, this commit will add Cypress coverage for the non-per-SP remember-choice flow by checking that selecting an IdP with the checkbox set creates the rememberchoice cookie. # Why is this change needed? Prior to this change, only the per-SP hidden-field branch had Cypress coverage, so the legacy cookie-writing branch could regress without a test failure. # How does it address the issue? This change adds a global remember-choice test that clears the cookie, stubs form submission, selects an IdP, and asserts that the rememberchoice cookie is created. # Provide links to any relevant tickets, articles or other resources Found during review of PR #2112.
kayjoosten
force-pushed
the
wayf-epic-test-coverage
branch
from
October 8, 2026 08:49
575ad91 to
34e751b
Compare
kayjoosten
added a commit
that referenced
this pull request
Oct 8, 2026
# If applied, this commit will... Remove the .only restriction on the site notice test again. # Why is this change needed? Prior to this change, rebasing this branch onto the checkbox branch's latest commit reintroduced it.only on the site notice test, because that commit restores it.only there to keep the checkbox PR's own CI run scoped to its own changes. This branch exists specifically to run the full spec file. # How does it address the issue? This change removes .only again so the full wayf.general.spec.js suite runs here, consistent with the earlier fix in this branch. # Provide links to any relevant tickets, articles or other resources #2112
kayjoosten
force-pushed
the
wayf-epic-test-coverage
branch
from
October 9, 2026 08:57
34e751b to
fec858f
Compare
kayjoosten
added a commit
that referenced
this pull request
Oct 9, 2026
# If applied, this commit will assert the remembered IdP's SSO URL in the WAYF-skip scenario before continuing through the IdP. # Why is this change needed? Prior to this change, the scenario only proved that the WAYF was skipped; it would still pass if EngineBlock auto-selected the wrong remembered IdP. # How does it address the issue? This change checks that the browser lands on the remembered mock IdP's /sso route immediately after EngineBlock skips the WAYF. # Provide links to any relevant tickets, articles or other resources Found during review of PR #2112.
kayjoosten
added a commit
that referenced
this pull request
Oct 9, 2026
# If applied, this commit will add Cypress coverage for the non-per-SP remember-choice flow by checking that selecting an IdP with the checkbox set creates the rememberchoice cookie. # Why is this change needed? Prior to this change, only the per-SP hidden-field branch had Cypress coverage, so the legacy cookie-writing branch could regress without a test failure. # How does it address the issue? This change adds a global remember-choice test that clears the cookie, stubs form submission, selects an IdP, and asserts that the rememberchoice cookie is created. # Provide links to any relevant tickets, articles or other resources Found during review of PR #2112.
kayjoosten
added a commit
that referenced
this pull request
Oct 9, 2026
# If applied, this commit will... Remove the .only restriction on the site notice test again. # Why is this change needed? Prior to this change, rebasing this branch onto the checkbox branch's latest commit reintroduced it.only on the site notice test, because that commit restores it.only there to keep the checkbox PR's own CI run scoped to its own changes. This branch exists specifically to run the full spec file. # How does it address the issue? This change removes .only again so the full wayf.general.spec.js suite runs here, consistent with the earlier fix in this branch. # Provide links to any relevant tickets, articles or other resources #2112
kayjoosten
added a commit
that referenced
this pull request
Oct 12, 2026
# If applied, this commit will assert the remembered IdP's SSO URL in the WAYF-skip scenario before continuing through the IdP. # Why is this change needed? Prior to this change, the scenario only proved that the WAYF was skipped; it would still pass if EngineBlock auto-selected the wrong remembered IdP. # How does it address the issue? This change checks that the browser lands on the remembered mock IdP's /sso route immediately after EngineBlock skips the WAYF. # Provide links to any relevant tickets, articles or other resources Found during review of PR #2112.
kayjoosten
added a commit
that referenced
this pull request
Oct 12, 2026
# If applied, this commit will add Cypress coverage for the non-per-SP remember-choice flow by checking that selecting an IdP with the checkbox set creates the rememberchoice cookie. # Why is this change needed? Prior to this change, only the per-SP hidden-field branch had Cypress coverage, so the legacy cookie-writing branch could regress without a test failure. # How does it address the issue? This change adds a global remember-choice test that clears the cookie, stubs form submission, selects an IdP, and asserts that the rememberchoice cookie is created. # Provide links to any relevant tickets, articles or other resources Found during review of PR #2112.
kayjoosten
added a commit
that referenced
this pull request
Oct 12, 2026
# If applied, this commit will... Remove the .only restriction on the site notice test again. # Why is this change needed? Prior to this change, rebasing this branch onto the checkbox branch's latest commit reintroduced it.only on the site notice test, because that commit restores it.only there to keep the checkbox PR's own CI run scoped to its own changes. This branch exists specifically to run the full spec file. # How does it address the issue? This change removes .only again so the full wayf.general.spec.js suite runs here, consistent with the earlier fix in this branch. # Provide links to any relevant tickets, articles or other resources #2112
kayjoosten
force-pushed
the
wayf-epic-test-coverage
branch
from
October 12, 2026 13:15
fec858f to
0992191
Compare
kayjoosten
added a commit
that referenced
this pull request
Oct 12, 2026
…embering # If applied, this commit will... Add a comment to RememberWayfChoice.feature explaining that it covers the per-SP, cookie-based remember-choice feature, and why "I start a new browser session" is the step that proves it. # Why is this change needed? Prior to this change, a reader of the scenarios had no indication that "I start a new browser session" was deliberately chosen over a step that wipes every cookie. Without that context, the scenarios could be mistaken for testing the older, session-based wayf.remember_choice feature, and a future change that broke cookie persistence across sessions could still pass if the test accidentally relied on leftover session state instead. # How does it address the issue? This change adds a short comment after the feature description stating that the per-SP feature is mutually exclusive with wayf.remember_choice, and that "I start a new browser session" clears only the PHP session cookie while keeping "rememberedidps", which is exactly what distinguishes a cookie-based choice from a session-based one. # Provide links to any relevant tickets, articles or other resources Addresses review comment on PR #2112.
kayjoosten
added a commit
that referenced
this pull request
Oct 13, 2026
# If applied, this commit will assert the remembered IdP's SSO URL in the WAYF-skip scenario before continuing through the IdP. # Why is this change needed? Prior to this change, the scenario only proved that the WAYF was skipped; it would still pass if EngineBlock auto-selected the wrong remembered IdP. # How does it address the issue? This change checks that the browser lands on the remembered mock IdP's /sso route immediately after EngineBlock skips the WAYF. # Provide links to any relevant tickets, articles or other resources Found during review of PR #2112.
kayjoosten
added a commit
that referenced
this pull request
Oct 13, 2026
# If applied, this commit will add Cypress coverage for the non-per-SP remember-choice flow by checking that selecting an IdP with the checkbox set creates the rememberchoice cookie. # Why is this change needed? Prior to this change, only the per-SP hidden-field branch had Cypress coverage, so the legacy cookie-writing branch could regress without a test failure. # How does it address the issue? This change adds a global remember-choice test that clears the cookie, stubs form submission, selects an IdP, and asserts that the rememberchoice cookie is created. # Provide links to any relevant tickets, articles or other resources Found during review of PR #2112.
kayjoosten
added a commit
that referenced
this pull request
Oct 13, 2026
# If applied, this commit will... Remove the .only restriction on the site notice test again. # Why is this change needed? Prior to this change, rebasing this branch onto the checkbox branch's latest commit reintroduced it.only on the site notice test, because that commit restores it.only there to keep the checkbox PR's own CI run scoped to its own changes. This branch exists specifically to run the full spec file. # How does it address the issue? This change removes .only again so the full wayf.general.spec.js suite runs here, consistent with the earlier fix in this branch. # Provide links to any relevant tickets, articles or other resources #2112
kayjoosten
added a commit
that referenced
this pull request
Oct 13, 2026
…embering # If applied, this commit will... Add a comment to RememberWayfChoice.feature explaining that it covers the per-SP, cookie-based remember-choice feature, and why "I start a new browser session" is the step that proves it. # Why is this change needed? Prior to this change, a reader of the scenarios had no indication that "I start a new browser session" was deliberately chosen over a step that wipes every cookie. Without that context, the scenarios could be mistaken for testing the older, session-based wayf.remember_choice feature, and a future change that broke cookie persistence across sessions could still pass if the test accidentally relied on leftover session state instead. # How does it address the issue? This change adds a short comment after the feature description stating that the per-SP feature is mutually exclusive with wayf.remember_choice, and that "I start a new browser session" clears only the PHP session cookie while keeping "rememberedidps", which is exactly what distinguishes a cookie-based choice from a session-based one. # Provide links to any relevant tickets, articles or other resources Addresses review comment on PR #2112.
kayjoosten
force-pushed
the
wayf-epic-test-coverage
branch
from
October 13, 2026 08:11
683514d to
dcdd0ff
Compare
kayjoosten
added a commit
that referenced
this pull request
Oct 13, 2026
# If applied, this commit will assert the remembered IdP's SSO URL in the WAYF-skip scenario before continuing through the IdP. # Why is this change needed? Prior to this change, the scenario only proved that the WAYF was skipped; it would still pass if EngineBlock auto-selected the wrong remembered IdP. # How does it address the issue? This change checks that the browser lands on the remembered mock IdP's /sso route immediately after EngineBlock skips the WAYF. # Provide links to any relevant tickets, articles or other resources Found during review of PR #2112.
kayjoosten
force-pushed
the
wayf-epic-test-coverage
branch
from
October 13, 2026 12:00
dcdd0ff to
b00a89a
Compare
kayjoosten
added a commit
that referenced
this pull request
Oct 13, 2026
# If applied, this commit will... Remove the .only restriction on the site notice test again. # Why is this change needed? Prior to this change, rebasing this branch onto the checkbox branch's latest commit reintroduced it.only on the site notice test, because that commit restores it.only there to keep the checkbox PR's own CI run scoped to its own changes. This branch exists specifically to run the full spec file. # How does it address the issue? This change removes .only again so the full wayf.general.spec.js suite runs here, consistent with the earlier fix in this branch. # Provide links to any relevant tickets, articles or other resources #2112
kayjoosten
added a commit
that referenced
this pull request
Oct 13, 2026
…embering # If applied, this commit will... Add a comment to RememberWayfChoice.feature explaining that it covers the per-SP, cookie-based remember-choice feature, and why "I start a new browser session" is the step that proves it. # Why is this change needed? Prior to this change, a reader of the scenarios had no indication that "I start a new browser session" was deliberately chosen over a step that wipes every cookie. Without that context, the scenarios could be mistaken for testing the older, session-based wayf.remember_choice feature, and a future change that broke cookie persistence across sessions could still pass if the test accidentally relied on leftover session state instead. # How does it address the issue? This change adds a short comment after the feature description stating that the per-SP feature is mutually exclusive with wayf.remember_choice, and that "I start a new browser session" clears only the PHP session cookie while keeping "rememberedidps", which is exactly what distinguishes a cookie-based choice from a session-based one. # Provide links to any relevant tickets, articles or other resources Addresses review comment on PR #2112.
kayjoosten
added a commit
that referenced
this pull request
Oct 13, 2026
# If applied, this commit will assert the remembered IdP's SSO URL in the WAYF-skip scenario before continuing through the IdP. # Why is this change needed? Prior to this change, the scenario only proved that the WAYF was skipped; it would still pass if EngineBlock auto-selected the wrong remembered IdP. # How does it address the issue? This change checks that the browser lands on the remembered mock IdP's /sso route immediately after EngineBlock skips the WAYF. # Provide links to any relevant tickets, articles or other resources Found during review of PR #2112.
kayjoosten
added a commit
that referenced
this pull request
Oct 13, 2026
# If applied, this commit will... Remove the .only restriction on the site notice test again. # Why is this change needed? Prior to this change, rebasing this branch onto the checkbox branch's latest commit reintroduced it.only on the site notice test, because that commit restores it.only there to keep the checkbox PR's own CI run scoped to its own changes. This branch exists specifically to run the full spec file. # How does it address the issue? This change removes .only again so the full wayf.general.spec.js suite runs here, consistent with the earlier fix in this branch. # Provide links to any relevant tickets, articles or other resources #2112
kayjoosten
added a commit
that referenced
this pull request
Oct 13, 2026
…embering # If applied, this commit will... Add a comment to RememberWayfChoice.feature explaining that it covers the per-SP, cookie-based remember-choice feature, and why "I start a new browser session" is the step that proves it. # Why is this change needed? Prior to this change, a reader of the scenarios had no indication that "I start a new browser session" was deliberately chosen over a step that wipes every cookie. Without that context, the scenarios could be mistaken for testing the older, session-based wayf.remember_choice feature, and a future change that broke cookie persistence across sessions could still pass if the test accidentally relied on leftover session state instead. # How does it address the issue? This change adds a short comment after the feature description stating that the per-SP feature is mutually exclusive with wayf.remember_choice, and that "I start a new browser session" clears only the PHP session cookie while keeping "rememberedidps", which is exactly what distinguishes a cookie-based choice from a session-based one. # Provide links to any relevant tickets, articles or other resources Addresses review comment on PR #2112.
kayjoosten
force-pushed
the
wayf-epic-test-coverage
branch
3 times, most recently
from
October 14, 2026 08:17
4e64dc9 to
d392155
Compare
Prior to this change, the per-SP remember-choice flow had no acceptance tests and the CI config did not enable the feature. This change enables the per-SP mode for CI, adds fixture and step support for selecting an IdP with remember-choice and asserting the rememberedidps cookie, and adds the RememberWayfChoice.feature scenarios. It also initialises the EmptyMduiElement properties that the mock WAYF read before they were set.
Prior to this change, the per-SP remember-choice tests lived in wayf.general.spec.js and the cookie removal page was not covered. This change moves the remember-choice tests into their own spec, adds assertions for the hidden field, the per-SP-only mock WAYF and the legacy cookie, and covers the cookie removal page.
kayjoosten
force-pushed
the
wayf-epic-test-coverage
branch
from
October 15, 2026 08:17
d392155 to
27e4afb
Compare
johanib
approved these changes
Oct 15, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Behat and Cypress test coverage for the "remember my choice" epic (#1956), closing #2084.
Behat (Phase 1)
wayf.remember_choiceandwayf.remember_choice_per_idpin the CI config.ServiceRegistryFixture::allowWayfRememberChoiceForSp()+ a matching Gherkin step).rememberedidpscookie is/isn't set.RememberWayfChoice.featurewith 4 scenarios: remembering skips WAYF on a later login, scoping is per-SP, the coin gates the feature entirely, and the reset endpoint clears a remembered choice.While writing multi-login scenarios, found that a pre-existing, always-on legacy mechanism (
EngineBlock_Corto_Model_Response_Cache::findRememberedIdp()) silently skips WAYF for any second login in the same PHP session if the previously-used IdP is also connected to the new SP — completely independent of the new remember-choice feature. Added a newI start a new browser sessionstep (clears only the PHP session cookie, leaving other cookies likerememberedidpsintact) to isolate scenarios from this legacy behaviour, and verified the new scenarios aren't false positives by temporarily disabling the feature flag and confirming they then fail correctly.Full default Behat suite: 304/304 passing (300 existing + 4 new), zero regressions.
Cypress (Phase 2)
.onlyinwayf.general.spec.jsthat had been silently suppressing the rest of the file.cy.visit()(test-isolation bleed) and 3 tests whose IdP counts didn't account foraddDiscoveriesdefaulting totrue.theme/had never been built, so no client-side JS ran at all in Cypress runs. After building the theme, the real failure count dropped from ~20 to 8 (pre-existingdata-weightsearch scoring anddefaultIdpbanner issues, unrelated to this epic). Those 8 are skipped with a comment pointing at WAYF Cypress spec: fix suppressed failures behind removed it.only (visibility/weight/defaultIdp) #2110, which has been updated with these corrected findings.rememberChoice.jswiring: checking the global "remember my choice" checkbox and selecting an IdP sets that IdP's hiddenrememberChoicefield to1before submit; leaving it unchecked leaves it at0.Full Cypress suite (skeune + shared specs): 106 passing, 28 pre-existing pending/skipped, 0 failing.
Definition of Done
phpmd,phpcs(modern + legacy),docheader— all cleaneb4,unit,functional,integration) — all greenyarn lint— cleanCloses #2084. References #2110 (pre-existing Cypress failures, corrected scope) but does not close it.