Problem/Motivation

This is a follow-up issue of #3074688: Password can not be reset, when user hasn't accepted the legal terms yet, where we didn't finish the required tests for the feature.

Furthermore, there are a few old tests using legacy themes, which is the reason the testing pipeline currently fails.

Steps to reproduce

Proposed resolution

Fix, comment in and add tests for "Password can not be reset, when user hasn't accepted the legal terms yet"

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork legal-3447348

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Grevil created an issue. See original summary.

grevil’s picture

EDIT: Wrong issue

grevil’s picture

Through adjusting the tests I found a regression caused by #3414370: Reset notice is showing up twice (from core and legal module) and don't disappear after password change. I commented out the part of the test, that let them fail for now. We should comment them in again through #3447367: The one-time login message is not displayed anymore, when the user is first redirected to the T&C page..

grevil’s picture

Status: Active » Needs work
robert castelo’s picture

Status: Needs work » Postponed (maintainer needs more info)

@Grevil I fixed this already, but let me know if there's anything from this branch you think should be merged in.

grevil’s picture

Status: Postponed (maintainer needs more info) » Active

One test still fails in 3.0.x: https://git.drupalcode.org/project/legal/-/jobs/1603633

Had similar issues yesterday, where locally running the tests everything went green, but on remote one fails.

I'll rebase the branch on 3.0.x, try to fix the test and readd the "testPasswordResetLegalAcceptOnEveryLogin()" test.

grevil’s picture

Title: Fix, comment in and add tests for "Password can not be reset, when user hasn't accepted the legal terms yet" » Fix and add remaining test
Status: Active » Needs work

Ok, no idea why they are failing on remote. The new test throws the same exact error as the "testPasswordResetWithoutLegalAccepted()" test in the 3.0.x phpunit job:

Failed asserting that 'http://localhost/web/legal_accept?token=9TaxWGHdTkxxh7DCswLCwFKCcxqkCjr2...' starts with "http://localhost/web/legal_accept?destination=/web/user/2/edit%3Fpass-re..."

The "pass-reset-token" is not even included in the URL for some reason... locally the tests just run fine.

grevil’s picture

@Robert Castelo maybe you have any further ideas? I'd be fine with a new release, as all tests are passing locally, but this test behavior is still quite confusing.

robert castelo’s picture

@Grevil maybe something in the .gitlab-ci.yml file?

What else is different between local and Gitlab environments.

robert castelo’s picture

I'm going to do thorough manual testing this week and planning to do a Legal 3.0.2 release next weekend.

john franklin made their first commit to this issue’s fork.