* Init
* Add some tests
* Add failing spec
* Move soft validations into a module
* Update test
* Rubocop
* Scope are auto created by enums
* Rename folder to validations
* No instance variable
* Commit both lines
* Add error indication
* Make partial slightly more generic
* Fix back link
* Write failing test
* All specs currently passing. Can this be real?
* Check page should have an override question
* Fix back button for check answers pages
* Don't really need a wrapper method for the validations
* We're really validating a page here not a question
* Dup variable
* Bit of a nasty hack but maybe better than deriving back link?
* Set a no cache header instead of reloading
* Move a teeny bit of logic out of the controller
* Rubocop
* Extract method
* Add fixed term tenancy validation
* refactor validate_fixed_term_tenancy
* add fixed_term_tenancy pattern to api docs and make it dynamically not required
* Add validate_net_income_uc_proportion validation/
* refactor validation method;
* Update net income options in doc
* rubocop
* refactor validate_net_income_uc_proportion and increase the persons checked to 8
* rename tenant economic status field
* Change condition format in json
* Add test for multiple conditions
* Check multiple conditions
* nearly better
* check the condition for route without checcking the question type
* remove a comment and an unused variable
Co-authored-by: magicmilo <milobascombe@gmail.com>
* Add next page path method with conditional routing
* Rename method
* Fix the tests and add files to .gitignore
* Make get_next_page_path a private method
* WIP test for total question count
* Change back button to use rails navigation
* Make total number of questions work with conditional routing and run rubocop
* Add tests for conditional question displaying
* Add conditional routing to the check answers page
* push 1 failure
* make total_questions step over the form like a user would and gather relevand questions
* Fix the tests
* fixed checks answers labels
* small refactors and rubocop
* remove unused code from get next page path
Co-authored-by: Kat <katrina@madetech.com>
Co-authored-by: magicmilo <milobascombe@gmail.com>
No errors need to be added if the net income is given as 0 but no frequency
is provided. It just needs to be made not required if the net income is
refused (given as 0) so that the record can still be added.
* use test_form.json in tests
* Pass in form to view from controller for check_answers
* reduce test json length for household section
* Further shorten the test json
* Remove extra radio questions from test json household section
* Trim test form and fix tests
* do some method extraction
* Extract creation of form into a formHandler
* rubocop
* redefine form model to use filepaths instead
* Check test env var in form handler
* remove singleton and make get_all_forms a private method
* refactor get_all_forms
Co-authored-by: Kat <katrina@madetech.com>
* Validate API created case logs
* Validate record completion
* Set complete or in progress status based on field presence validation
* Make autogenerated fields a named constant
* Test the whole validation
* Add some hated code comments to explain some things
* Be stricter about the params we allow mass updates on