govuk-prototype-kit icon indicating copy to clipboard operation
govuk-prototype-kit copied to clipboard

Add tests for password page

Open joelanman opened this issue 2 years ago • 3 comments

What

Add tests for the password page

Why

We need to ensure the password page works

Who needs to work on this

  • developers

Who needs to review this

  • developers

Done when

  • [ ] We have tests for the password page

joelanman avatar Sep 16 '22 08:09 joelanman

Ideally these tests would be in place prior to the release of v13, but it isn't essential

ruthhammond avatar Oct 05 '22 13:10 ruthhammond

Further discussion required whether we want to prioritise this

ruthhammond avatar Oct 05 '22 13:10 ruthhammond

As part of this work we should consider making it so that we can enable useAuth in tests without also needing to set NODE_ENV=production. Ideally we should be able to just set useAuth=true in an environment variable or config file, currently you need to set NODE_ENV=production USE_AUTH=true USE_HTTPS=false. The need to set NODE_ENV for the auth code to be operable is particularly problematic for automated tests. As @joelanman pointed out currently we expect users to be able to set "useAuth": true in their config file and expect that to enable auth in production but not locally. I'm not sure that behaviour makes sense going forward though, especially because we now have defaults in code rather than in the distributed config files. I'd suggest that instead we make the default of useAuth depend on NODE_ENV, with it defaulting to true in production and false in development.

lfdebrux avatar Oct 05 '22 13:10 lfdebrux