govuk-prototype-kit
                                
                                 govuk-prototype-kit copied to clipboard
                                
                                    govuk-prototype-kit copied to clipboard
                            
                            
                            
                        Add tests for password page
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
Ideally these tests would be in place prior to the release of v13, but it isn't essential
Further discussion required whether we want to prioritise this
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.