- Issue created by @saidatom
- Assigned to saidatom
- Issue was unassigned.
- Status changed to Needs review
4 months ago 5:20pm 20 August 2024 - 🇦🇺Australia mstrelan
Opened ✨ Use one-time login link instead of user login form in BrowserTestBase tests Fixed to investigate this in core.
- Status changed to Needs work
4 months ago 3:21am 21 August 2024 - 🇦🇺Australia mstrelan
I've spent a fair bit of time with this MR today on both a large project with many tests, as well as in core, where this is now passing. Some findings:
- Instead of overriding
::drupalLogout
we can just useEntityStorageInterface::loadUnchanged
in::drupalLogin
- I see why we needed our own
::userPassResetUrl
function. Some tests will log users in more than once in one test, and this leads to invalid one-time login links, since the last login time is greater than the request time - Calling
$this->getSession()->visit()
causes session related issues for javascript tests, or when destination redirects are involved. We can simply use::drupalGet()
instead
- Instead of overriding
- Status changed to Postponed
4 months ago 3:07am 30 August 2024 - 🇮🇳India bhanu951
Reopening this issue as the core issue ✨ Use one-time login link instead of user login form in BrowserTestBase tests Fixed is fixed.
- 🇺🇸United States moshe weitzman Boston, MA
Thanks. Seems like there is nothing left to do in DTT. All our users will get this feature automatically when they upgrade to Drupal 11.1+. Before then, they can use https://gitlab.com/weitzman/logintrait