- Issue created by @lostcarpark
- 🇮🇳India nidhi27
Hi,
I have tested the functionality and its working as expected. But test cases are failing because somewhere path is added. We can change it to any valid internal url. (E.g. )
Moving it to needs work.
- 🇮🇪Ireland lostcarpark
Apologies, but I should have thought of this in the original issue description.
I think test coverage is needed to ensure the validation is working.
In the
VerifyEmailSetupTest::testVerifyEmailConfig
, the test assumes that the save of the verify email form was successful. However, this is no longer a valid assumption since it could fail validation.- After the first submit on line 65, we should use
addressEquals
to verify the form saved and returned to the/admin/people/verify-email
page. - We should also
statusMessageContains
to check the status message is correct. - We can remove the
drupalGet
on line 66 since the page should have redirected there anyway.
We should also add a new test function in this class to test that an invalid destination path won't save.
- This should attempt to save a new verify email form, but specifically put a path that doesn't exist in the destination path
- It should assert with
addressEquals
remains on the add page. - It should assert with
statusMessageContains
that the correct error message is generated.
Thank you for your work on this.
- After the first submit on line 65, we should use
- 🇮🇳India nidhi27
Hii,
Changes are done. Let me know if any changes are needed.
Thanks!
- 🇮🇪Ireland lostcarpark
I have reviewed the test changes, and I'm happy they properly test the redirect path validation.
I have run the tests locally, and carried out a manual test.
This change is now ready to merge.
- 🇮🇪Ireland lostcarpark
Change now merged. Thank you all for working on this.