Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There are two checks in PasswordResetBehaviorsTest to assert the current URL, but they are not working correctly.
'User should be sent back to their account form instead of the node' and 'User should have access to the node now' aren't actually getting the current URL, they're simply comparing two strings that aren't related to the current URL.
So the test passes even though the underlying functionality is not working as expected.
Looks like this was introduced in https://www.drupal.org/commitlog/commit/2128/1cdb06e3974d0788d62c46b9beb...
Comments
Comment #2
nicrodgersPatch attached, now uses assertURL to make sure you're actually on that URL.
I expect the test to fail now, but that is correct, due to #2852312: Password expiration not set to false on update
Comment #4
nicrodgersRe-rolled patch to include the updated test and the patch from #2852312: Password expiration not set to false on update so that this can now pass.
Comment #6
nicrodgersOk, now I get the comment... Expecting this to fail.
Comment #8
nicrodgersThis patch includes the fix to the test, and the patch from #2852312: Password expiration not set to false on update.. hopefully this will now pass.
Comment #9
nicrodgersRight, we got there eventually! So when reviewing/committing, please use the patch in #2854942-6: PasswordResetBehaviorsTest isn't asserting the URL correctly and ignore the one in 8, that serves only to demonstrate that the test will pass once the underlying bug is fixed.
Comment #10
nerdsteinCode review of patch #6 looks good.
I am going to submit an updated patch based on my feedback of https://www.drupal.org/node/2852312
This should help get this moving.
Comment #11
nerdsteinManual test of the patch in comment #6 with the new patch here https://www.drupal.org/node/2852312#comment-11958424
After adding the first patch, all tests run great.
Oddly, after adding the patch in #6, tests are repeatedly failing in PasswordPolicyInterfaceTest (which is really odd because the patch is for PasswordResetBehaviorsTest). I'm trying to make sure this is not an issue with my local (as the tests passed above). More to come soon....
Comment #12
nerdsteinI have upgraded everything up to 8.2.3 (including composer dependencies).
The error (which was the same of the interface test) is happening in the PasswordResetBehaviorsTest:
I am going to do some manual testing to see why this test is not passing.
Comment #13
nerdsteinThis is fine, I was dealing with performance issues locally that were resolved with a fresh site install.
I am merging in the patch from #6 and will await testing of the #9 patch from here: https://www.drupal.org/node/2852312#comment-11958424