* CLDC-4363: Set date to 1st August
* CLDC-4363: Update lettings log csv service spec
* CLDC-4363: Update collection resources controller spec
* CLDC-4363: Update lettings log derived fields
* CLDC-4363: Update remaining model tests
* CLDC-4363: Test August 2nd
* CLDC-4363: Test July 31st
* CLDC-4363: Test back in present
* fixup! CLDC-4363: Update remaining model tests
wrong field
* CLDC-4325: Set date to 2026
* CLDC-4325: Fix sale information % tests
I'm not sure why I turned off strict post 2026, it's wanted in the same scenarios as before as shown by the failing tests
* CLDC-4325: Fix check answers spec
* CLDC-4325: Fix old rake task tests
* CLDC-4325: Fix sales soft validations
* CLDC-4325: Fix collection resources controller spec
* CLDC-4325: Only add noms and org to CSV row if prp
in most cases this was done by default but some tests construct an invalid log
* CLDC-4325: Fix lettings household validations spec
* CLDC-4221: Add 2026 collection deadlines
* CLDC-4325: Fix remaining model specs
* CLDC-4325: Fix form controller spec
* CLDC-4325: Fix hhmemb spec
* CLDC-4325: Fix duplicate logs controller spec
also introduce a new helper for a dynamic way of setting year
* CLDC-4325: Fix sales BU validator spec
* CLDC-4325: Fix check answers summary component
* CLDC-4325: Remove 2024 rake
* CLDC-4325: Use or later in all touched tests
* CLDC-4325: Fix guidance helper spec
* CLDC-4325: Run all tests now and in 2026
* CLDC-4325: Turn off 2026 override
* CLDC-4325: Add a corresponding return to timecop missing one
* CLDC-4325: Fix sales log spec in 2025
need to use let rather than let! so the timecop can run first
* CLDC-4325: Fix lettings log derived spec in 2025
timecop required for the start dates to work
* CLDC-4325: Turn the 2026 override on again
* fixup! CLDC-4325: Fix check answers summary component
* CLDC-4325: Delete recalculate_reasonpref_dontknow rake
only needed for 2024 logs
* fixup! CLDC-4325: Fix lettings household validations spec
Co-authored-by: Oscar Richardson <116292912+oscar-richardson-softwire@users.noreply.github.com>
* fixup! CLDC-4325: Fix sales log spec in 2025
* fixup! CLDC-4325: Fix sales log spec in 2025
* CLDC-4325: Make start controller spec not year specific
* CLDC-4325: Run tests in current day
* CLDC-4325: Run tests on 31st march
* CLDC-4325: Run tests on 2nd april
* CLDC-4325: Properly run tests on current day
* fixup! CLDC-4325: Fix sales soft validations
* fixup! CLDC-4325: Make start controller spec not year specific
* CLDC-4325: Run tests on 31st march
* CLDC-4325: Run tests on 1st april
* CLDC-4325: Run tests on 2nd april
* CLDC-4325: Revert time travel
---------
Co-authored-by: Oscar Richardson <116292912+oscar-richardson-softwire@users.noreply.github.com>
* CLDC-4237: Upgrade ruby to 3.4.4
* CLDC-4237: Add additional build dependencies to Dockerfile
* CLDC-4237: Update rubocop
* CLDC-4237: Fix new rubocop rules
most auto applies
RSpec/IndexedLet had 200 hits needing manual correction so left these for now
* CLDC-4237: Resolve vulnerable dependencies
* CLDC-4237: Fix erb files
* CLDC-4237: Downgrade connection_pool
* Ask address and UPRN questions for 2026 and later logs
* Fix page tests
* Fix LA and postcode overrides
* Fix resetting address fields and LA
* Add tests for resetting address fields and LA
* Fix lettings log derived fields tests
* Fix lint
* Fix tests
* Clean up lettings log property overrides
* Add comments
* Fix lint
* Add error to location field
* Add error to location field
* Add tests for error on location field
* Refactor property and location postcode matching validation into own function
* Add test for LA override
* Add test for postcode override
* Added `!record.read_attribute(:la)` guard
* Fix lint
* Fix property validation for checking LA is active/in England
* Fix test
* Minor tweaks
* Fix lint
* CLDC-4145: Derive is partner for under 16s
in contrast, clear is partner if the age goes >=16 so the user must answer the question again
* CLDC-4145: Remove under 16 soft validation for 2026
it will no longer be shown as we infer the answer
* fixup! CLDC-4145: Derive is partner for under 16s
* fixup! CLDC-4145: Remove under 16 soft validation for 2026
the check is added twice before two diff questions
* CLDC-4145: Update tests
* fixup! CLDC-4145: Derive is partner for under 16s
lint
* fixup! CLDC-4145: Update tests
lint
* fixup! CLDC-4145: Derive is partner for under 16s
check if the was was null rather than current. avoids potential bugs on first assign
* fixup! CLDC-4145: Update tests
some more tests added / updated
* fixup! CLDC-4145: Update tests
turns out editing the future form use is not possible for tests, too many depend on it failing
use timecop instead
* fixup! CLDC-4145: Update tests
fix lettings log export
* fixup! CLDC-4145: Update tests
add 2024 derived variable tests
* fixup! CLDC-4145: Update tests
lint
* CLDC-4145: Add a depends_on to ensure partner is hidden
* fixup! CLDC-4145: Add a depends_on to ensure partner is hidden
remove unnecessary depends_on
make test ranges clearer
* CLDC-3870: Nil the beds question when the user changes off of bedsit
this forces the user to answer it again as we previously assumed the answer to be '1' when they answered bedsit
* CLDC-3870: Add tests
* Bump activerecord from 7.2.2.1 to 7.2.2.2
Bumps [activerecord](https://github.com/rails/rails) from 7.2.2.1 to 7.2.2.2.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v8.0.2.1/activerecord/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.2.2.1...v7.2.2.2)
---
updated-dependencies:
- dependency-name: activerecord
dependency-version: 7.2.2.2
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
* CLDC-NONE: fix test impacted by BigInteger update
calculator verifies that this is the correct answer and previous was wrong
* CLDC-NONE: fix financial test impacted by BigInteger update
19.99 / 2 rounds to 10 so this test looks to be wrong
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Samuel Young <samuel.young@softwire.com>
* set renewal ppostcode on postcode change
* update test
* don't validate ppostcode format if nil
* reset ppcodenk if ppcode errors
---------
Co-authored-by: Carolyn <carolyn.barker@softwire.com>
* rename variable for clarity
* remove unused variable
* make reactivating_soon message refer to the soonest, not most recently created
* status check all deactivation periods instead of just one
* handle no open period to reactivate
* test deactivation period related behaviour
* fix reactivation message variable syntax
* use before do instead of let for unreferenced variables
* fix reactivation message syntax for location
* fix test indentation
* remove unused variable - part 2
* lint
* handle edge case of overlapping periods
* end unclosed Timecop freeze causing flaky tests
* remove unused around blocks superseded by befores
* tidying up
* reinstate setup needed to test default date
* fix typo
* explain deactivation period validation logic
* fix setup to test default date
---------
Co-authored-by: Carolyn <carolyn.barker@softwire.com>
Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com>
* CLDC-3387: Allow support users to create notifications
* Refactor rendering
* Adjust notifications helper
* Add rubocop ignore
* Fix path checks around notification viewing
* Notification path regex should work on review apps
* Tidy
* Remove unused function
* Reference external url in link to markdown syntax guide
* CLDC-3614: Allow markdown page content when creating notifications (#2622)
* CLDC-3614: Allow markdown page content when creating notifications
* Try using beginning of day for time in failing test
* Remove ignored breaks
* Add paper trail to notifications
* CLDC-3607: Allow support users to delete notifications (by setting their end date) (#2630)
* CLDC-3607: Allow support users to delete notifications (by setting their end date)
* Refactor render_for_page helper
* Move db queries to homepage presenter
* Fix lint
* Use a before_action to find notification in controller
* Make delete notification links red
* Tweak link to markdown guide
* Open markdown guide in new tab
* CLDC-3487: Clear previous_la_known when necessary for renewal logs
* CLDC-3487: Clear location when clearing scheme due to org change
* CLDC-3487: Use nil instead of 0
* Specify orgs on sh logs when needed for tests
* Fix flaky tests
* 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
* 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