* Stub some collection resource requests
* Rebase changes
* Add upload new resource page
* Allow adding custom collection resources
* Display and validate additional resources
* Allow downloading additional collection resources
* Allow updating additional resources
* Display additional resources on the homepage
* Add delete link to additional resources
* Update hint text
* Update tests
* Allow unauthenticated users to donwload additional collection resources
* Add some changes to copy and styling
* Add content type to the files
* Validate short display name at the same time as file
* CLDC-3330: Use partial postcodes in bulk upload
* Adjust key address fields provided validations
* Use join to only insert space when both parts of postcode are provided
* Make full stops consistent in error messages
* Fix test
* Update few hardcoded errors
* Update join in remaining row parsers
* Update some more tests
* Update more hard coded BU errors
* Fix typo I introduced - bedrooms to bedroom
---------
Co-authored-by: Kat <katrina@kosiak.co.uk>
Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com>
* Refactor manifest creation into a separate job
* Add users export service
* Call user export service
* Rename exports table
* Update data export job spec
* Update naming
* Refactor shared logic into parent class
* Update initialize
* Allow exporting users individually
* Update data export task tests
* Move method and update task argument
* Add phone extension to the user export
* Add static period to filename
* Make recent logs export depend on the collection
* CLDC-3534 Export organisation data (#2599)
* Add organisation export service
* Call organisations export and write manifest
* Add some additional fields to export
* Add period to organisation export filename
* Update provider_type and add new fields
* Filter exports by the collection
* Update tests
* Update fields exported in lettings export (#2652)
* Add new fields for user ids (#2661)
* Undo lettings export field changes
* CLDC-3244: Replace postcodes_io gem to improve error handling
* Fix status code in default postcodes api mocking
* Fix more mocking
* Remove blank line
* Handle non-Excon errors, in case of unexpected api behaviour
* Remove outdated test
* Remove another outdated test
* Add in past end dates for testing
* Temporarily disable test marked to delete at year end
* Remove one off reinfer_local_authority task
* Update validator_spec
* Set 2024 date in form_handler_spec to be during crossover period as needed
* Use bulk_upload.year_combo for comparison in request tests to avoid year dependancy
* Update BU log creator specs for 2024
* Use year combo function in bulk upload mailer tests
* Refactor lettings validator_spec
* More fixes
* More work on bu validator specs - mostly sales
* Remove pre 2023 test
* More use of bulk_upload.year_combo in request tests
* Fix lint
* Tweak bulk upload error row component tests for year changes
* Further fixes
* Fix 2023 lettings row parser spec
* Sales log to csv fix
* Refactor BU processor tests
* Fix field number row identifier
* Fix linting
* More years in request spec
* fix
* Don't use db unnecessarily in financial validations spec
* Fix sale date changing 2024 -> 2023 test
* Add tests for bulk_upload.year_combo
* Update bu factory year specification
* Refactoring
* Linting
* Don't use helper in factory
* Remove new 2023 specific test
* Remove dummy end dates
* further fixes
* Fix date / crossover issues
* Try changing form end dates
* Revert "Try changing form end dates"
This reverts commit e027e29cf0.
* Make use of :ignore-validation-errors trait
* Try with end dates in past
* Revert "Try with end dates in past"
This reverts commit 6b87938d70.
---------
Co-authored-by: Rachael Booth <rachael.booth@softwire.com>
* initial spec file refactor
remove create for build, extract form to own variable, remove non-valuable tests
run time from 0.29s to0.11s
* refactor to ensure that the questions ownershipsch instance variable and the value of ownershipsch on the log is the same in tests
* delete page test file which is not testing anything meaningful
* add error messages to the I18n yml
* update tests for the validations
* update validation logic
* update tests for the mortgage used question
* update the mortgage used question displayed answer options
* update bulk upload specs to reflect error message updates
* make use of brackets consistent within validation method
* CLDC-3463: Fix bug with vacdays calculation
* CLDC-3463: Fix lettings csv export tests
* Lint
* Use build_stubbed where necessary for lettings logs in tests
* Update all logs in rake task but without validation
* Try validations in rake tasks and log when needing to skip them
* write helper method to support having the correct rent period checkboxes checked
* update new and create in organisations controller and view to enable creation of relevant organisation rent periods
write tests for this
* small changes to models
* enable editing rent period in the UI
display change button on org details page
display rent periods question on edit page
* enable updating org rent periods
update logic in #update
related tests
* alter redirect after support user creates an organisation
* adjust various UI elements: ordering of rows, copy changes, label size and associated tests
* rework the #rent_period_labels method to return All under the correct conditions, rework tests related to that. + fix assorted tests that were either flakey or breaking due to addition of rent periods logic to create and update
* amend failing tests and resolve linting complaints
* changes following review
* disable checkboxes for rent periods if they are in use so that users are not able to make existing logs invalid
hint text added to the question to explain this
I have also added all rent periods to a hidden field to remove the need to fetch them again form the db in the update method
* update validation to reflect the fact that an org having no associated rent periods no longer means they accept all rent periods
update tests adding both cases and removing unnecessary additional db additions
* rake task to create rent period associations for orgs that have none
* revert mistaken copy changes in designs
* create rent periods in factories as default, with an option to skip. skip automatic creation in tests specifically related to rent periods
* stub api call for factory value, update csv tests and fixtures accordingly
* extract a good chunk of tests out of lettings_log_spec and into a dedicated derived fields spec file. in many cases refactor tests
* remove before(:context) and associated patterns.
use assign_attributes in various places for cleaner code
* escape . in regex for API call stubs to satisfy codeQL
remove destroy_all call at the start of a test that was dealing with leftover modesl in the test db
* further refactoring of various tests to reduce database interactions and improve speed
* remove outdated distinction between unitletas mappings from before 23/24
* remove tests that seem to be testing active record and/or ruby Date class