+ <% display_actions = current_user.data_coordinator? || current_user.support? %>
+
">
+ <% if display_actions %>
+ <%= govuk_button_link_to "Invite user", new_user_path, html: { method: :get } %>
+ <% end %>
+
<%= render SearchComponent.new(current_user:, search_label: "Search by name or email address", value: @searched) %>
diff --git a/config/forms/2021_2022.json b/config/forms/2021_2022.json
index 6ebc090b6..ac615b0e2 100644
--- a/config/forms/2021_2022.json
+++ b/config/forms/2021_2022.json
@@ -7411,10 +7411,10 @@
}
],
"title_text": {
- "translation": "soft_validations.net_income.title_text"
+ "translation": "forms.2024.lettings.soft_validations.net_income_value_check.title_text"
},
"informative_text": {
- "translation": "soft_validations.net_income.hint_text",
+ "translation": "forms.2024.lettings.soft_validations.net_income_value_check.informative_text",
"arguments": [
{
"key": "ecstat1",
diff --git a/config/forms/2022_2023.json b/config/forms/2022_2023.json
index 54cd67fd4..7d6f44b20 100644
--- a/config/forms/2022_2023.json
+++ b/config/forms/2022_2023.json
@@ -7870,7 +7870,7 @@
}
],
"title_text": {
- "translation": "soft_validations.net_income.title_text",
+ "translation": "forms.2024.lettings.soft_validations.net_income_value_check.title_text",
"arguments": [
{
"key": "incfreq",
@@ -7885,7 +7885,7 @@
]
},
"informative_text": {
- "translation": "soft_validations.net_income.hint_text",
+ "translation": "forms.2024.lettings.soft_validations.net_income_value_check.informative_text",
"arguments": [
{
"key": "net_income_higher_or_lower_text",
diff --git a/config/locales/en.yml b/config/locales/en.yml
index e68c230ea..03556e27d 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -61,22 +61,6 @@ en:
<<: *bulk_upload__row_parser__base
bulk_upload/sales/year2023/row_parser:
<<: *bulk_upload__row_parser__base
- bulk_upload/lettings/validator:
- attributes:
- base:
- blank_file: "Template is blank - The template must be filled in for us to create the logs and check if data is correct."
- wrong_field_numbers_count: "Incorrect number of fields, please ensure you have used the correct template."
- over_max_column_count: "Too many columns, please ensure you have used the correct template."
- wrong_template: "Incorrect start dates, please ensure you have used the correct template."
- no_headers: "Your file does not contain the required header rows. Add or check the header rows and upload your file again. [Read more about using the template headers](%{guidance_link})."
- bulk_upload/sales/validator:
- attributes:
- base:
- blank_file: "Template is blank - The template must be filled in for us to create the logs and check if data is correct."
- wrong_field_numbers_count: "Incorrect number of fields, please ensure you have used the correct template."
- over_max_column_count: "Too many columns, please ensure you have used the correct template."
- wrong_template: "Incorrect sale dates, please ensure you have used the correct template."
- no_headers: "Your file does not contain the required header rows. Add or check the header rows and upload your file again. [Read more about using the template headers](%{guidance_link})."
forms/bulk_upload_lettings/year:
attributes:
year:
@@ -90,11 +74,13 @@ en:
file:
blank: "Select which file to upload."
not_csv: "Your file must be in CSV format."
+ file_too_large: "File must be 10MB or less. Check your file and delete data that does not need to be uploaded."
forms/bulk_upload_sales/upload_your_file:
attributes:
file:
blank: "Select which file to upload."
not_csv: "Your file must be in CSV format."
+ file_too_large: "File must be 10MB or less. Check your file and delete data that does not need to be uploaded."
forms/bulk_upload_lettings/needstype:
attributes:
needstype:
@@ -234,7 +220,7 @@ en:
scheme_deleted: "%{service_name} has been deleted."
user_deleted: "%{name} has been deleted."
organisation_deleted: "%{name} has been deleted."
- user_updated:
+ user_updated:
self: "Your account details have been updated."
other: "%{name}’s details have been updated."
@@ -281,37 +267,13 @@ en:
invalid: "Role must be data accessor, data provider or data coordinator."
setup:
- intermediate_rent_product_name:
- blank: "Enter name of other intermediate rent product."
saledate:
year_not_two_or_four_digits: "Sale completion year must be 2 or 4 digits."
type:
percentage_bought_must_be_at_least_threshold: "The minimum increase in equity while staircasing is %{threshold}% for this shared ownership type."
startdate:
- current_collection_year:
- "Enter a date within the %{current_start_year_short} to %{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}."
- previous_and_current_collection_year:
- "Enter a date within the %{previous_start_year_short} to %{previous_end_year_short} or %{previous_end_year_short} to %{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}."
- later_than_14_days_after: "The tenancy start date must not be later than 14 days from today’s date."
before_scheme_end_date: "The tenancy start date must be before the end date for this supported housing scheme."
- after_void_date: "Enter a tenancy start date that is after the void date."
- after_major_repair_date: "Enter a tenancy start date that is after the major repair date."
- year_not_two_or_four_digits: "Tenancy start year must be 2 or 4 digits."
- ten_years_after_void_date: "Enter a tenancy start date that is no more than 10 years after the void date."
- ten_years_after_mrc_date: "Enter a tenancy start date that is no more than 10 years after the major repairs completion date."
- invalid_merged_organisations_start_date:
- same_organisation: "Enter a date when the owning and managing organisation was active. %{owning_organisation} became inactive on %{owning_organisation_merge_date} and was replaced by %{owning_absorbing_organisation}."
- same_merge: "Enter a date when the owning and managing organisations were active. %{owning_organisation} and %{managing_organisation} became inactive on %{owning_organisation_merge_date} and were replaced by %{owning_absorbing_organisation}."
- owning_organisation: "Enter a date when the owning organisation was active. %{owning_organisation} became inactive on %{owning_organisation_merge_date} and was replaced by %{owning_absorbing_organisation}."
- managing_organisation: "Enter a date when the managing organisation was active. %{managing_organisation} became inactive on %{managing_organisation_merge_date} and was replaced by %{managing_absorbing_organisation}."
- different_merge: "Enter a date when the owning and managing organisations were active. %{owning_organisation} became inactive on %{owning_organisation_merge_date} and was replaced by %{owning_absorbing_organisation}. %{managing_organisation} became inactive on %{managing_organisation_merge_date} and was replaced by %{managing_absorbing_organisation}."
- invalid_absorbing_organisations_start_date:
- same_organisation: "Enter a date when the owning and managing organisation was active. %{owning_organisation} became active on %{owning_organisation_available_from}."
- owning_organisation: "Enter a date when the owning organisation was active. %{owning_organisation} became active on %{owning_organisation_available_from}."
- managing_organisation: "Enter a date when the managing organisation was active. %{managing_organisation} became active on %{managing_organisation_available_from}."
- different_organisations: "Enter a date when the owning and managing organisations were active. %{owning_organisation} became active on %{owning_organisation_active_from}, and %{managing_organisation} became active on %{managing_organisation_active_from}."
-
location:
deactivated:
startdate: "The location %{postcode} is inactive on this date. Enter another date or choose another location."
@@ -333,44 +295,12 @@ en:
startdate: "The scheme %{name} has no locations that are active on this date. Enter another date or choose another scheme."
scheme_id: "The scheme %{name} has no locations that are active on this date. Enter another date or choose another scheme."
owning_organisation:
- invalid: "Please select the owning organisation or managing organisation that you belong to."
data_sharing_agreement_not_signed: "The organisation must accept the Data Sharing Agreement before it can be selected as the owning organisation."
- inactive_merged_organisation: "The owning organisation must be active on the tenancy start date. %{owning_organisation} became inactive on %{owning_organisation_merge_date} and was replaced by %{owning_absorbing_organisation}."
- inactive_absorbing_organisation: "The owning organisation must be active on the tenancy start date. %{owning_organisation} became active on %{owning_organisation_available_from}."
- managing_organisation:
- invalid: "Please select the owning organisation or managing organisation that you belong to."
- data_sharing_agreement_not_signed: "The organisation must accept the Data Sharing Agreement before it can be selected as the managing organisation."
- inactive_merged_organisation: "The managing organisation must be active on the tenancy start date. %{managing_organisation} became inactive on %{managing_organisation_merge_date} and was replaced by %{managing_absorbing_organisation}."
- inactive_absorbing_organisation: "The managing organisation must be active on the tenancy start date. %{managing_organisation} became active on %{managing_organisation_available_from}."
- assigned_to:
- invalid: "Please select the owning organisation or managing organisation that you belong to."
- lettype:
- general_needs_mismatch: "Lettings type must be a general needs type because you selected general needs when uploading the file."
- supported_housing_mismatch: "Lettings type must be a supported housing type because you selected supported housing when uploading the file."
- needstype_general_needs: "This needs type is general needs, but the letting type is supported housing. Change either the needs type or the letting type."
- needstype_supported_housing: "This needs type is supported housing, but the letting type is general needs. Change either the needs type or the letting type."
- needstype:
- lettype_not_general_needs: "This letting type is supported housing, but the needs type is general needs. Change either the needs type or the letting type."
- lettype_not_supported_housing: "This letting type is general needs, but the needs type is supported housing. Change either the needs type or the letting type."
- location:
- incomplete: "This location is incomplete. Select another location or update this one."
- scheme:
- incomplete: "This scheme is incomplete. Select another scheme or update this one."
-
property:
uprn:
invalid: "UPRN must be 12 digits or less."
uprn_known:
invalid: "You must answer UPRN known?"
- mrcdate:
- before_tenancy_start: "Enter a major repairs date that is before the tenancy start date."
- not_first_let: "Major repairs date must not be completed if the tenancy is a first let."
- ten_years_before_tenancy_start: "Enter a major repairs completion date that is no more than 10 years before the tenancy start date."
- before_void_date: "Major repairs date must be after the void date if provided."
- void_date:
- ten_years_before_tenancy_start: "Enter a void date no more than 10 years before the tenancy start date."
- before_tenancy_start: "Enter a void date that is before the tenancy start date."
- after_mrcdate: "Void date must be before the major repairs date if provided."
la:
la_invalid_for_org: "%{org_name} does not operate in %{la_name}."
postcode_invalid_for_org: "Enter a postcode in an area covered by %{org_name}."
@@ -463,13 +393,8 @@ en:
child_over_19: "Answer cannot be child as you told us person %{person_num} is over 19."
housingneeds_a:
one_or_two_choices: "You can only select one option or ‘other disabled access needs’ plus ‘wheelchair-accessible housing’, ‘wheelchair access to essential rooms’ or ‘level access housing’."
- housingneeds_type:
- only_one_option_permitted: "Only one disabled access need: fully wheelchair-accessible housing, wheelchair access to essential rooms or level access housing, can be selected."
housingneeds:
invalid: "If somebody in the household has disabled access needs, they must have the access needs listed, or other access needs."
- no_disabled_needs_conjunction: "No disabled access needs can’t be selected if you have selected fully wheelchair-accessible housing, wheelchair access to essential rooms, level access housing or other disabled access needs."
- dont_know_disabled_needs_conjunction: "Don’t know disabled access needs can’t be selected if you have selected fully wheelchair-accessible housing, wheelchair access to essential rooms, level access housing or other disabled access needs."
- no_and_dont_know_disabled_needs_conjunction: "No disabled access needs and don’t know disabled access needs cannot be selected together."
prevten:
non_temp_accommodation: "Answer cannot be non-temporary accommodation as this is a re-let to a tenant who occupied the same property as temporary accommodation."
over_25_foster_care: "Answer cannot be a children’s home or foster care as the lead tenant is 26 or older."
@@ -484,10 +409,8 @@ en:
other_homeless: "Answer cannot be internal transfer as the tenant was considered homeless by their landlord."
prevten_invalid: "Answer cannot be internal transfer as the household situation immediately before this letting was %{prevten}."
reason_permanently_decanted: "Answer must be internal transfer as the tenant was permanently decanted from another property owned by this landlord."
- nominated_by_local_ha_but_la: "The source of the referral cannot be Nominated by local housing authority as your organisation is a local authority."
la_general_needs:
internal_transfer: "Answer cannot be internal transfer as it’s the same landlord on the tenancy agreement and the household had either a fixed-term or lifetime local authority general needs tenancy immediately before this letting."
- prp_referred_by_la: "The source of the referral cannot be referred by local authority housing department for a general needs log."
homeless:
assessed:
internal_transfer: "Answer cannot be 'assessed as homeless' as this tenancy is an internal transfer."
@@ -508,8 +431,6 @@ en:
retired_female: "Answer cannot be ‘female’ as tenant is under 60 and retired."
reason:
not_internal_transfer: "Answer cannot be ‘permanently decanted from another property owned by this landlord’ as you told us the source of referral for this tenancy was not an internal transfer."
- renewal_reason_needed: 'The reason for leaving must be "End of assured shorthold tenancy - no fault" or "End of fixed term tenancy - no fault" if the letting is a renewal.'
- renewal_reason_needed_2024: 'The reason for leaving must be "End of social or private sector tenancy - no fault", "End of social or private sector tenancy - evicted due to anti-social behaviour (ASB)", "End of social or private sector tenancy - evicted due to rent arrears" or "End of social or private sector tenancy - evicted for any other reason".'
other_not_settled: "Please give the reason for the tenant leaving their last settled home. This is where they were living before they became homeless, were living in temporary accommodation or sleeping rough."
condition_effects:
no_choices: "You cannot answer this question as you told us nobody in the household has a physical or mental health condition (or other illness) expected to last 12 months or more."
@@ -518,14 +439,8 @@ en:
nationality: "Select a valid nationality."
tenancy:
- length:
- fixed_term_not_required: "You must only answer the length of the tenancy if it's fixed-term."
- invalid_fixed: "Enter a tenancy length between %{min_tenancy_length} and 99 years for a tenancy of this type."
- invalid_periodic: "Enter a tenancy length between %{min_tenancy_length} and 99 years (or don't specify the length) for a tenancy of this type."
internal_transfer: "Answer must be secure tenancy as this tenancy is an internal transfer."
cannot_be_internal_transfer: "Answer cannot be internal transfer as this is not a secure tenancy."
- not_joint: "This cannot be a joint tenancy as you've told us there's only one person in the household."
- joint_more_than_one_member: "There must be more than one person in the household as you've told us this is a joint tenancy."
declaration:
missing:
@@ -549,7 +464,6 @@ en:
during_deactivated_period: "The scheme is already deactivated during this date, please enter a different date."
owning_organisation:
does_not_own_stock: "Enter an organisation that owns housing stock."
- no_completed_locations: "This scheme cannot be chosen as it has no completed locations."
location:
postcode_blank: "Enter a postcode."
@@ -572,26 +486,6 @@ en:
organisation_not_selected: "Select an organisation from the search list."
soft_validations:
- net_income:
- title_text: "You told us that the household’s income is %{earnings} %{incfreq}."
- hint_text: "This is %{net_income_higher_or_lower_text} than we would expect for the household’s working situation."
- in_soft_min_range:
- message: "Net income is lower than expected based on the household’s working situation. Are you sure this is correct?"
- in_soft_max_range:
- message: "Net income is higher than expected based on the household’s working situation. Are you sure this is correct?"
- rent:
- outside_range_title: "You told us the rent is %{brent}."
- informative_text: "This is %{higher_or_lower} than we would expect."
- hint_text: "Check the following:
- the decimal point
- the frequency, for example every week or every calendar month
- the rent type is correct, for example affordable or social rent
"
- purchase_price:
- title_text: "You told us the purchase price is %{value}."
- hint_text: "This is %{higher_or_lower} than we would expect."
- staircase_owned:
- title_text:
- one: "You told us that the buyer now owns %{stairowned} of the property."
- two: "You told us that the buyers now own %{stairowned} of the property."
- hint_text: "The maximum percentage that can be owned under the Older Persons Shared Ownership scheme is 75%, unless the property was funded outside the Affordable Homes Programme.
-Make sure these answers are correct."
retirement:
min:
title: "You told us this person is aged %{age} years and retired."
@@ -599,70 +493,6 @@ Make sure these answers are correct."
max:
title: "You told us this person is over 66 and not retired."
hint_text: "The minimum expected retirement age in England is 66."
- extra_borrowing:
- title_text: "You told us that the mortgage and deposit total is %{mortgage_and_deposit_total}."
- hint_text: "This is higher than the purchase price minus the discount."
- pregnancy:
- title: "You told us somebody in the household is pregnant."
- all_male_tenants: "You also told us that all the tenants living at the property are male."
- females_not_in_soft_age_range: "You also told us that any female tenants living at the property are in the following age ranges:
- under 16 years old
- over 50 years old
"
- major_repairs_date:
- title_text: "You told us the property has been vacant for 2 years."
- hint_text: "This is higher than we would expect."
- void_date:
- title_text: "You told us that the property has been vacant for more than 2 years."
- hint_text: "This is higher than we would expect."
- shared_ownership_deposit:
- title_text: "You told us that the %{mortgage_deposit_and_discount_error_fields} add up to %{mortgage_deposit_and_discount_total}."
- staircase_bought_seems_high:
- title_text: "You told us that %{percentage}% was bought in this staircasing transaction."
- hint_text: "Most staircasing transactions are less than 50%"
- monthly_charges_over_soft_max:
- title_text: "You told us that the monthly charges were %{mscharge}."
- hint_text: "This is higher than we would expect."
- discounted_sale_value:
- title_text: "Mortgage, deposit, and grant total must equal %{value_with_discount}."
- informative_text: "Your given mortgage, deposit and grant total is %{mortgage_deposit_and_grant_total}."
- care_home_charges:
- title_text: "Care home charges should be provided if this is a care home accommodation."
- percentage_discount_value:
- title_text: "You told us that the percentage discount is %{discount}."
- hint_text: "This is higher than we would expect."
- grant:
- title_text: "You told us that the grant amount is %{grant}."
- hint_text: "Loans, grants and subsidies are usually between £9,000 and £16,000."
- referral:
- title_text: "Are you sure?"
- hint_text: "This is a general needs log, and this referral type is for supported housing."
- scharge:
- over_soft_max_title: "You told us the service charge is %{scharge}."
- pscharge:
- over_soft_max_title: "You told us the personal service charge is %{pscharge}."
- supcharg:
- over_soft_max_title: "You told us the support charge is %{supcharg}."
- charges:
- informative_text: "This is higher than we would expect."
- hint_text: "Check the following:
- the decimal point
- the frequency, for example every week or every calendar month
- the needs type
"
- deposit_and_mortgage:
- title_text: "You told us the mortgage amount was %{mortgage}, the cash deposit was %{deposit} and the discount was %{discount}."
- hint_text: "We would expect the mortgage amount and the deposit added together to be the same as the purchase price minus the discount."
- reasonother:
- title_text: "You told us that the tenant’s main reason for leaving their last settled home was %{reasonother}."
- informative_text: "The reason you have entered looks very similar to one of the existing response categories.
- Please check the categories and select the appropriate one.
- If the existing categories are not suitable, please confirm here to move onto the next question."
- hodate:
- must_be_less_than_3_years_from_saledate: "You told us practical completion or handover date is more than 3 years before sale completion date."
- saledate:
- must_be_less_than_3_years_from_hodate: "You told us sale completion date is more than 3 years after practical completion or handover date."
- no_address_found:
- title_text: "No address found."
- informative_text: "We could not find an address that matches your search. You can search again or continue to enter the address manually."
- partner_under_16_lettings:
- title: "You told us this person is aged %{age} years and has 'Partner' relationship to the lead tenant."
- multiple_partners_lettings:
- title: "You told us there are more than 1 persons with 'Partner' relationship to the lead tenant."
-
devise:
two_factor_authentication:
success: "Two-factor authentication successful."
@@ -693,13 +523,6 @@ Make sure these answers are correct."
W: "Suitable for someone who uses a wheelchair and offers the full use of all rooms and facilities."
A: "Fitted with stairlifts, ramps, level access showers or grab rails."
N: "Not designed to wheelchair-user standards or fitted with any equipment or adaptations."
- soctenant:
- one: "Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale?"
- other: "Were any of the buyers private registered providers, housing association or local authority tenants immediately before this sale?"
- stairowned:
- one: "What percentage of the property does the buyer now own in total?"
- other: "What percentage of the property do the buyers now own in total?"
- offered: "How many times was the property offered between becoming vacant and this letting?"
hints:
location:
@@ -712,16 +535,6 @@ Make sure these answers are correct."
toggle_active: "If the date is before %{date}, select ‘From the start of the open collection period’ because the previous period has now closed."
bulk_upload:
needstype: "General needs housing includes both self-contained and shared housing without support or specific adaptations. Supported housing can include direct access hostels, group homes, residential care and nursing homes."
- offered: "Do not include the offer that led to this letting. This is after the last tenancy ended. If the property is being offered for let for the first time, enter 0."
-
- check_answer_labels:
- soctenant:
- one: "Buyer was a registered provider, housing association or local authority tenant immediately before this sale?"
- other: "Any buyers were registered providers, housing association or local authority tenants immediately before this sale?"
- stairowned:
- one: "Percentage the buyer now owns in total."
- other: "Percentage the buyers now own in total."
- offered: "Times previously offered since becoming available."
warnings:
organisation:
diff --git a/config/locales/forms/2023/lettings/guidance.en.yml b/config/locales/forms/2023/lettings/guidance.en.yml
new file mode 100644
index 000000000..1ce7e8a0c
--- /dev/null
+++ b/config/locales/forms/2023/lettings/guidance.en.yml
@@ -0,0 +1,63 @@
+en:
+ forms:
+ 2023:
+ lettings:
+ guidance:
+ finding_location:
+ title: "What is a location?"
+ content: "A location is a postcode area where supported housing is provided under a scheme. A scheme can have multiple locations, and a location can have multiple units at the same postcode."
+ scheme_changes_link_text: "Read more about schemes and locations"
+
+ finding_scheme:
+ title: "Can’t find your scheme?"
+ content: "
Schemes are attached to the organisation that owns the property. Check you have correctly answered question 1 \"Which organisation owns this property?\"
+
If your organisation’s schemes were migrated from old CORE, they may have new names and codes. Search by postcode to find your scheme.
"
+ scheme_changes_link_text: "Read more about how schemes have changed"
+ view_schemes_link_text: "View your organisation’s schemes"
+
+ privacy_notice_tenant:
+ content: "Make sure the tenant has seen %{privacy_notice_link} before completing this log."
+ privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice"
+
+ rent_type_definitions:
+ title: "Rent type definitions"
+ content: "
Affordable Rent: where up to 80% of market rent can be charged. A new supply agreement is signed with Homes England or the Greater London Authority (GLA).
+
London Affordable Rent: a tenure of affordable housing available in London by the GLA. It is an affordable rent which must be set in accordance with the Regulator of Social Housing’s Affordable Rent guidance. The landlord of these homes must be registered with the Regulator of Social Housing. These are a type of Affordable Rent lettings.
+
London Living Rent: a tenure of affordable housing available in London by the GLA. It was introduced in Affordable Homes Programme 2016 to 2021. These are a type of Intermediate Rent lettings.
+
Rent to Buy: a discount of up to 20% market rent is charged for a single rental period for a minimum of 5 years. After that period, the tenant is offered first chance to purchase the property (either shared ownership or outright) at full market value. These are a type of Intermediate Rent lettings.
+
Social Rent: where target rents are determined through the national rent regime. This is sometimes also known as 'formula rent'.
+
Other intermediate rent: any other specific scheme where up to 80% of market rent can be charged. This includes schemes with reduced rent so tenants can save towards a house purchasing deposit and schemes with an in-built future opportunity to buy the property being rented.
"
+
+ scheme_selection:
+ data_provider:
+ content: "If you’re not sure which scheme to choose, ask a data coordinator. Find your data coordinators on the %{users_page_link}."
+ users_page_link_text: "users page"
+ data_coordinator:
+ create_scheme_link_text: "Create a new supported housing scheme"
+
+ void_date:
+ title: "What is a void date?"
+ content: "
Date the property was (legally or contractually) available to let, or for:
+
+ - re-lets: the day after the previous tenant's contract ended
+ - new builds: the day the landlord legally first owned the property (‘completion date’)
+ - new conversions or acquisitions: completion date, or the day after rehabilitation work ended
+ - new leases: the day the landlord got contractual property rights and could let it out to tenants
+
"
+
+ what_counts_as_income:
+ title: "What counts as income?"
+ content: "
You should include any income after tax from:
+
+ - employment
+ - pensions
+ - Universal Credit
+
+
+
Don’t include:
+
+ - National Insurance (NI) contributions and tax
+ - housing benefit
+ - child benefit
+ - council tax support
+
"
\ No newline at end of file
diff --git a/config/locales/forms/2023/lettings/household_characteristics.en.yml b/config/locales/forms/2023/lettings/household_characteristics.en.yml
new file mode 100644
index 000000000..1f175adbc
--- /dev/null
+++ b/config/locales/forms/2023/lettings/household_characteristics.en.yml
@@ -0,0 +1,323 @@
+en:
+ forms:
+ 2023:
+ lettings:
+ household_characteristics:
+ declaration:
+ page_header: "Ministry of Housing, Communities and Local Government privacy notice"
+ check_answer_label: "Tenant has seen the privacy notice"
+ hint_text: ""
+ question_text: "Declaration"
+
+ hhmemb:
+ page_header: ""
+ check_answer_label: "Number of household members"
+ hint_text: "You can provide details for a maximum of 8 people."
+ question_text: "How many people live in the household for this letting?"
+
+ age1:
+ page_header: ""
+ age1_known:
+ check_answer_label: ""
+ hint_text: "The ’lead’ or ’main’ tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
+ question_text: "Do you know the lead tenant’s age?"
+ age1:
+ check_answer_label: "Lead tenant’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex1:
+ page_header: ""
+ check_answer_label: "Lead tenant’s gender identity"
+ hint_text: "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
+ question_text: "Which of these best describes the lead tenant’s gender identity?"
+
+ ethnic_group:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic group"
+ hint_text: "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
+ question_text: "What is the lead tenant’s ethnic group?"
+
+ ethnic:
+ ethnic_background_black:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
+ question_text: "Which of the following best describes lead tenant’s Black, African, Caribbean or Black British background?"
+ ethnic_background_asian:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
+ question_text: "Which of the following best describes lead tenant’s Asian or Asian British background?"
+ ethnic_background_arab:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
+ question_text: "Which of the following best describes the lead tenant’s Arab background?"
+ ethnic_background_mixed:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
+ question_text: "Which of the following best describes lead tenant’s Mixed or Multiple ethnic groups background?"
+ ethnic_background_white:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
+ question_text: "Which of the following best describes lead tenant’s White background?"
+
+ national:
+ page_header: ""
+ check_answer_label: "Lead tenant’s nationality"
+ hint_text: "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
+ question_text: "What is the nationality of the lead tenant?"
+
+ ecstat1:
+ page_header: ""
+ check_answer_label: "Lead tenant’s working situation"
+ hint_text: "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
+ question_text: "Which of these best describes the lead tenant’s working situation?"
+
+ details_known_2:
+ page_header: "You’ve given us the details for 1 person in the household"
+ check_answer_label: "Details known for person 2"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 2?"
+
+ relat2:
+ page_header: ""
+ check_answer_label: "Person 2’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 2’s relationship to the lead tenant?"
+
+ age2:
+ page_header: ""
+ age2_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 2’s age?"
+ age2:
+ check_answer_label: "Person 2’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex2:
+ page_header: ""
+ check_answer_label: "Person 2’s gender identity"
+ hint_text: ""
+ question_text: "Which of these best describes person 2’s gender identity?"
+
+ ecstat2:
+ page_header: ""
+ check_answer_label: "Person 2’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 2’s working situation?"
+
+ details_known_3:
+ page_header: "You’ve given us the details for 2 people in the household"
+ check_answer_label: "Details known for person 3"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 3?"
+
+ relat3:
+ page_header: ""
+ check_answer_label: "Person 3’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 3’s relationship to the lead tenant?"
+
+ age3:
+ page_header: ""
+ age3_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 3’s age?"
+ age3:
+ check_answer_label: "Person 3’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex3:
+ page_header: ""
+ check_answer_label: "Person 3’s gender identity"
+ hint_text: ""
+ question_text: "Which of these best describes person 3’s gender identity?"
+
+ ecstat3:
+ page_header: ""
+ check_answer_label: "Person 3’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 3’s working situation?"
+
+ details_known_4:
+ page_header: "You’ve given us the details for 3 people in the household"
+ check_answer_label: "Details known for person 4"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 4?"
+
+ relat4:
+ page_header: ""
+ check_answer_label: "Person 4’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 4’s relationship to the lead tenant?"
+
+ age4:
+ page_header: ""
+ age4_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 4’s age?"
+ age4:
+ check_answer_label: "Person 4’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex4:
+ page_header: ""
+ check_answer_label: "Person 4’s gender identity"
+ hint_text: ""
+ question_text: "Which of these best describes person 4’s gender identity?"
+
+ ecstat4:
+ page_header: ""
+ check_answer_label: "Person 4’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 4’s working situation?"
+
+ details_known_5:
+ page_header: "You’ve given us the details for 4 people in the household"
+ check_answer_label: "Details known for person 5"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 5?"
+
+ relat5:
+ page_header: ""
+ check_answer_label: "Person 5’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 5’s relationship to the lead tenant?"
+
+ age5:
+ page_header: ""
+ age5_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 5’s age?"
+ age5:
+ check_answer_label: "Person 5’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex5:
+ page_header: ""
+ check_answer_label: "Person 5’s gender identity"
+ hint_text: ""
+ question_text: "Which of these best describes person 5’s gender identity?"
+
+ ecstat5:
+ page_header: ""
+ check_answer_label: "Person 5’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 5’s working situation?"
+
+ details_known_6:
+ page_header: "You’ve given us the details for 5 people in the household"
+ check_answer_label: "Details known for person 6"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 6?"
+
+ relat6:
+ page_header: ""
+ check_answer_label: "Person 6’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 6’s relationship to the lead tenant?"
+
+ age6:
+ page_header: ""
+ age6_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 6’s age?"
+ age6:
+ check_answer_label: "Person 6’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex6:
+ page_header: ""
+ check_answer_label: "Person 6’s gender identity"
+ hint_text: ""
+ question_text: "Which of these best describes person 6’s gender identity?"
+
+ ecstat6:
+ page_header: ""
+ check_answer_label: "Person 6’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 6’s working situation?"
+
+ details_known_7:
+ page_header: "You’ve given us the details for 6 people in the household"
+ check_answer_label: "Details known for person 7"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 7?"
+
+ relat7:
+ page_header: ""
+ check_answer_label: "Person 7’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 7’s relationship to the lead tenant?"
+
+ age7:
+ page_header: ""
+ age7_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 7’s age?"
+ age7:
+ check_answer_label: "Person 7’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex7:
+ page_header: ""
+ check_answer_label: "Person 7’s gender identity"
+ hint_text: ""
+ question_text: "Which of these best describes person 7’s gender identity?"
+
+ ecstat7:
+ page_header: ""
+ check_answer_label: "Person 7’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 7’s working situation?"
+
+ details_known_8:
+ page_header: "You’ve given us the details for 7 people in the household"
+ check_answer_label: "Details known for person 8"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 8?"
+
+ relat8:
+ page_header: ""
+ check_answer_label: "Person 8’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 8’s relationship to the lead tenant?"
+
+ age8:
+ page_header: ""
+ age8_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 8’s age?"
+ age8:
+ check_answer_label: "Person 8’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex8:
+ page_header: ""
+ check_answer_label: "Person 8’s gender identity"
+ hint_text: ""
+ question_text: "Which of these best describes person 8’s gender identity?"
+
+ ecstat8:
+ page_header: ""
+ check_answer_label: "Person 8’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 8’s working situation?"
\ No newline at end of file
diff --git a/config/locales/forms/2023/lettings/household_situation.en.yml b/config/locales/forms/2023/lettings/household_situation.en.yml
new file mode 100644
index 000000000..9e5e50918
--- /dev/null
+++ b/config/locales/forms/2023/lettings/household_situation.en.yml
@@ -0,0 +1,120 @@
+en:
+ forms:
+ 2023:
+ lettings:
+ household_situation:
+ layear:
+ page_header: ""
+ check_answer_label: "Length of time in local authority area"
+ hint_text: ""
+ question_text: "How long has the household continuously lived in the local authority area of the new letting?"
+
+ waityear:
+ page_header: ""
+ check_answer_label: "Length of time on local authority waiting list"
+ hint_text: ""
+ question_text: "How long has the household been on the local authority waiting list for the new letting?"
+
+ reason:
+ reason_for_leaving_last_settled_home_renewal:
+ page_header: ""
+ reason:
+ check_answer_label: "Reason for leaving last settled home"
+ hint_text: "You told us this letting is a renewal. We have removed some options because of this."
+ question_text: "What is the tenant’s main reason for the household leaving their last settled home?"
+ reasonother:
+ check_answer_label: "Length of time on local authority waiting list"
+ hint_text: ""
+ question_text: "How long has the household been on the local authority waiting list for the new letting?"
+ reason_for_leaving_last_settled_home:
+ page_header: ""
+ reason:
+ check_answer_label: "Reason for leaving last settled home"
+ hint_text: "The tenant’s ‘last settled home’ is their last long-standing home. For tenants who were in temporary accommodation or sleeping rough, their last settled home is where they were living previously."
+ question_text: "What is the tenant’s main reason for the household leaving their last settled home?"
+ reasonother:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "What is the reason?"
+
+ prevten:
+ renewal:
+ page_header: ""
+ check_answer_label: "Where was the household immediately before this letting?"
+ hint_text: "You told us this letting is a renewal. We have removed some options because of this.
This is where the household was the night before they moved into this new let."
+ question_text: "Where was the household immediately before this letting?"
+ not_renewal:
+ page_header: ""
+ check_answer_label: "Where was the household immediately before this letting?"
+ hint_text: "This is where the household was the night before they moved into this new let."
+ question_text: "Where was the household immediately before this letting?"
+
+ homeless:
+ page_header: ""
+ check_answer_label: "Household homeless immediately before letting"
+ hint_text: ""
+ question_text: "Did the household experience homelessness immediately before this letting?"
+
+ previous_postcode:
+ page_header: ""
+ ppcodenk:
+ check_answer_label: ""
+ hint_text: "This is also known as the household’s ‘last settled home’."
+ question_text: "Do you know the postcode of the household’s last settled accommodation?"
+ ppostcode_full:
+ check_answer_label: "Postcode of household’s last settled accommodation"
+ hint_text: ""
+ question_text: "Postcode for the previous accommodation"
+
+ previous_local_authority:
+ page_header: ""
+ previous_la_known:
+ check_answer_label: ""
+ hint_text: "This is also known as the household’s ‘last settled home’."
+ question_text: "Do you know the local authority of the household’s last settled accommodation?"
+ prevloc:
+ check_answer_label: "Location of household’s last settled accommodation"
+ hint_text: "Select ‘Northern Ireland’, ‘Scotland’, ‘Wales’ or ‘Outside the UK’ if the household’s last settled home was outside England."
+ question_text: "Select a local authority"
+
+ reasonpref:
+ page_header: ""
+ check_answer_label: "Household given reasonable preference"
+ hint_text: "Households may be given ‘reasonable preference’ for social housing, also known as ‘priority need’, by the local authority."
+ question_text: "Was the household given ‘reasonable preference’ by the local authority?"
+
+ reasonable_preference_reason:
+ page_header: ""
+ check_answer_label: "Reason for reasonable preference"
+ hint_text: "Select all that apply."
+ question_text: "Why was the household given ‘reasonable preference’?"
+
+ letting_allocation:
+ page_header: ""
+ check_answer_label: "Allocation system"
+ hint_text: "Select all that apply."
+ question_text: "How was this letting allocated?"
+
+ referral:
+ supported_housing:
+ prp:
+ page_header: ""
+ check_answer_label: "Source of referral for letting"
+ hint_text: ""
+ question_text: "What was the source of referral for this letting?"
+ la:
+ page_header: ""
+ check_answer_label: "Source of referral for letting"
+ hint_text: "You told us that you are a local authority. We have removed some options because of this."
+ question_text: "What was the source of referral for this letting?"
+ general_needs:
+ prp:
+ page_header: ""
+ check_answer_label: "Source of referral for letting"
+ hint_text: "You told us that the needs type is general needs. We have removed some options because of this."
+ question_text: "What was the source of referral for this letting?"
+ la:
+ page_header: ""
+ check_answer_label: "Source of referral for letting"
+ hint_text: "You told us that you are a local authority and that the needs type is general needs. We have removed some options because of this."
+ question_text: "What was the source of referral for this letting?"
\ No newline at end of file
diff --git a/config/locales/forms/2023/lettings/income_and_benefits.en.yml b/config/locales/forms/2023/lettings/income_and_benefits.en.yml
new file mode 100644
index 000000000..bc19c7954
--- /dev/null
+++ b/config/locales/forms/2023/lettings/income_and_benefits.en.yml
@@ -0,0 +1,108 @@
+en:
+ forms:
+ 2023:
+ lettings:
+ income_and_benefits:
+ net_income_known:
+ page_header: "Household’s combined income after tax"
+ check_answer_label: "Do you know the household’s combined total income after tax?"
+ hint_text: ""
+ question_text: "Do you know the household’s combined income after tax?"
+
+ income_amount:
+ page_header: "Total household income"
+ incfreq:
+ check_answer_label: "How often does the household receive this amount?"
+ hint_text: ""
+ question_text: "How often does the household receive this amount?"
+ earnings:
+ check_answer_label: "Total household income"
+ hint_text: ""
+ question_text: "How much income does the household have in total?"
+
+ hb:
+ page_header: ""
+ check_answer_label: "Housing-related benefits received"
+ hint_text: ""
+ question_text: "Is the household likely to be receiving any of these housing-related benefits?"
+
+ benefits:
+ page_header: ""
+ check_answer_label: "Household income from Universal Credit, state pension or benefit"
+ hint_text: "This excludes child and housing benefit, council tax support and tax credits."
+ question_text: "How much of the household’s income is from Universal Credit, state pensions or benefits?"
+
+ household_charge:
+ page_header: ""
+ check_answer_label: "Does the household pay rent or charges"
+ hint_text: "If rent is charged on the property then answer Yes to this question, even if the tenants do not pay it themselves."
+ question_text: "Does the household pay rent or other charges for the accommodation?"
+
+ period:
+ page_header: ""
+ check_answer_label: "Frequency of household rent and charges"
+ hint_text: "Select how often the household is charged. This may be different to how often they pay."
+ question_text: "How often does the household pay rent and other charges?"
+
+ care_home:
+ page_header: ""
+ is_carehome:
+ check_answer_label: "Care home accommodation"
+ hint_text: ""
+ question_text: "Is this accommodation a care home?"
+ chcharge_weekly:
+ check_answer_label: "Care home charges"
+ hint_text: ""
+ question_text: "How much does the household pay every week?"
+ chcharge_bi_weekly:
+ check_answer_label: "Care home charges"
+ hint_text: ""
+ question_text: "How much does the household pay every 2 weeks?"
+ chcharge_4_weekly:
+ check_answer_label: "Care home charges"
+ hint_text: ""
+ question_text: "How much does the household pay every 4 weeks?"
+ chcharge_monthly:
+ check_answer_label: "Care home charges"
+ hint_text: ""
+ question_text: "How much does the household pay every month?"
+
+ rent_and_charges:
+ page_header: "Household rent and charges"
+ brent:
+ check_answer_label: "Basic rent"
+ hint_text: "This is the amount paid before any charges are added for services (for example, hot water or cleaning). Households may receive housing benefit or Universal Credit towards basic rent."
+ question_text: "What is the basic rent?"
+ scharge:
+ check_answer_label: "Service charge"
+ hint_text: "For example, for cleaning. Households may receive housing benefit or Universal Credit towards the service charge."
+ question_text: "What is the service charge?"
+ pscharge:
+ check_answer_label: "Personal service charge"
+ hint_text: "For example, for heating or hot water. This doesn’t include housing benefit or Universal Credit."
+ question_text: "What is the personal service charge?"
+ supcharg:
+ check_answer_label: "Support charge"
+ hint_text: "Any charges made to fund support services included in tenancy agreement."
+ question_text: "What is the support charge?"
+ tcharge:
+ check_answer_label: "Household rent and charges"
+ hint_text: "This is the total for rent and all charges."
+ question_text: "Total charge"
+
+ hbrentshortfall:
+ page_header: ""
+ check_answer_label: "Any outstanding amount for basic rent and charges"
+ hint_text: "Also known as the ‘outstanding amount’."
+ question_text: "After the household has received any housing-related benefits, will they still need to pay for rent and charges?"
+
+ outstanding_amount:
+ page_header: ""
+ tshortfall_known:
+ check_answer_label: "Do you know the outstanding amount?"
+ hint_text: "You only need to give an approximate figure."
+ question_text: "Can you estimate the outstanding amount?"
+ tshortfall:
+ check_answer_label: "Estimated outstanding amountt"
+ hint_text: "Also known as the ‘outstanding amount’."
+ question_text: "Estimated outstanding amount"
diff --git a/config/locales/forms/2023/lettings/property_information.en.yml b/config/locales/forms/2023/lettings/property_information.en.yml
new file mode 100644
index 000000000..f1b652935
--- /dev/null
+++ b/config/locales/forms/2023/lettings/property_information.en.yml
@@ -0,0 +1,104 @@
+en:
+ forms:
+ 2023:
+ lettings:
+ property_information:
+ uprn:
+ page_header: ""
+ uprn_known:
+ check_answer_label: "UPRN known?"
+ hint_text: "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.
The UPRN may not be the same as the property reference assigned by your organisation.
If you don’t know the UPRN you can enter the address of the property instead on the next screen."
+ question_text: "Do you know the property's UPRN?"
+ uprn:
+ check_answer_label: "UPRN"
+ hint_text: ""
+ question_text: "What is the property's UPRN?"
+
+ uprn_confirmed:
+ page_header: "We found an address that might be this property"
+ check_answer_label: "Is this the right address?"
+ hint_text: ""
+ question_text: "Is this the property address?"
+
+ address:
+ page_header: "Q12 - What is the property's address?"
+ address_line1:
+ check_answer_label: "Address lines 1 and 2"
+ hint_text: ""
+ question_text: "Address line 1"
+ address_line2:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Address line 2 (optional)"
+ town_or_city:
+ check_answer_label: "Town or city"
+ hint_text: ""
+ question_text: "Town or city"
+ county:
+ check_answer_label: "County"
+ hint_text: ""
+ question_text: "County (optional)"
+ postcode_full:
+ check_answer_label: "Postcode"
+ hint_text: ""
+ question_text: "Postcode"
+
+ la:
+ page_header: ""
+ check_answer_label: "Local authority"
+ hint_text: ""
+ question_text: "What is the property’s local authority?"
+
+ first_time_property_let_as_social_housing:
+ page_header: ""
+ check_answer_label: "First time being let as social-housing?"
+ hint_text: ""
+ question_text: "Is this the first time the property has been let as social housing?"
+
+ unitletas:
+ page_header: ""
+ check_answer_label: "Most recent let type"
+ hint_text: ""
+ question_text: "What type was the property most recently let as?"
+
+ rsnvac:
+ page_header: ""
+ check_answer_label: "Vacancy reason"
+ hint_text: ""
+ question_text: "What is the reason for the property being vacant?"
+
+ offered:
+ page_header: ""
+ check_answer_label: "Times previously offered since becoming available."
+ hint_text: "Do not include the offer that led to this letting. This is after the last tenancy ended. If the property is being offered for let for the first time, enter 0."
+ question_text: "How many times was the property offered between becoming vacant and this letting?"
+
+ unittype_gn:
+ page_header: ""
+ check_answer_label: "Type of unit"
+ hint_text: ""
+ question_text: "What type of unit is the property?"
+
+ builtype:
+ page_header: ""
+ check_answer_label: "Type of building"
+ hint_text: ""
+ question_text: "What type of building is the property?"
+
+ wchair:
+ page_header: ""
+ check_answer_label: "Property built or adapted to wheelchair-user standards"
+ hint_text: ""
+ question_text: "Is the property built or adapted to wheelchair-user standards?"
+
+ beds:
+ page_header: ""
+ check_answer_label: "Number of bedrooms"
+ hint_text: "If shared accommodation, enter the number of bedrooms occupied by this household. A bedsit has 1 bedroom."
+ question_text: "How many bedrooms does the property have?"
+
+ voiddate:
+ page_header: "Void date"
+ check_answer_label: "Void date"
+ hint_text: ""
+ question_text: "What is the void date?"
diff --git a/config/locales/forms/2023/lettings/soft_validations.en.yml b/config/locales/forms/2023/lettings/soft_validations.en.yml
new file mode 100644
index 000000000..d0354f127
--- /dev/null
+++ b/config/locales/forms/2023/lettings/soft_validations.en.yml
@@ -0,0 +1,132 @@
+en:
+ forms:
+ 2023:
+ lettings:
+ soft_validations:
+ pregnancy_value_check:
+ no_females_pregnant_household_value_check:
+ page_header: ""
+ check_answer_label: "Pregnancy confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us somebody in the household is pregnant."
+ informative_text: "You also told us that all the tenants living at the property are male."
+ females_in_soft_age_range_in_pregnant_household_value_check:
+ page_header: ""
+ check_answer_label: "Pregnancy confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us somebody in the household is pregnant."
+ informative_text: "You also told us that any female tenants living at the property are in the following age ranges:
- under 16 years old
- over 50 years old
"
+
+ no_retirement_value_check:
+ page_header: ""
+ check_answer_label: "Retirement confirmation"
+ hint_text: ""
+ question_text: "Are you sure this person is retired?"
+ title_text: "You told us this person is aged %{age} years and retired."
+ informative_text: "The minimum expected retirement age in England is 66."
+
+ retirement_value_check:
+ page_header: ""
+ check_answer_label: "Retirement confirmation"
+ hint_text: ""
+ question_text: "Are you sure this person isn’t retired?"
+ title_text: "You told us this person is over 66 and not retired."
+ informative_text: ""
+
+ partner_under_16_value_check:
+ page_header: ""
+ check_answer_label: "Partner under 16 confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to the lead tenant."
+ informative_text: "Are you sure this is correct?"
+
+ multiple_partners_value_check:
+ page_header: ""
+ check_answer_label: "Multiple partners confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us there are more than 1 persons with 'Partner' relationship to the lead tenant."
+ informative_text: "Are you sure this is correct?"
+
+ reasonother_value_check:
+ page_header: ""
+ check_answer_label: "Reason other confirmation"
+ hint_text: ""
+ question_text: "Are you sure this doesn’t fit an existing category?"
+ title_text: "You told us that the tenant’s main reason for leaving their last settled home was %{reasonother}."
+ informative_text: "The reason you have entered looks very similar to one of the existing response categories. Please check the categories and select the appropriate one. If the existing categories are not suitable, please confirm here to move onto the next question."
+
+ referral_value_check:
+ page_header: ""
+ check_answer_label: "Referral confirmation"
+ hint_text: ""
+ question_text: "Are you sure?"
+ title_text: "Are you sure?"
+ informative_text: "This is a general needs log, and this referral type is for supported housing."
+
+ net_income_value_check:
+ page_header: ""
+ check_answer_label: "Net income confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that the household’s income is %{earnings} %{incfreq}."
+ informative_text: "This is %{net_income_higher_or_lower_text} than we would expect for the household’s working situation."
+
+ care_home_charges_value_check:
+ page_header: ""
+ check_answer_label: "Care home charges confirmation"
+ hint_text: ""
+ question_text: "Are you sure there are no care home charges?"
+ title_text: "Care home charges should be provided if this is a care home accommodation."
+ informative_text: "Are you sure there are no care home charges?"
+
+ rent_value_check:
+ page_header: ""
+ check_answer_label: "Total rent confirmation"
+ hint_text: "Check the following:
- the decimal point
- the frequency, for example every week or every calendar month
- the rent type is correct, for example affordable or social rent
"
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us the rent is %{brent}."
+ informative_text: "This is %{higher_or_lower} than we would expect."
+
+ scharge_value_check:
+ page_header: ""
+ check_answer_label: "Service charge confirmation"
+ hint_text: "Check the following:
- the decimal point
- the frequency, for example every week or every calendar month
- the needs type
"
+ question_text: "Are you sure?"
+ title_text: "You told us the service charge is %{scharge}."
+ informative_text: "This is higher than we would expect."
+
+ pscharge_value_check:
+ page_header: ""
+ check_answer_label: "Personal service charge confirmation"
+ hint_text: "Check the following:
- the decimal point
- the frequency, for example every week or every calendar month
- the needs type
"
+ question_text: "Are you sure?"
+ title_text: "You told us the personal service charge is %{pscharge}."
+ informative_text: "This is higher than we would expect."
+
+ supcharg_value_check:
+ page_header: ""
+ check_answer_label: "Support charge confirmation"
+ hint_text: "Check the following:
- the decimal point
- the frequency, for example every week or every calendar month
- the needs type
"
+ question_text: "Are you sure?"
+ title_text: "You told us the support charge is %{supcharg}."
+ informative_text: "This is higher than we would expect."
+
+ void_date_value_check:
+ page_header: ""
+ check_answer_label: "Void date confirmation"
+ hint_text: ""
+ question_text: "Are you sure the property has been vacant for this long?"
+ title_text: "You told us that the property has been vacant for more than 2 years."
+ informative_text: "This is higher than we would expect."
+
+ major_repairs_date_value_check:
+ page_header: ""
+ check_answer_label: "Major repairs date confirmation"
+ hint_text: ""
+ question_text: "Are you sure the property has been vacant for this long?"
+ title_text: "You told us the property has been vacant for 2 years."
+ informative_text: "This is higher than we would expect."
diff --git a/config/locales/forms/2023/lettings/tenancy_information.en.yml b/config/locales/forms/2023/lettings/tenancy_information.en.yml
new file mode 100644
index 000000000..e9331d4dc
--- /dev/null
+++ b/config/locales/forms/2023/lettings/tenancy_information.en.yml
@@ -0,0 +1,66 @@
+en:
+ forms:
+ 2023:
+ lettings:
+ tenancy_information:
+ joint:
+ page_header: ""
+ check_answer_label: "Is this a joint tenancy?"
+ hint_text: ""
+ question_text: "Is this a joint tenancy?"
+
+ startertenancy:
+ page_header: ""
+ check_answer_label: "Is this a starter or introductory tenancy?"
+ hint_text: "This is also known as an ‘introductory period’."
+ question_text: "Is this a starter tenancy?"
+
+ tenancy:
+ tenancy_type:
+ page_header: ""
+ tenancy:
+ check_answer_label: "Type of main tenancy"
+ hint_text: ""
+ question_text: "What is the type of tenancy?"
+ tenancyother:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Please state the tenancy type"
+ starter_tenancy_type:
+ page_header: ""
+ tenancy:
+ check_answer_label: "Type of main tenancy after the starter period has ended"
+ hint_text: "This is also known as an ‘introductory period’."
+ question_text: "What is the type of tenancy after the starter period has ended?"
+ tenancyother:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Please state the tenancy type"
+
+ tenancylength:
+ tenancy_length:
+ page_header: ""
+ check_answer_label: "Length of fixed-term tenancy"
+ hint_text: "Do not include the starter or introductory period."
+ question_text: "What is the length of the fixed-term tenancy to the nearest year?"
+ tenancy_length_affordable_rent:
+ page_header: ""
+ check_answer_label: "Length of fixed-term tenancy"
+ hint_text: "Do not include the starter or introductory period.The minimum period is 2 years for social or affordable rent general needs logs and you do not need a log for shorter tenancies."
+ question_text: "What is the length of the fixed-term tenancy to the nearest year?"
+ tenancy_length_intermediate_rent:
+ page_header: ""
+ check_answer_label: "Length of fixed-term tenancy"
+ hint_text: "Do not include the starter or introductory period.The minimum period is 1 year for intermediate rent general needs logs and you do not need a log for shorter tenancies."
+ question_text: "What is the length of the fixed-term tenancy to the nearest year?"
+ tenancy_length_periodic:
+ page_header: ""
+ check_answer_label: "Length of periodic tenancy"
+ hint_text: "As this is a periodic tenancy, this question is optional. If you do not have the information available click save and continue"
+ question_text: "What is the length of the periodic tenancy to the nearest year?"
+
+ sheltered:
+ page_header: ""
+ check_answer_label: "Is this letting in sheltered accommodation?"
+ hint_text: "Sheltered housing and special retirement housing are for tenants with low-level care and support needs. This typically provides some limited support to enable independent living, such as alarm-based assistance or a scheme manager.Extra care housing is for tenants with medium to high care and support needs, often with 24 hour access to support staff provided by an agency registered with the Care Quality Commission."
+ question_text: "Is this letting in sheltered accommodation?"
diff --git a/config/locales/forms/2023/sales/guidance.en.yml b/config/locales/forms/2023/sales/guidance.en.yml
new file mode 100644
index 000000000..22e953521
--- /dev/null
+++ b/config/locales/forms/2023/sales/guidance.en.yml
@@ -0,0 +1,47 @@
+en:
+ forms:
+ 2023:
+ sales:
+ guidance:
+ shared_ownership_type_definitions:
+ title: "Shared Ownership Type Definitions"
+ content: "
Shared ownership: Cannot be used for homes funded through the Affordable Homes Programme 2021 to 2026. Use the 2021 model lease for these properties.
+
Shared ownership 2021 model lease: Homes bought using the Affordable Homes Programme 2021 to 2026.
+
Older Persons Shared Ownership: A type of shared ownership for those 55 years and over.
+
Social HomeBuy shared ownership purchase: Tenants of private registered providers purchase their home at discount on Shared Ownership terms.
+
>Home Ownership for people with Long-Term Disabilities (HOLD): A shared ownership sale for those with long term disabilities.
+
Rent to Buy shared ownership: A sale following a period of discounted rent.
+
Right to Shared Ownership: A sale of a share of a rented home to a tenant using this scheme.
+
London Living Rent shared ownership: A shared ownership sale following a period of discounted rent as part of the London Living Rent scheme.
"
+
+ discounted_ownership_type_definitions:
+ title: "Discounted Ownership Type Definitions"
+ content: "
Right to Acquire (RTA): a discounted sale of a property built or purchased after 31 March 1997 to tenants of a private registered provider.
+
Preserved Right to Buy (PRTB): a discounted sale of a property that used to be owned by a council to tenants of a private registered provider.
+
Voluntary Right to Buy (VRTB): a discounted sale to tenants in this PRP owned property, as part of a pilot scheme.
+
Right to Buy (RTB): a discounted sale to tenants in this council owned property.
+
Rent to Buy full ownership: a sale on full ownership terms following a period of discounted rent.
+
Social HomeBuy for outright purchase: a discounted sale to tenants of a private registered provider on full ownership terms.
+
Any other equity loan scheme: any scheme, not covered elsewhere, in which a loan is used to purchase equity.
"
+
+ mortgage_lender:
+ title: "Can’t find the mortgage lender you’re looking for?"
+ content: "
+ - Double check the spelling and try again
+ - Type the first few letters to see the suggestions
+ - Type Other and continue - we’ll ask you to type in your answer in the next question
+
"
+
+ outright_sale_type_definitions:
+ title: "Outright sale type definitions"
+ content: "
Outright sale: the full purchase of a property, usually with a mortgage or cash.
+
Other sale: any sale which does not fit the criteria of any of the remaining options.
"
+
+ privacy_notice_buyer_joint_purchase:
+ content: "Make sure the buyers have seen %{privacy_notice_link} before completing this log."
+ privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice"
+
+ privacy_notice_buyer:
+ content: "Make sure the buyer has seen %{privacy_notice_link} before completing this log."
+ privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice"
+
\ No newline at end of file
diff --git a/config/locales/forms/2023/sales/household_situation.en.yml b/config/locales/forms/2023/sales/household_situation.en.yml
new file mode 100644
index 000000000..e22777a28
--- /dev/null
+++ b/config/locales/forms/2023/sales/household_situation.en.yml
@@ -0,0 +1,50 @@
+en:
+ forms:
+ 2023:
+ sales:
+ household_situation:
+ prevten:
+ page_header: ""
+ check_answer_label: "Buyer 1’s previous tenure"
+ hint_text: ""
+ question_text: "What was buyer 1’s previous tenure?"
+
+ last_accommodation:
+ page_header: ""
+ ppcodenk:
+ check_answer_label: "Buyer 1’s last settled accommodation"
+ hint_text: "This is also known as the household’s 'last settled home'"
+ question_text: "Do you know the postcode of buyer 1’s last settled accommodation?"
+ ppostcode_full:
+ check_answer_label: "Postcode of buyer 1’s last settled accommodation"
+ hint_text: ""
+ question_text: "Postcode"
+
+ last_accommodation_la:
+ page_header: ""
+ previous_la_known:
+ check_answer_label: "Local authority of buyer 1’s last settled accommodation"
+ hint_text: "This is also known as the household’s 'last settled home'"
+ question_text: "Do you know the local authority of buyer 1’s last settled accommodation?"
+ prevloc:
+ check_answer_label: "Local authority of buyer 1’s last settled accommodation"
+ hint_text: ""
+ question_text: "Select a local authority"
+
+ buyers_organisations:
+ page_header: ""
+ check_answer_label: "Organisations buyers were registered with"
+ hint_text: "Select all that apply. This question is optional. If no options are applicable, leave the options blank, and select save and continue."
+ question_text: "What organisations were the buyers registered with?"
+
+ buy2living:
+ page_header: ""
+ check_answer_label: "Buyer 2 living at the same address"
+ hint_text: ""
+ header: "At the time of purchase, was buyer 2 living at the same address as buyer 1?"
+
+ prevtenbuy2:
+ page_header: ""
+ check_answer_label: "Buyer 2’s previous tenure"
+ hint_text: ""
+ question_text: "What was buyer 2’s previous tenure?"
diff --git a/config/locales/forms/2023/sales/property_information.en.yml b/config/locales/forms/2023/sales/property_information.en.yml
new file mode 100644
index 000000000..c4dd84130
--- /dev/null
+++ b/config/locales/forms/2023/sales/property_information.en.yml
@@ -0,0 +1,74 @@
+en:
+ forms:
+ 2023:
+ sales:
+ property_information:
+ uprn:
+ page_header: ""
+ uprn_known:
+ check_answer_label: "UPRN known?"
+ hint_text: "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.
The UPRN may not be the same as the property reference assigned by your organisation.
If you don’t know the UPRN you can enter the address of the property instead on the next screen."
+ question_text: "Do you know the property's UPRN?"
+ uprn:
+ check_answer_label: "UPRN"
+ hint_text: ""
+ question_text: "What is the property's UPRN?"
+
+ uprn_confirmed:
+ page_header: "We found an address that might be this property"
+ check_answer_label: "Is this the right address?"
+ hint_text: ""
+ question_text: "Is this the property address?"
+
+ address:
+ page_header: "Q15 - What is the property's address?"
+ address_line1:
+ check_answer_label: "Address lines 1 and 2"
+ hint_text: ""
+ question_text: "Address line 1"
+ address_line2:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Address line 2 (optional)"
+ town_or_city:
+ check_answer_label: "Town or city"
+ hint_text: ""
+ question_text: "Town or city"
+ county:
+ check_answer_label: "County"
+ hint_text: ""
+ question_text: "County (optional)"
+ postcode_full:
+ check_answer_label: "Postcode"
+ hint_text: ""
+ question_text: "Postcode"
+
+ la:
+ page_header: ""
+ check_answer_label: "Local authority"
+ hint_text: ""
+ question_text: "What is the property’s local authority?"
+
+ beds:
+ page_header: ""
+ check_answer_label: "Number of bedrooms"
+ hint_text: "A bedsit has 1 bedroom."
+ question_text: "How many bedrooms does the property have?"
+
+ proptype:
+ page_header: ""
+ check_answer_label: "Type of unit"
+ hint_text: ""
+ question_text: "What type of unit is the property?"
+
+ builtype:
+ page_header: ""
+ check_answer_label: "Type of building"
+ hint_text: ""
+ question_text: "What type of building is the property?"
+
+ wchair:
+ page_header: ""
+ check_answer_label: "Property built or adapted to wheelchair-user standards"
+ hint_text: ""
+ question_text: "Is the property built or adapted to wheelchair-user standards?"
diff --git a/config/locales/forms/2023/sales/sale_information.en.yml b/config/locales/forms/2023/sales/sale_information.en.yml
new file mode 100644
index 000000000..318d7c7db
--- /dev/null
+++ b/config/locales/forms/2023/sales/sale_information.en.yml
@@ -0,0 +1,208 @@
+en:
+ forms:
+ 2023:
+ sales:
+ sale_information:
+ living_before_purchase:
+ joint_purchase:
+ page_header: ""
+ proplen:
+ check_answer_label: "Number of years living in the property before purchase"
+ hint_text: "You should round up to the nearest year"
+ question_text: "How long did they live there?"
+ proplen_asked:
+ check_answer_label: "Buyers lived in the property before purchasing"
+ hint_text: ""
+ question_text: "Did the buyers live in the property before purchasing it?"
+ not_joint_purchase:
+ page_header: ""
+ proplen:
+ check_answer_label: "Number of years living in the property before purchase"
+ hint_text: "You should round up to the nearest year"
+ question_text: "How long did they live there?"
+ proplen_asked:
+ check_answer_label: "Buyer lived in the property before purchasing"
+ hint_text: ""
+ question_text: "Did the buyer live in the property before purchasing it?"
+
+ staircasing:
+ page_header: ""
+ check_answer_label: "Staircasing transaction"
+ hint_text: "A staircasing transaction is when the household purchases more shares in their property, increasing the proportion they own and decreasing the proportion the housing association owns. Once the household purchases 100% of the shares, they own the property"
+ question_text: "Is this a staircasing transaction?"
+ about_staircasing:
+ page_header: "About the staircasing transaction"
+ stairbought:
+ check_answer_label: "Percentage bought in this staircasing transaction"
+ hint_text: ""
+ question_text: "What percentage of the property has been bought in this staircasing transaction?"
+ stairowned:
+ joint_purchase:
+ check_answer_label: "Percentage the buyers now own in total"
+ hint_text: ""
+ question_text: "What percentage of the property do the buyers now own in total?"
+ not_joint_purchase:
+ check_answer_label: "Percentage the buyer now owns in total"
+ hint_text: ""
+ question_text: "What percentage of the property does the buyer now own in total?"
+
+ resale:
+ page_header: ""
+ check_answer_label: "Is this a resale?"
+ hint_text: "If the social landlord has previously sold the property to another buyer and is now reselling the property, select 'yes'. If this is the first time the property has been sold, select 'no'."
+ question_text: "Is this a resale?"
+
+ exchange_date:
+ page_header: ""
+ check_answer_label: "Exchange of contracts date"
+ hint_text: ""
+ question_text: "What is the exchange of contracts date?"
+
+ handover_date:
+ page_header: ""
+ check_answer_label: "Practical completion or handover date"
+ hint_text: "This is the date on which the building contractor hands over responsibility for the completed property to the private registered provider (PRP)"
+ question_text: "What is the practical completion or handover date?"
+
+ la_nominations:
+ page_header: ""
+ check_answer_label: "Household rehoused under a local authority nominations agreement?"
+ hint_text: "A local authority nominations agreement is a written agreement between a local authority and private registered provider (PRP) that some or all of its sales vacancies are offered to local authorities for rehousing"
+ question_text: "Was the household rehoused under a 'local authority nominations agreement'?"
+
+ soctenant:
+ joint_purchase:
+ page_header: ""
+ check_answer_label: "Any buyers were registered providers, housing association or local authority tenants immediately before this sale?"
+ hint_text: ""
+ question_text: "Were any of the buyers private registered providers, housing association or local authority tenants immediately before this sale?"
+ not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Buyer was a registered provider, housing association or local authority tenant immediately before this sale?"
+ hint_text: ""
+ question_text: "Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale?"
+
+ frombeds:
+ page_header: "About the buyers’ previous property"
+ check_answer_label: "Number of bedrooms in previous property"
+ hint_text: "For bedsits enter 1"
+ question_text: "How many bedrooms did the property have?"
+
+ fromprop:
+ page_header: ""
+ check_answer_label: "Previous property type"
+ hint_text: ""
+ question_text: "What was the previous property type?"
+
+ socprevten:
+ page_header: ""
+ check_answer_label: "Previous property tenure"
+ hint_text: ""
+ question_text: "What was the previous tenure of the buyer?"
+
+ value:
+ page_header: "About the price of the property"
+ check_answer_label: "Full purchase price"
+ hint_text: "Enter the full purchase price of the property before any discounts are applied. For shared ownership, enter the full purchase price paid for 100% equity (this is equal to the value of the share owned by the PRP plus the value bought by the purchaser)"
+ question_text: "What was the full purchase price?"
+
+ equity:
+ page_header: "About the price of the property"
+ check_answer_label: "Initial percentage equity stake"
+ hint_text: "Enter the amount of initial equity held by the purchaser (for example, 25% or 50%)"
+ question_text: "What was the initial percentage equity stake purchased?"
+
+ mortgageused:
+ page_header: "Mortgage Amount"
+ check_answer_label: "Mortgage used"
+ hint_text: ""
+ question_text: "Was a mortgage used for the purchase of this property?"
+
+ mortgage:
+ page_header: "Mortgage Amount"
+ check_answer_label: "Mortgage amount"
+ hint_text: "Enter the amount of mortgage agreed with the mortgage lender. Exclude any deposits or cash payments. Numeric in pounds. Rounded to the nearest pound."
+ question_text: "What is the mortgage amount?"
+
+ mortgagelender:
+ page_header: ""
+ check_answer_label: "Mortgage lender"
+ hint_text: ""
+ question_text: "What is the name of the mortgage lender?"
+
+ mortgagelenderother:
+ page_header: ""
+ check_answer_label: "Other Mortgage Lender"
+ hint_text: ""
+ question_text: "What is the other mortgage lender?"
+
+ mortlen:
+ page_header: ""
+ check_answer_label: "Length of mortgage"
+ hint_text: "You should round up to the nearest year. Value should not exceed 60 years."
+ question_text: "What is the length of the mortgage?"
+
+ extrabor:
+ page_header: ""
+ check_answer_label: "Any other borrowing?"
+ hint_text: ""
+ question_text: "Does this include any extra borrowing?"
+
+ deposit:
+ page_header: "About the deposit"
+ check_answer_label: "Deposit amount"
+ hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan"
+ question_text: "How much cash deposit was paid on the property?"
+
+ cashdis:
+ page_header: "About the deposit"
+ check_answer_label: "Cash discount through SocialHomeBuy"
+ hint_text: "Enter the total cash discount given on the property being purchased through the Social HomeBuy scheme"
+ question_text: "How much cash discount was given through Social HomeBuy?"
+
+ mrent:
+ page_header: ""
+ check_answer_label: "Monthly rent"
+ hint_text: "Amount paid before any charges"
+ question_text: "What is the basic monthly rent?"
+
+ leaseholdcharges:
+ page_header: ""
+ has_mscharge:
+ check_answer_label: "Does the property have any monthly leasehold charges?"
+ hint_text: "For example, service and management charges"
+ question_text: "Does the property have any monthly leasehold charges?"
+ mscharge:
+ check_answer_label: "Monthly leasehold charges"
+ hint_text: ""
+ question_text: "Enter the total monthly charge"
+
+ purchase_price:
+ shared_ownership:
+ page_header: "About the price of the property"
+ check_answer_label: "Purchase price"
+ hint_text: "For all schemes, including Right to Acquire (RTA), Right to Buy (RTB), Voluntary Right to Buy (VRTB) or Preserved Right to Buy (PRTB) sales, enter the full price of the property without any discount"
+ question_text: "What is the full purchase price?"
+ discounted_ownership:
+ page_header: "About the price of the property"
+ check_answer_label: "Purchase price"
+ hint_text: "For all schemes, including Right to Acquire (RTA), Right to Buy (RTB), Voluntary Right to Buy (VRTB) or Preserved Right to Buy (PRTB) sales, enter the full price of the property without any discount"
+ question_text: "What is the full purchase price?"
+ outright_sale:
+ page_header: "About the price of the property"
+ check_answer_label: "Purchase price"
+ hint_text: ""
+ question_text: "What is the full purchase price?"
+
+ discount:
+ page_header: "About the price of the property"
+ check_answer_label: "Percentage discount"
+ hint_text: "For Right to Buy (RTB), Preserved Right to Buy (PRTB), and Voluntary Right to Buy (VRTB)If discount capped, enter capped %If the property is being sold to an existing tenant under the RTB, PRTB, or VRTB schemes, enter the % discount from the full market value that is being given."
+ question_text: "What was the percentage discount?"
+
+ grant:
+ page_header: "About the price of the property"
+ check_answer_label: "Amount of any loan, grant or subsidy"
+ hint_text: "For all schemes except Right to Buy (RTB), Preserved Right to Buy (PRTB), Voluntary Right to Buy (VRTB) and Rent to Buy"
+ question_text: "What was the amount of any loan, grant, discount or subsidy given?"
+
\ No newline at end of file
diff --git a/config/locales/forms/2023/sales/soft_validations.en.yml b/config/locales/forms/2023/sales/soft_validations.en.yml
index 3467b9432..20f131e90 100644
--- a/config/locales/forms/2023/sales/soft_validations.en.yml
+++ b/config/locales/forms/2023/sales/soft_validations.en.yml
@@ -18,6 +18,7 @@ en:
question_text: "Are you sure this person is retired?"
title_text: "You told us this person is aged %{age} years and retired."
informative_text: "The minimum expected retirement age in England is 66."
+
old_persons_shared_ownership_value_check:
page_header: ""
check_answer_label: "Shared ownership confirmation"
@@ -27,6 +28,7 @@ en:
joint_purchase: "You told us the buyers are using the Older Persons Shared Ownership scheme."
not_joint_purchase: "You told us the buyer is using the Older Persons Shared Ownership scheme."
informative_text: "At least one buyer must be aged 65 years and over to use this scheme."
+
income1_value_check:
check_answer_label: "Buyer 1 income confirmation"
hint_text: ""
@@ -38,6 +40,7 @@ en:
max:
page_header: ""
title_text: "You told us the income of buyer 1 is %{income}. This seems high. Are you sure this is correct?"
+
income2_value_check:
check_answer_label: "Buyer 2 income confirmation"
hint_text: ""
@@ -49,12 +52,14 @@ en:
max:
page_header: ""
title_text: "You told us the income of buyer 2 is %{income}. This seems high. Are you sure this is correct?"
+
combined_income_value_check:
page_header: ""
check_answer_label: "Combined income confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
title_text: "You told us the combined income of this household is %{combined_income}. This seems high. Are you sure this is correct?"
+
mortgage_value_check:
page_header: ""
check_answer_label: "Mortgage confirmation"
@@ -62,34 +67,88 @@ en:
question_text: "Are you sure that the mortgage is more than 5 times the income used for the mortgage application?"
title_text: "You told us that the mortgage amount is %{mortgage}."
informative_text: "This is more than 5 times the income, which is higher than we would expect."
+
savings_value_check:
page_header: ""
check_answer_label: "Savings confirmation"
hint_text: ""
question_text: "Are you sure the savings are higher than £100,000?"
joint_purchase:
- title_text: You told us the buyers’ savings were %{savings}."
+ title_text: "You told us the buyers’ savings were %{savings}."
informative_text: "This is higher than we would expect."
not_joint_purchase:
title_text: "You told us the buyer’s savings were %{savings}."
informative_text: "This is higher than we would expect."
- deposit_value_check::
+
+ staircase_bought_value_check:
page_header: ""
- check_answer_label: "Deposit confirmation"
+ check_answer_label: "Percentage bought confirmation"
hint_text: ""
- question_text: "Are you sure that the deposit is this much higher than the buyer's savings?"
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that %{percentage}% was bought in this staircasing transaction."
+ informative_text: "Most staircasing transactions are less than 50%"
+
+ stairowned_value_check:
joint_purchase:
+ page_header: ""
+ check_answer_label: "Percentage owned confirmation"
+ hint_text: ""
+ question_text: "Are you sure?"
+ title_text: "You told us that the buyers now own %{stairowned} of the property."
+ informative_text: "The maximum percentage that can be owned under the Older Persons Shared Ownership scheme is 75%, unless the property was funded outside the Affordable Homes Programme. Make sure these answers are correct."
+ not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Percentage owned confirmation"
+ hint_text: ""
+ question_text: "Are you sure?"
+ title_text: "You told us that the buyer now owns %{stairowned} of the property."
+ informative_text: "The maximum percentage that can be owned under the Older Persons Shared Ownership scheme is 75%, unless the property was funded outside the Affordable Homes Programme. Make sure these answers are correct."
+
+ hodate_check:
+ page_header: ""
+ check_answer_label: "Practical completion or handover date check"
+ hint_text: ""
+ question_text: "Are you sure?"
+ title_text: "You told us practical completion or handover date is more than 3 years before sale completion date."
+
+ value_value_check:
+ page_header: ""
+ check_answer_label: "Purchase price confirmation"
+ hint_text: ""
+ question_text: "Are you sure?"
+ title_text: "You told us the purchase price is %{value}."
+ informative_text: "This is %{higher_or_lower} than we would expect."
+
+ shared_ownership_deposit_value_check:
+ page_header: ""
+ check_answer_label: "Shared ownership deposit confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that the %{mortgage_deposit_and_discount_error_fields} add up to %{mortgage_deposit_and_discount_total}."
+
+ deposit_value_check:
+ joint_purchase:
+ page_header: ""
+ check_answer_label: "Deposit confirmation"
+ hint_text: ""
+ question_text: "Are you sure that the deposit is this much higher than the buyer's savings?"
title_text: "You told us the buyers’ deposit was %{deposit} and their savings were %{savings}."
informative_text: "The deposit amount is higher than we would expect for the amount of savings they have."
not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Deposit confirmation"
+ hint_text: ""
+ question_text: "Are you sure that the deposit is this much higher than the buyer's savings?"
title_text: "You told us the buyer’s deposit was %{deposit} and their savings were %{savings}."
informative_text: "The deposit amount is higher than we would expect for the amount of savings they have."
+
wheel_value_check:
page_header: ""
check_answer_label: "Does anyone in the household use a wheelchair?"
hint_text: ""
question_text: "You told us that someone in the household uses a wheelchair."
title_text: "You told us that someone in the household uses a wheelchair."
+
buyer_livein_value_check:
buyer1:
page_header: ""
@@ -105,6 +164,7 @@ en:
question_text: "Are you sure this is correct?"
title_text: "You told us that buyer 2 will not live in the property."
informative_text: "For %{ownership_scheme} types, the buyer usually lives in the property."
+
student_not_child_value_check:
page_header: ""
check_answer_label: "Student not a child confirmation"
@@ -112,6 +172,7 @@ en:
question_text: "Are you sure this person is not a child?"
title_text: "You told us this person is a student aged between 16 and 19."
informative_text: "Are you sure this person is not a child?"
+
partner_under_16_value_check:
page_header: ""
check_answer_label: "Partner under 16 confirmation"
@@ -119,6 +180,7 @@ en:
question_text: "Are you sure this is correct?"
title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to buyer 1."
informative_text: "Are you sure this is correct?"
+
multiple_partners_value_check:
page_header: ""
check_answer_label: "Multiple partners confirmation"
@@ -126,3 +188,51 @@ en:
question_text: "Are you sure this is correct?"
title_text: "You told us there are more than 1 persons with 'Partner' relationship to buyer 1."
informative_text: "Are you sure this is correct?"
+
+ monthly_charges_value_check:
+ page_header: ""
+ check_answer_label: "Monthly charges confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that the monthly charges were %{mscharge}."
+ informative_text: "This is higher than we would expect."
+
+ extra_borrowing_value_check:
+ page_header: ""
+ check_answer_label: "Extra borrowing confirmation"
+ hint_text: ""
+ question_text: "Are you sure there is no extra borrowing?"
+ title_text: "You told us that the mortgage and deposit total is %{mortgage_and_deposit_total}."
+ informative_text: "This is higher than the purchase price minus the discount."
+
+ percentage_discount_value_check:
+ page_header: ""
+ check_answer_label: "Percentage discount confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that the percentage discount is %{discount}."
+ informative_text: "This is higher than we would expect."
+
+ grant_value_check:
+ page_header: ""
+ check_answer_label: "Grant value confirmation"
+ hint_text: ""
+ question_text: "Are you sure? Grants are usually £9,000 - £16,000"
+ title_text: "You told us that the grant amount is %{grant}."
+ informative_text: "Loans, grants and subsidies are usually between £9,000 and £16,000."
+
+ discounted_sale_value_check:
+ page_header: ""
+ check_answer_label: "Discounted sale value confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "Mortgage, deposit, and grant total must equal %{value_with_discount}."
+ informative_text: "Your given mortgage, deposit and grant total is %{mortgage_deposit_and_grant_total}."
+
+ deposit_and_mortgage_value_check:
+ page_header: ""
+ check_answer_label: "Deposit and mortgage against discount confirmation"
+ hint_text: ""
+ question_text: "Are you sure? Mortgage and deposit usually equal or are more than (value - discount)"
+ title_text: "You told us the mortgage amount was %{mortgage}, the cash deposit was %{deposit} and the discount was %{discount}."
+ informative_text: "We would expect the mortgage amount and the deposit added together to be the same as the purchase price minus the discount."
diff --git a/config/locales/forms/2024/lettings/guidance.en.yml b/config/locales/forms/2024/lettings/guidance.en.yml
new file mode 100644
index 000000000..922124a94
--- /dev/null
+++ b/config/locales/forms/2024/lettings/guidance.en.yml
@@ -0,0 +1,63 @@
+en:
+ forms:
+ 2024:
+ lettings:
+ guidance:
+ finding_location:
+ title: "What is a location?"
+ content: "A location is a postcode area where supported housing is provided under a scheme. A scheme can have multiple locations, and a location can have multiple units at the same postcode."
+ scheme_changes_link_text: "Read more about schemes and locations"
+
+ finding_scheme:
+ title: "Can’t find your scheme?"
+ content: "
Schemes are attached to the organisation that owns the property. Check you have correctly answered question 1 \"Which organisation owns this property?\"
+
If your organisation’s schemes were migrated from old CORE, they may have new names and codes. Search by postcode to find your scheme.
"
+ scheme_changes_link_text: "Read more about how schemes have changed"
+ view_schemes_link_text: "View your organisation’s schemes"
+
+ privacy_notice_tenant:
+ content: "Make sure the lead tenant has seen or been given access to %{privacy_notice_link} before completing this log. This is a legal requirement under data protection legislation."
+ privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice"
+
+ rent_type_definitions:
+ title: "Rent type definitions"
+ content: "
Social Rent: where target rents are determined through the national rent regime. This is sometimes also known as 'formula rent'.
+
Affordable Rent: where up to 80% of market rent can be charged. A new supply agreement is signed with Homes England or the Greater London Authority (GLA).
+
London Affordable Rent: a tenure of affordable housing available in London by the GLA. It is an affordable rent which must be set in accordance with the Regulator of Social Housing’s Affordable Rent guidance. The landlord of these homes must be registered with the Regulator of Social Housing. These are a type of Affordable Rent lettings.
+
Rent to Buy: a discount of up to 20% market rent is charged for a single rental period for a minimum of 5 years. After that period, the tenant is offered first chance to purchase the property (either shared ownership or outright) at full market value. These are a type of Intermediate Rent lettings.
+
London Living Rent: a tenure of affordable housing available in London by the GLA. It was introduced in Affordable Homes Programme 2016 to 2021. These are a type of Intermediate Rent lettings.
+
Other intermediate rent: any other specific scheme where up to 80% of market rent can be charged. This includes schemes with reduced rent so tenants can save towards a house purchasing deposit and schemes with an in-built future opportunity to buy the property being rented.
"
+
+ scheme_selection:
+ data_provider:
+ content: "If you’re not sure which scheme to choose, ask a data coordinator. Find your data coordinators on the %{users_page_link}."
+ users_page_link_text: "users page"
+ data_coordinator:
+ create_scheme_link_text: "Create a new supported housing scheme"
+
+ void_date:
+ title: "What is a void date?"
+ content: "
Date the property was (legally or contractually) available to let, or for:
+
+ - re-lets: the day after the previous tenant's contract ended
+ - new builds: the day the landlord legally first owned the property (‘completion date’)
+ - new conversions or acquisitions: completion date, or the day after rehabilitation work ended
+ - new leases: the day the landlord got contractual property rights and could let it out to tenants
+
"
+
+ what_counts_as_income:
+ title: "What counts as income?"
+ content: "
You should include any income after tax from:
+
+ - employment
+ - pensions
+ - Universal Credit
+
+
+
Don’t include:
+
+ - National Insurance (NI) contributions and tax
+ - housing benefit
+ - child benefit
+ - council tax support
+
"
\ No newline at end of file
diff --git a/config/locales/forms/2024/lettings/household_characteristics.en.yml b/config/locales/forms/2024/lettings/household_characteristics.en.yml
new file mode 100644
index 000000000..04a311f06
--- /dev/null
+++ b/config/locales/forms/2024/lettings/household_characteristics.en.yml
@@ -0,0 +1,322 @@
+en:
+ forms:
+ 2024:
+ lettings:
+ household_characteristics:
+ hhmemb:
+ page_header: ""
+ check_answer_label: "Number of household members"
+ hint_text: "You can provide details for a maximum of 8 people."
+ question_text: "How many people live in the household for this letting?"
+
+ age1:
+ page_header: ""
+ age1_known:
+ check_answer_label: ""
+ hint_text: "The ’lead’ or ’main’ tenant is the person in the household who does the most paid work. If several people do the same amount of paid work, the lead tenant is whoever is the oldest."
+ question_text: "Do you know the lead tenant’s age?"
+ age1:
+ check_answer_label: "Lead tenant’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex1:
+ page_header: ""
+ check_answer_label: "Lead tenant’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes the lead tenant’s gender identity?"
+
+ ethnic_group:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic group"
+ hint_text: ""
+ question_text: "What is the lead tenant’s ethnic group?"
+
+ ethnic:
+ ethnic_background_black:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes lead tenant’s Black, African, Caribbean or Black British background?"
+ ethnic_background_asian:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes lead tenant’s Asian or Asian British background?"
+ ethnic_background_arab:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes the lead tenant’s Arab background?"
+ ethnic_background_mixed:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes lead tenant’s Mixed or Multiple ethnic groups background?"
+ ethnic_background_white:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes lead tenant’s White background?"
+
+ nationality_all:
+ page_header: ""
+ nationality_all:
+ check_answer_label: "Lead tenant’s nationality"
+ hint_text: ""
+ question_text: "Enter a nationality"
+ nationality_all_group:
+ check_answer_label: "Lead tenant’s nationality"
+ hint_text: "If the lead tenant is a dual national of the United Kingdom and another country, enter United Kingdom. If they are a dual national of two other countries, the tenant should decide which country to enter."
+ question_text: "What is the nationality of the lead tenant?"
+
+ ecstat1:
+ page_header: ""
+ check_answer_label: "Lead tenant’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes the lead tenant’s working situation?"
+
+ details_known_2:
+ page_header: "You’ve given us the details for 1 person in the household"
+ check_answer_label: "Details known for person 2"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 2?"
+
+ relat2:
+ page_header: ""
+ check_answer_label: "Person 2’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 2’s relationship to the lead tenant?"
+
+ age2:
+ page_header: ""
+ age2_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 2’s age?"
+ age2:
+ check_answer_label: "Person 2’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex2:
+ page_header: ""
+ check_answer_label: "Person 2’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes person 2’s gender identity?"
+
+ ecstat2:
+ page_header: ""
+ check_answer_label: "Person 2’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 2’s working situation?"
+
+ details_known_3:
+ page_header: "You’ve given us the details for 2 people in the household"
+ check_answer_label: "Details known for person 3"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 3?"
+
+ relat3:
+ page_header: ""
+ check_answer_label: "Person 3’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 3’s relationship to the lead tenant?"
+
+ age3:
+ page_header: ""
+ age3_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 3’s age?"
+ age3:
+ check_answer_label: "Person 3’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex3:
+ page_header: ""
+ check_answer_label: "Person 3’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes person 3’s gender identity?"
+
+ ecstat3:
+ page_header: ""
+ check_answer_label: "Person 3’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 3’s working situation?"
+
+ details_known_4:
+ page_header: "You’ve given us the details for 3 people in the household"
+ check_answer_label: "Details known for person 4"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 4?"
+
+ relat4:
+ page_header: ""
+ check_answer_label: "Person 4’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 4’s relationship to the lead tenant?"
+
+ age4:
+ page_header: ""
+ age4_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 4’s age?"
+ age4:
+ check_answer_label: "Person 4’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex4:
+ page_header: ""
+ check_answer_label: "Person 4’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes person 4’s gender identity?"
+
+ ecstat4:
+ page_header: ""
+ check_answer_label: "Person 4’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 4’s working situation?"
+
+ details_known_5:
+ page_header: "You’ve given us the details for 4 people in the household"
+ check_answer_label: "Details known for person 5"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 5?"
+
+ relat5:
+ page_header: ""
+ check_answer_label: "Person 5’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 5’s relationship to the lead tenant?"
+
+ age5:
+ page_header: ""
+ age5_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 5’s age?"
+ age5:
+ check_answer_label: "Person 5’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex5:
+ page_header: ""
+ check_answer_label: "Person 5’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes person 5’s gender identity?"
+
+ ecstat5:
+ page_header: ""
+ check_answer_label: "Person 5’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 5’s working situation?"
+
+ details_known_6:
+ page_header: "You’ve given us the details for 5 people in the household"
+ check_answer_label: "Details known for person 6"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 6?"
+
+ relat6:
+ page_header: ""
+ check_answer_label: "Person 6’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 6’s relationship to the lead tenant?"
+
+ age6:
+ page_header: ""
+ age6_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 6’s age?"
+ age6:
+ check_answer_label: "Person 6’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex6:
+ page_header: ""
+ check_answer_label: "Person 6’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes person 6’s gender identity?"
+
+ ecstat6:
+ page_header: ""
+ check_answer_label: "Person 6’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 6’s working situation?"
+
+ details_known_7:
+ page_header: "You’ve given us the details for 6 people in the household"
+ check_answer_label: "Details known for person 7"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 7?"
+
+ relat7:
+ page_header: ""
+ check_answer_label: "Person 7’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 7’s relationship to the lead tenant?"
+
+ age7:
+ page_header: ""
+ age7_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 7’s age?"
+ age7:
+ check_answer_label: "Person 7’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex7:
+ page_header: ""
+ check_answer_label: "Person 7’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes person 7’s gender identity?"
+
+ ecstat7:
+ page_header: ""
+ check_answer_label: "Person 7’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 7’s working situation?"
+
+ details_known_8:
+ page_header: "You’ve given us the details for 7 people in the household"
+ check_answer_label: "Details known for person 8"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 8?"
+
+ relat8:
+ page_header: ""
+ check_answer_label: "Person 8’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 8’s relationship to the lead tenant?"
+
+ age8:
+ page_header: ""
+ age8_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 8’s age?"
+ age8:
+ check_answer_label: "Person 8’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex8:
+ page_header: ""
+ check_answer_label: "Person 8’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes person 8’s gender identity?"
+
+ ecstat8:
+ page_header: ""
+ check_answer_label: "Person 8’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 8’s working situation?"
\ No newline at end of file
diff --git a/config/locales/forms/2024/lettings/household_situation.en.yml b/config/locales/forms/2024/lettings/household_situation.en.yml
new file mode 100644
index 000000000..e1bf4c0ce
--- /dev/null
+++ b/config/locales/forms/2024/lettings/household_situation.en.yml
@@ -0,0 +1,120 @@
+en:
+ forms:
+ 2024:
+ lettings:
+ household_situation:
+ layear:
+ page_header: ""
+ check_answer_label: "Length of time in local authority area"
+ hint_text: ""
+ question_text: "How long has the household continuously lived in the local authority area of the new letting?"
+
+ waityear:
+ page_header: ""
+ check_answer_label: "Length of time on local authority waiting list"
+ hint_text: ""
+ question_text: "How long has the household been on the local authority waiting list for the area of the new letting?"
+
+ reason:
+ reason_for_leaving_last_settled_home_renewal:
+ page_header: ""
+ reason:
+ check_answer_label: "Reason for leaving last settled home"
+ hint_text: "You told us this letting is a renewal. We have removed some options because of this."
+ question_text: "What is the tenant’s main reason for the household leaving their last settled home?"
+ reasonother:
+ check_answer_label: "Length of time on local authority waiting list"
+ hint_text: ""
+ question_text: "How long has the household been on the local authority waiting list for the area of the new letting?"
+ reason_for_leaving_last_settled_home:
+ page_header: ""
+ reason:
+ check_answer_label: "Reason for leaving last settled home"
+ hint_text: "The tenant’s ‘last settled home’ is their last long-standing home. For tenants who were in temporary accommodation, sleeping rough or otherwise homeless, their last settled home is where they were living previously."
+ question_text: "What is the tenant’s main reason for the household leaving their last settled home?"
+ reasonother:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "What is the reason?"
+
+ prevten:
+ renewal:
+ page_header: ""
+ check_answer_label: "Where was the household immediately before this letting?"
+ hint_text: "You told us this letting is a renewal. We have removed some options because of this.
This is where the household was the night before they moved into this new let."
+ question_text: "Where was the household immediately before this letting?"
+ not_renewal:
+ page_header: ""
+ check_answer_label: "Where was the household immediately before this letting?"
+ hint_text: "This is where the household was the night before they moved into this new let."
+ question_text: "Where was the household immediately before this letting?"
+
+ homeless:
+ page_header: ""
+ check_answer_label: "Household homeless immediately before letting"
+ hint_text: ""
+ question_text: "Did the household experience homelessness immediately before this letting?"
+
+ previous_postcode:
+ page_header: ""
+ ppcodenk:
+ check_answer_label: ""
+ hint_text: "This is the tenant’s last long-standing home. It is where the tenant was living before any period in temporary accommodation, sleeping rough or otherwise homeless."
+ question_text: "Do you know the postcode of the household’s last settled accommodation?"
+ ppostcode_full:
+ check_answer_label: "Postcode of household’s last settled accommodation"
+ hint_text: ""
+ question_text: "Postcode for the previous accommodation"
+
+ previous_local_authority:
+ page_header: ""
+ previous_la_known:
+ check_answer_label: ""
+ hint_text: "This is the tenant’s last long-standing home. It is where the tenant was living before any period in temporary accommodation, sleeping rough or otherwise homeless."
+ question_text: "Do you know the local authority of the household’s last settled accommodation?"
+ prevloc:
+ check_answer_label: "Location of household’s last settled accommodation"
+ hint_text: "Select ‘Northern Ireland’, ‘Scotland’, ‘Wales’ or ‘Outside the UK’ if the household’s last settled home was outside England."
+ question_text: "Select a local authority"
+
+ reasonpref:
+ page_header: ""
+ check_answer_label: "Household given reasonable preference"
+ hint_text: "Households may be given ‘reasonable preference’ for social housing under one or more specific categories by the local authority. This is also known as ‘priority need’."
+ question_text: "Was the household given ‘reasonable preference’ by the local authority?"
+
+ reasonable_preference_reason:
+ page_header: ""
+ check_answer_label: "Reason for reasonable preference"
+ hint_text: "Select all that apply."
+ question_text: "Why was the household given ‘reasonable preference’?"
+
+ letting_allocation:
+ page_header: ""
+ check_answer_label: "Allocation system"
+ hint_text: "Select all that apply."
+ question_text: "How was this letting allocated?"
+
+ referral:
+ supported_housing:
+ prp:
+ page_header: ""
+ check_answer_label: "Source of referral for letting"
+ hint_text: ""
+ question_text: "What was the source of referral for this letting?"
+ la:
+ page_header: ""
+ check_answer_label: "Source of referral for letting"
+ hint_text: "You told us that you are a local authority. We have removed some options because of this."
+ question_text: "What was the source of referral for this letting?"
+ general_needs:
+ prp:
+ page_header: ""
+ check_answer_label: "Source of referral for letting"
+ hint_text: "You told us that the needs type is general needs. We have removed some options because of this."
+ question_text: "What was the source of referral for this letting?"
+ la:
+ page_header: ""
+ check_answer_label: "Source of referral for letting"
+ hint_text: "You told us that you are a local authority and that the needs type is general needs. We have removed some options because of this."
+ question_text: "What was the source of referral for this letting?"
\ No newline at end of file
diff --git a/config/locales/forms/2024/lettings/income_and_benefits.en.yml b/config/locales/forms/2024/lettings/income_and_benefits.en.yml
new file mode 100644
index 000000000..bb3cc320e
--- /dev/null
+++ b/config/locales/forms/2024/lettings/income_and_benefits.en.yml
@@ -0,0 +1,108 @@
+en:
+ forms:
+ 2024:
+ lettings:
+ income_and_benefits:
+ net_income_known:
+ page_header: "Household’s combined income after tax"
+ check_answer_label: "Do you know the household’s combined total income after tax?"
+ hint_text: ""
+ question_text: "Do you know the household’s combined income after tax?"
+
+ income_amount:
+ page_header: "Total household income"
+ incfreq:
+ check_answer_label: "How often does the household receive this amount?"
+ hint_text: ""
+ question_text: "How often does the household receive this amount?"
+ earnings:
+ check_answer_label: "Total household income"
+ hint_text: ""
+ question_text: "How much income does the household have in total?"
+
+ hb:
+ page_header: ""
+ check_answer_label: "Housing-related benefits received"
+ hint_text: "This is about when the tenant is in their new let. If they are unsure about the situation for their new let and their financial and working situation hasn’t changed significantly, answer based on what housing-related benefits they currently receive."
+ question_text: "Is the household likely to be receiving any of these housing-related benefits?"
+
+ benefits:
+ page_header: ""
+ check_answer_label: "Household income from Universal Credit, state pension or benefit"
+ hint_text: "This excludes child and housing benefit, council tax support and tax credits."
+ question_text: "How much of the household’s income is from Universal Credit, state pensions or benefits?"
+
+ household_charge:
+ page_header: ""
+ check_answer_label: "Does the household pay rent or charges"
+ hint_text: "If rent is charged on the property then answer Yes to this question, even if the tenants do not pay it themselves."
+ question_text: "Does the household pay rent or other charges for the accommodation?"
+
+ period:
+ page_header: ""
+ check_answer_label: "Frequency of household rent and charges"
+ hint_text: "Select how often the household is charged. This may be different to how often they pay."
+ question_text: "How often does the household pay rent and other charges?"
+
+ care_home:
+ page_header: ""
+ is_carehome:
+ check_answer_label: "Care home accommodation"
+ hint_text: ""
+ question_text: "Is this accommodation a care home?"
+ chcharge_weekly:
+ check_answer_label: "Care home charges"
+ hint_text: ""
+ question_text: "How much does the household pay every week?"
+ chcharge_bi_weekly:
+ check_answer_label: "Care home charges"
+ hint_text: ""
+ question_text: "How much does the household pay every 2 weeks?"
+ chcharge_4_weekly:
+ check_answer_label: "Care home charges"
+ hint_text: ""
+ question_text: "How much does the household pay every 4 weeks?"
+ chcharge_monthly:
+ check_answer_label: "Care home charges"
+ hint_text: ""
+ question_text: "How much does the household pay every month?"
+
+ rent_and_charges:
+ page_header: "Household rent and charges"
+ brent:
+ check_answer_label: "Basic rent"
+ hint_text: "This is the amount paid before any charges are added for services (for example, hot water or cleaning). Households may receive housing benefit or Universal Credit towards basic rent."
+ question_text: "What is the basic rent?"
+ scharge:
+ check_answer_label: "Service charge"
+ hint_text: "For example, for cleaning. Households may receive housing benefit or Universal Credit towards the service charge."
+ question_text: "What is the service charge?"
+ pscharge:
+ check_answer_label: "Personal service charge"
+ hint_text: "For example, for heating or hot water. This doesn’t include housing benefit or Universal Credit."
+ question_text: "What is the personal service charge?"
+ supcharg:
+ check_answer_label: "Support charge"
+ hint_text: "Any charges made to fund support services included in tenancy agreement."
+ question_text: "What is the support charge?"
+ tcharge:
+ check_answer_label: "Household rent and charges"
+ hint_text: "This is the total for rent and all charges."
+ question_text: "Total charge"
+
+ hbrentshortfall:
+ page_header: ""
+ check_answer_label: "Any outstanding amount for basic rent and charges"
+ hint_text: "Also known as the ‘outstanding amount’."
+ question_text: "After the household has received any housing-related benefits, will they still need to pay for rent and charges?"
+
+ outstanding_amount:
+ page_header: ""
+ tshortfall_known:
+ check_answer_label: "Do you know the outstanding amount?"
+ hint_text: "You only need to give an approximate figure."
+ question_text: "Can you estimate the outstanding amount?"
+ tshortfall:
+ check_answer_label: "Estimated outstanding amountt"
+ hint_text: "Also known as the ‘outstanding amount’."
+ question_text: "Estimated outstanding amount"
diff --git a/config/locales/forms/2024/lettings/property_information.en.yml b/config/locales/forms/2024/lettings/property_information.en.yml
new file mode 100644
index 000000000..012ff0e0d
--- /dev/null
+++ b/config/locales/forms/2024/lettings/property_information.en.yml
@@ -0,0 +1,127 @@
+en:
+ forms:
+ 2024:
+ lettings:
+ property_information:
+ first_time_property_let_as_social_housing:
+ page_header: ""
+ check_answer_label: "First time being let as social-housing?"
+ hint_text: ""
+ question_text: "Is this the first time the property has been let as social housing?"
+
+ uprn:
+ page_header: ""
+ uprn_known:
+ check_answer_label: "UPRN known?"
+ hint_text: "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.
The UPRN may not be the same as the property reference assigned by your organisation.
If you don’t know the UPRN you can enter the address of the property instead on the next screen."
+ question_text: "Do you know the property's UPRN?"
+ uprn:
+ check_answer_label: "UPRN"
+ hint_text: ""
+ question_text: "What is the property's UPRN?"
+
+ uprn_confirmed:
+ page_header: "We found an address that might be this property"
+ check_answer_label: "Is this the right address?"
+ hint_text: ""
+ question_text: "Is this the property address?"
+
+ address_matcher:
+ page_header: "Find an address"
+ address_line1_input:
+ check_answer_label: "Find address"
+ hint_text: ""
+ question_text: "Address line 1"
+ postcode_full_input:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Postcode"
+
+ uprn_selection:
+ page_header: "We found an address that might be this property"
+ check_answer_label: "Select the correct address"
+ hint_text: ""
+ question_text: "Select the correct address"
+
+ address:
+ page_header: "Q12 - What is the property's address?"
+ address_line1:
+ check_answer_label: "Address lines 1 and 2"
+ hint_text: ""
+ question_text: "Address line 1"
+ address_line2:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Address line 2 (optional)"
+ town_or_city:
+ check_answer_label: "Town or city"
+ hint_text: ""
+ question_text: "Town or city"
+ county:
+ check_answer_label: "County"
+ hint_text: ""
+ question_text: "County (optional)"
+ postcode_full:
+ check_answer_label: "Postcode"
+ hint_text: ""
+ question_text: "Postcode"
+
+ la:
+ page_header: ""
+ check_answer_label: "Local authority"
+ hint_text: ""
+ question_text: "What is the property’s local authority?"
+
+
+ unitletas:
+ page_header: ""
+ check_answer_label: "Most recent let type"
+ hint_text: "This is the rent type of the previous tenancy in this property."
+ question_text: "What type was the property most recently let as?"
+
+ rsnvac:
+ page_header: ""
+ check_answer_label: "Vacancy reason"
+ hint_text: ""
+ question_text: "What is the reason for the property being vacant?"
+
+ unittype_gn:
+ page_header: ""
+ check_answer_label: "Type of unit"
+ hint_text: ""
+ question_text: "What type of unit is the property?"
+
+ builtype:
+ page_header: ""
+ check_answer_label: "Type of building"
+ hint_text: ""
+ question_text: "What type of building is the property?"
+
+ wchair:
+ page_header: ""
+ check_answer_label: "Property built or adapted to wheelchair-user standards"
+ hint_text: "This is whether someone who uses a wheelchair is able to make full use of all of the property’s rooms and facilities, including use of both inside and outside space, and entering and exiting the property."
+ question_text: "Is the property built or adapted to wheelchair-user standards?"
+
+ beds:
+ page_header: ""
+ check_answer_label: "Number of bedrooms"
+ hint_text: "If shared accommodation, enter the number of bedrooms occupied by this household."
+ question_text: "How many bedrooms does the property have?"
+
+ voiddate:
+ page_header: "Void date"
+ check_answer_label: "Void date"
+ hint_text: ""
+ question_text: "What is the void date?"
+
+ property_major_repairs:
+ page_header: ""
+ majorrepairs:
+ check_answer_label: "Major repairs carried out during void period"
+ hint_text: "Major repairs are works that could not be reasonably carried out with a tenant living at the property. For example, structural repairs."
+ question_text: "Were any major repairs carried out during the void period?"
+ mrcdate:
+ check_answer_label: "Completion date of repairs"
+ hint_text: ""
+ question_text: "When were the repairs completed?"
diff --git a/config/locales/forms/2024/lettings/soft_validations.en.yml b/config/locales/forms/2024/lettings/soft_validations.en.yml
new file mode 100644
index 000000000..ada093d39
--- /dev/null
+++ b/config/locales/forms/2024/lettings/soft_validations.en.yml
@@ -0,0 +1,132 @@
+en:
+ forms:
+ 2024:
+ lettings:
+ soft_validations:
+ pregnancy_value_check:
+ no_females_pregnant_household_value_check:
+ page_header: ""
+ check_answer_label: "Pregnancy confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us somebody in the household is pregnant."
+ informative_text: "You also told us that all the tenants living at the property are male."
+ females_in_soft_age_range_in_pregnant_household_value_check:
+ page_header: ""
+ check_answer_label: "Pregnancy confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us somebody in the household is pregnant."
+ informative_text: "You also told us that any female tenants living at the property are in the following age ranges:
- under 16 years old
- over 50 years old
"
+
+ no_retirement_value_check:
+ page_header: ""
+ check_answer_label: "Retirement confirmation"
+ hint_text: ""
+ question_text: "Are you sure this person is retired?"
+ title_text: "You told us this person is aged %{age} years and retired."
+ informative_text: "The minimum expected retirement age in England is 66."
+
+ retirement_value_check:
+ page_header: ""
+ check_answer_label: "Retirement confirmation"
+ hint_text: ""
+ question_text: "Are you sure this person isn’t retired?"
+ title_text: "You told us this person is over 66 and not retired."
+ informative_text: "Are you sure this person isn’t retired?"
+
+ partner_under_16_value_check:
+ page_header: ""
+ check_answer_label: "Partner under 16 confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to the lead tenant."
+ informative_text: "Are you sure this is correct?"
+
+ multiple_partners_value_check:
+ page_header: ""
+ check_answer_label: "Multiple partners confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us there are more than 1 persons with 'Partner' relationship to the lead tenant."
+ informative_text: "Are you sure this is correct?"
+
+ reasonother_value_check:
+ page_header: ""
+ check_answer_label: "Reason other confirmation"
+ hint_text: ""
+ question_text: "Are you sure this doesn’t fit an existing category?"
+ title_text: "You told us that the tenant’s main reason for leaving their last settled home was %{reasonother}."
+ informative_text: "The reason you have entered looks very similar to one of the existing response categories. Please check the categories and select the appropriate one. If the existing categories are not suitable, please confirm here to move onto the next question."
+
+ referral_value_check:
+ page_header: ""
+ check_answer_label: "Referral confirmation"
+ hint_text: ""
+ question_text: "Are you sure?"
+ title_text: "Are you sure?"
+ informative_text: "This is a general needs log, and this referral type is for supported housing."
+
+ net_income_value_check:
+ page_header: ""
+ check_answer_label: "Net income confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that the household’s income is %{earnings} %{incfreq}."
+ informative_text: "This is %{net_income_higher_or_lower_text} than we would expect for the household’s working situation."
+
+ care_home_charges_value_check:
+ page_header: ""
+ check_answer_label: "Care home charges confirmation"
+ hint_text: ""
+ question_text: "Are you sure there are no care home charges?"
+ title_text: "Care home charges should be provided if this is a care home accommodation."
+ informative_text: "Are you sure there are no care home charges?"
+
+ rent_value_check:
+ page_header: ""
+ check_answer_label: "Total rent confirmation"
+ hint_text: "Check the following:
- the decimal point
- the frequency, for example every week or every calendar month
- the rent type is correct, for example affordable or social rent
"
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us the rent is %{brent}."
+ informative_text: "This is %{higher_or_lower} than we would expect."
+
+ scharge_value_check:
+ page_header: ""
+ check_answer_label: "Service charge confirmation"
+ hint_text: "Check the following:
- the decimal point
- the frequency, for example every week or every calendar month
- the needs type
"
+ question_text: "Are you sure?"
+ title_text: "You told us the service charge is %{scharge}."
+ informative_text: "This is higher than we would expect."
+
+ pscharge_value_check:
+ page_header: ""
+ check_answer_label: "Personal service charge confirmation"
+ hint_text: "Check the following:
- the decimal point
- the frequency, for example every week or every calendar month
- the needs type
"
+ question_text: "Are you sure?"
+ title_text: "You told us the personal service charge is %{pscharge}."
+ informative_text: "This is higher than we would expect."
+
+ supcharg_value_check:
+ page_header: ""
+ check_answer_label: "Support charge confirmation"
+ hint_text: "Check the following:
- the decimal point
- the frequency, for example every week or every calendar month
- the needs type
"
+ question_text: "Are you sure?"
+ title_text: "You told us the support charge is %{supcharg}."
+ informative_text: "This is higher than we would expect."
+
+ void_date_value_check:
+ page_header: ""
+ check_answer_label: "Void date confirmation"
+ hint_text: ""
+ question_text: "Are you sure the property has been vacant for this long?"
+ title_text: "You told us that the property has been vacant for more than 2 years."
+ informative_text: "This is longer than we would expect."
+
+ major_repairs_date_value_check:
+ page_header: ""
+ check_answer_label: "Major repairs date confirmation"
+ hint_text: ""
+ question_text: "Are you sure the property has been vacant for this long?"
+ title_text: "You told us the property has been vacant for 2 years."
+ informative_text: "This is longer than we would expect."
diff --git a/config/locales/forms/2024/lettings/tenancy_information.en.yml b/config/locales/forms/2024/lettings/tenancy_information.en.yml
new file mode 100644
index 000000000..bee380e7c
--- /dev/null
+++ b/config/locales/forms/2024/lettings/tenancy_information.en.yml
@@ -0,0 +1,66 @@
+en:
+ forms:
+ 2024:
+ lettings:
+ tenancy_information:
+ joint:
+ page_header: ""
+ check_answer_label: "Is this a joint tenancy?"
+ hint_text: "This is where two or more people are named on the tenancy agreement"
+ question_text: "Is this a joint tenancy?"
+
+ startertenancy:
+ page_header: ""
+ check_answer_label: "Is this a starter or introductory tenancy?"
+ hint_text: "If the tenancy has an ‘introductory period’ answer ‘yes’.
You should submit a CORE log at the beginning of the starter tenancy or introductory period, with the best information you have at the time. You do not need to submit a log when a tenant later rolls onto the main tenancy."
+ question_text: "Is this a starter tenancy?"
+
+ tenancy:
+ tenancy_type:
+ page_header: ""
+ tenancy:
+ check_answer_label: "Type of main tenancy"
+ hint_text: ""
+ question_text: "What is the type of tenancy?"
+ tenancyother:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Please state the tenancy type"
+ starter_tenancy_type:
+ page_header: ""
+ tenancy:
+ check_answer_label: "Type of main tenancy after the starter or introductory period has ended"
+ hint_text: ""
+ question_text: "What is the type of tenancy after the starter or introductory period has ended?"
+ tenancyother:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Please state the tenancy type"
+
+ tenancylength:
+ tenancy_length:
+ page_header: ""
+ check_answer_label: "Length of fixed-term tenancy"
+ hint_text: "Do not include the starter or introductory period."
+ question_text: "What is the length of the fixed-term tenancy to the nearest year?"
+ tenancy_length_affordable_rent:
+ page_header: ""
+ check_answer_label: "Length of fixed-term tenancy"
+ hint_text: "Do not include the starter or introductory period.The minimum period is 2 years for social or affordable rent general needs logs. You do not need to submit CORE logs for these types of tenancies if they are shorter than 2 years."
+ question_text: "What is the length of the fixed-term tenancy to the nearest year?"
+ tenancy_length_intermediate_rent:
+ page_header: ""
+ check_answer_label: "Length of fixed-term tenancy"
+ hint_text: "Do not include the starter or introductory period.The minimum period is 1 year for intermediate rent general needs logs. You do not need to submit CORE logs for these types of tenancies if they are shorter than 1 year."
+ question_text: "What is the length of the fixed-term tenancy to the nearest year?"
+ tenancy_length_periodic:
+ page_header: ""
+ check_answer_label: "Length of periodic tenancy"
+ hint_text: "As this is a periodic tenancy, this question is optional. If you do not have the information available click save and continue"
+ question_text: "What is the length of the periodic tenancy to the nearest year?"
+
+ sheltered:
+ page_header: ""
+ check_answer_label: "Is this letting in sheltered accommodation?"
+ hint_text: "Sheltered housing and special retirement housing are for tenants with low-level care and support needs. This typically provides some limited support to enable independent living, such as alarm-based assistance or a scheme manager.Extra care housing is for tenants with medium to high care and support needs, often with 24 hour access to support staff provided by an agency registered with the Care Quality Commission."
+ question_text: "Is this letting in sheltered accommodation?"
diff --git a/config/locales/forms/2024/sales/guidance.en.yml b/config/locales/forms/2024/sales/guidance.en.yml
new file mode 100644
index 000000000..801c43a5c
--- /dev/null
+++ b/config/locales/forms/2024/sales/guidance.en.yml
@@ -0,0 +1,46 @@
+en:
+ forms:
+ 2024:
+ sales:
+ guidance:
+ shared_ownership_type_definitions:
+ title: "Shared Ownership Type Definitions"
+ content: "
Shared Ownership (old model lease): Cannot be used for homes funded through the Affordable Homes Programme 2021 to 2026. Use the new model lease for these properties.
+
Shared Ownership (new model lease): Homes bought using the Affordable Homes Programme 2021 to 2026.
+
Social HomeBuy — shared ownership purchase: Tenants of private registered providers purchase their home at discount on Shared Ownership terms.
+
Home Ownership for people with Long-Term Disabilities (HOLD): A shared ownership sale for those with long term disabilities.
+
Older Persons Shared Ownership: A type of shared ownership for those 55 years and over.
+
Rent to Buy — Shared Ownership: A sale following a period of discounted rent.
+
Right to Shared Ownership (RtSO): A sale of a share of a rented home to a tenant using this scheme.
+
London Living Rent — Shared Ownership: A shared ownership sale following a period of discounted rent as part of the London Living Rent scheme.
"
+
+ discounted_ownership_type_definitions:
+ title: "Discounted Ownership Type Definitions"
+ content: "
Right to Acquire (RTA): a discounted sale of a property built or purchased after 31 March 1997 to tenants of a private registered provider.
+
Preserved Right to Buy (PRTB): a discounted sale of a property that used to be owned by a council to tenants of a private registered provider.
+
Voluntary Right to Buy (VRTB): a discounted sale to tenants in this PRP owned property, as part of a pilot scheme.
+
Right to Buy (RTB): a discounted sale to tenants in this council owned property.
+
Rent to Buy full ownership: a sale on full ownership terms following a period of discounted rent.
+
Social HomeBuy for outright purchase: a discounted sale to tenants of a private registered provider on full ownership terms.
+
Any other equity loan scheme: any scheme, not covered elsewhere, in which a loan is used to purchase equity.
"
+
+ mortgage_lender:
+ title: "Can’t find the mortgage lender you’re looking for?"
+ content: "
+ - Double check the spelling and try again
+ - Type the first few letters to see the suggestions
+ - Type Other and continue - we’ll ask you to type in your answer in the next question
+
"
+
+ outright_sale_type_definitions:
+ title: "Outright sale type definitions"
+ content: "
Outright sale: the full purchase of a property, usually with a mortgage or cash.
+
Other sale: any sale which does not fit the criteria of any of the remaining options.
"
+
+ privacy_notice_buyer_joint_purchase:
+ content: "Make sure the buyers have seen or been given access to %{privacy_notice_link} before completing this log. This is a legal requirement under data protection legislation."
+ privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice"
+
+ privacy_notice_buyer:
+ content: "Make sure the buyer has seen or been given access to %{privacy_notice_link} before completing this log. This is a legal requirement under data protection legislation."
+ privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice"
diff --git a/config/locales/forms/2024/sales/household_situation.en.yml b/config/locales/forms/2024/sales/household_situation.en.yml
new file mode 100644
index 000000000..1ab6d540e
--- /dev/null
+++ b/config/locales/forms/2024/sales/household_situation.en.yml
@@ -0,0 +1,50 @@
+en:
+ forms:
+ 2024:
+ sales:
+ household_situation:
+ prevten:
+ page_header: ""
+ check_answer_label: "Buyer 1’s previous tenure"
+ hint_text: ""
+ question_text: "What was buyer 1’s previous tenure?"
+
+ last_accommodation:
+ page_header: ""
+ ppcodenk:
+ check_answer_label: "Buyer 1’s last settled accommodation"
+ hint_text: "This is also known as the household’s 'last settled home'"
+ question_text: "Do you know the postcode of buyer 1’s last settled accommodation?"
+ ppostcode_full:
+ check_answer_label: "Postcode of buyer 1’s last settled accommodation"
+ hint_text: ""
+ question_text: "Postcode"
+
+ last_accommodation_la:
+ page_header: ""
+ previous_la_known:
+ check_answer_label: "Local authority of buyer 1’s last settled accommodation"
+ hint_text: "This is also known as the household’s 'last settled home'"
+ question_text: "Do you know the local authority of buyer 1’s last settled accommodation?"
+ prevloc:
+ check_answer_label: "Local authority of buyer 1’s last settled accommodation"
+ hint_text: ""
+ question_text: "Select a local authority"
+
+ buyers_organisations:
+ page_header: ""
+ check_answer_label: "Organisations buyers were registered with"
+ hint_text: "Select all that apply. This question is optional. If no options are applicable, leave the options blank, and select save and continue."
+ question_text: "What organisations were the buyers registered with?"
+
+ buy2living:
+ page_header: ""
+ check_answer_label: "Buyer 2 living at the same address"
+ hint_text: ""
+ question_text: "At the time of purchase, was buyer 2 living at the same address as buyer 1?"
+
+ prevtenbuy2:
+ page_header: ""
+ check_answer_label: "Buyer 2’s previous tenure"
+ hint_text: ""
+ question_text: "What was buyer 2’s previous tenure?"
diff --git a/config/locales/forms/2024/sales/property_information.en.yml b/config/locales/forms/2024/sales/property_information.en.yml
new file mode 100644
index 000000000..269f4fdca
--- /dev/null
+++ b/config/locales/forms/2024/sales/property_information.en.yml
@@ -0,0 +1,91 @@
+en:
+ forms:
+ 2024:
+ sales:
+ property_information:
+ uprn:
+ page_header: ""
+ uprn_known:
+ check_answer_label: "UPRN known?"
+ hint_text: "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.
The UPRN may not be the same as the property reference assigned by your organisation.
If you don’t know the UPRN you can enter the address of the property instead on the next screen."
+ question_text: "Do you know the property's UPRN?"
+ uprn:
+ check_answer_label: "UPRN"
+ hint_text: ""
+ question_text: "What is the property's UPRN?"
+
+ uprn_confirmed:
+ page_header: "We found an address that might be this property"
+ check_answer_label: "Is this the right address?"
+ hint_text: ""
+ question_text: "Is this the property address?"
+
+ address_matcher:
+ page_header: "Find an address"
+ address_line1_input:
+ check_answer_label: "Find address"
+ hint_text: ""
+ question_text: "Address line 1"
+ postcode_full_input:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Postcode"
+
+ uprn_selection:
+ page_header: "We found an address that might be this property"
+ check_answer_label: "Select the correct address"
+ hint_text: ""
+ question_text: "Select the correct address"
+
+ address:
+ page_header: "Q12 - What is the property's address?"
+ address_line1:
+ check_answer_label: "Address lines 1 and 2"
+ hint_text: ""
+ question_text: "Address line 1"
+ address_line2:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Address line 2 (optional)"
+ town_or_city:
+ check_answer_label: "Town or city"
+ hint_text: ""
+ question_text: "Town or city"
+ county:
+ check_answer_label: "County"
+ hint_text: ""
+ question_text: "County (optional)"
+ postcode_full:
+ check_answer_label: "Postcode"
+ hint_text: ""
+ question_text: "Postcode"
+
+ la:
+ page_header: ""
+ check_answer_label: "Local authority"
+ hint_text: ""
+ question_text: "What is the property’s local authority?"
+
+ beds:
+ page_header: ""
+ check_answer_label: "Number of bedrooms"
+ hint_text: "A bedsit has 1 bedroom."
+ question_text: "How many bedrooms does the property have?"
+
+ proptype:
+ page_header: ""
+ check_answer_label: "Type of unit"
+ hint_text: ""
+ question_text: "What type of unit is the property?"
+
+ builtype:
+ page_header: ""
+ check_answer_label: "Type of building"
+ hint_text: ""
+ question_text: "What type of building is the property?"
+
+ wchair:
+ page_header: ""
+ check_answer_label: "Property built or adapted to wheelchair-user standards"
+ hint_text: "This is whether someone who uses a wheelchair is able to make full use of all of the property’s rooms and facilities, including use of both inside and outside space, and entering and exiting the property."
+ question_text: "Is the property built or adapted to wheelchair-user standards?"
diff --git a/config/locales/forms/2024/sales/sale_information.en.yml b/config/locales/forms/2024/sales/sale_information.en.yml
new file mode 100644
index 000000000..d0031416e
--- /dev/null
+++ b/config/locales/forms/2024/sales/sale_information.en.yml
@@ -0,0 +1,207 @@
+en:
+ forms:
+ 2024:
+ sales:
+ sale_information:
+ living_before_purchase:
+ joint_purchase:
+ page_header: ""
+ proplen:
+ check_answer_label: "Number of years living in the property before purchase"
+ hint_text: "You should round up to the nearest year"
+ question_text: "How long did they live there?"
+ proplen_asked:
+ check_answer_label: "Buyers lived in the property before purchasing"
+ hint_text: ""
+ question_text: "Did the buyers live in the property before purchasing it?"
+ not_joint_purchase:
+ page_header: ""
+ proplen:
+ check_answer_label: "Number of years living in the property before purchase"
+ hint_text: "You should round up to the nearest year"
+ question_text: "How long did they live there?"
+ proplen_asked:
+ check_answer_label: "Buyer lived in the property before purchasing"
+ hint_text: ""
+ question_text: "Did the buyer live in the property before purchasing it?"
+
+ staircasing:
+ page_header: ""
+ check_answer_label: "Staircasing transaction"
+ hint_text: "A staircasing transaction is when the household purchases more shares in their property, increasing the proportion they own and decreasing the proportion the housing association owns. Once the household purchases 100% of the shares, they own the property"
+ question_text: "Is this a staircasing transaction?"
+ about_staircasing:
+ page_header: "About the staircasing transaction"
+ stairbought:
+ check_answer_label: "Percentage bought in this staircasing transaction"
+ hint_text: ""
+ question_text: "What percentage of the property has been bought in this staircasing transaction?"
+ stairowned:
+ joint_purchase:
+ check_answer_label: "Percentage the buyers now own in total"
+ hint_text: ""
+ question_text: "What percentage of the property do the buyers now own in total?"
+ not_joint_purchase:
+ check_answer_label: "Percentage the buyer now owns in total"
+ hint_text: ""
+ question_text: "What percentage of the property does the buyer now own in total?"
+ staircasesale:
+ check_answer_label: "Part of a back-to-back staircasing transaction"
+ hint_text: ""
+ question_text: "Is this transaction part of a back-to-back staircasing transaction to facilitate sale of the home on the open market?"
+
+ resale:
+ page_header: ""
+ check_answer_label: "Is this a resale?"
+ hint_text: "If the social landlord has previously sold the property to another buyer and is now reselling the property, select 'yes'. If this is the first time the property has been sold, select 'no'."
+ question_text: "Is this a resale?"
+
+ exchange_date:
+ page_header: ""
+ check_answer_label: "Exchange of contracts date"
+ hint_text: ""
+ question_text: "What is the exchange of contracts date?"
+
+ handover_date:
+ page_header: ""
+ check_answer_label: "Practical completion or handover date"
+ hint_text: "This is the date on which the building contractor hands over responsibility for the completed property to the private registered provider (PRP)"
+ question_text: "What is the practical completion or handover date?"
+
+ la_nominations:
+ page_header: ""
+ check_answer_label: "Household rehoused under a local authority nominations agreement?"
+ hint_text: "A local authority nominations agreement is a written agreement between a local authority and private registered provider (PRP) that some or all of its sales vacancies are offered to local authorities for rehousing"
+ question_text: "Was the household rehoused under a 'local authority nominations agreement'?"
+
+ soctenant:
+ joint_purchase:
+ page_header: ""
+ check_answer_label: "Any buyers were registered providers, housing association or local authority tenants immediately before this sale?"
+ hint_text: ""
+ question_text: "Were any of the buyers private registered providers, housing association or local authority tenants immediately before this sale?"
+ not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Buyer was a registered provider, housing association or local authority tenant immediately before this sale?"
+ hint_text: ""
+ question_text: "Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale?"
+
+ frombeds:
+ page_header: "About the buyers’ previous property"
+ check_answer_label: "Number of bedrooms in previous property"
+ hint_text: "For bedsits enter 1"
+ question_text: "How many bedrooms did the property have?"
+
+ fromprop:
+ page_header: ""
+ check_answer_label: "Previous property type"
+ hint_text: ""
+ question_text: "What was the previous property type?"
+
+ socprevten:
+ page_header: ""
+ check_answer_label: "Previous property tenure"
+ hint_text: ""
+ question_text: "What was the previous tenure of the buyer?"
+
+ value:
+ page_header: "About the price of the property"
+ check_answer_label: "Full purchase price"
+ hint_text: "Enter the full purchase price of the property before any discounts are applied. For shared ownership, enter the full purchase price paid for 100% equity (this is equal to the value of the share owned by the PRP plus the value bought by the purchaser)"
+ question_text: "What was the full purchase price?"
+
+ equity:
+ page_header: "About the price of the property"
+ check_answer_label: "Initial percentage equity stake"
+ hint_text: "Enter the amount of initial equity held by the purchaser (for example, 25% or 50%)"
+ question_text: "What was the initial percentage equity stake purchased?"
+
+ mortgageused:
+ page_header: "Mortgage Amount"
+ check_answer_label: "Mortgage used"
+ hint_text: ""
+ question_text: "Was a mortgage used for the purchase of this property?"
+
+ mortgage:
+ page_header: "Mortgage Amount"
+ check_answer_label: "Mortgage amount"
+ hint_text: "Enter the amount of mortgage agreed with the mortgage lender. Exclude any deposits or cash payments. Numeric in pounds. Rounded to the nearest pound."
+ question_text: "What is the mortgage amount?"
+
+ mortgagelender:
+ page_header: ""
+ check_answer_label: "Mortgage lender"
+ hint_text: ""
+ question_text: "What is the name of the mortgage lender?"
+
+ mortgagelenderother:
+ page_header: ""
+ check_answer_label: "Other Mortgage Lender"
+ hint_text: ""
+ question_text: "What is the other mortgage lender?"
+
+ mortlen:
+ page_header: ""
+ check_answer_label: "Length of mortgage"
+ hint_text: "You should round up to the nearest year. Value should not exceed 60 years."
+ question_text: "What is the length of the mortgage?"
+
+ extrabor:
+ page_header: ""
+ check_answer_label: "Any other borrowing?"
+ hint_text: ""
+ question_text: "Does this include any extra borrowing?"
+
+ deposit:
+ page_header: "About the deposit"
+ check_answer_label: "Deposit amount"
+ hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan. As this is a fully staircased sale this question is optional. If you do not have the information available click save and continue"
+ question_text: "How much cash deposit was paid on the property?"
+
+ cashdis:
+ page_header: "About the deposit"
+ check_answer_label: "Cash discount through SocialHomeBuy"
+ hint_text: "Enter the total cash discount given on the property being purchased through the Social HomeBuy scheme"
+ question_text: "How much cash discount was given through Social HomeBuy?"
+
+ mrent:
+ page_header: ""
+ check_answer_label: "Monthly rent"
+ hint_text: "Amount paid before any charges"
+ question_text: "What is the basic monthly rent?"
+
+ leaseholdcharges:
+ page_header: ""
+ has_mscharge:
+ check_answer_label: "Does the property have any monthly leasehold charges?"
+ hint_text: "For example, service and management charges"
+ question_text: "Does the property have any monthly leasehold charges?"
+ mscharge:
+ check_answer_label: "Monthly leasehold charges"
+ hint_text: ""
+ question_text: "Enter the total monthly charge"
+
+ purchase_price:
+ discounted_ownership:
+ page_header: "About the price of the property"
+ check_answer_label: "Purchase price"
+ hint_text: "For all schemes, including Right to Acquire (RTA), Right to Buy (RTB), Voluntary Right to Buy (VRTB) or Preserved Right to Buy (PRTB) sales, enter the full price of the property without any discount"
+ question_text: "What is the full purchase price?"
+ outright_sale:
+ page_header: "About the price of the property"
+ check_answer_label: "Purchase price"
+ hint_text: ""
+ question_text: "What is the full purchase price?"
+
+ discount:
+ page_header: "About the price of the property"
+ check_answer_label: "Percentage discount"
+ hint_text: "For Right to Buy (RTB), Preserved Right to Buy (PRTB), and Voluntary Right to Buy (VRTB)If discount capped, enter capped %If the property is being sold to an existing tenant under the RTB, PRTB, or VRTB schemes, enter the % discount from the full market value that is being given."
+ question_text: "What was the percentage discount?"
+
+ grant:
+ page_header: "About the price of the property"
+ check_answer_label: "Amount of any loan, grant or subsidy"
+ hint_text: "For all schemes except Right to Buy (RTB), Preserved Right to Buy (PRTB), Voluntary Right to Buy (VRTB) and Rent to Buy"
+ question_text: "What was the amount of any loan, grant, discount or subsidy given?"
+
\ No newline at end of file
diff --git a/config/locales/forms/2024/sales/soft_validations.en.yml b/config/locales/forms/2024/sales/soft_validations.en.yml
index 39af6cb38..b9b1ad479 100644
--- a/config/locales/forms/2024/sales/soft_validations.en.yml
+++ b/config/locales/forms/2024/sales/soft_validations.en.yml
@@ -38,6 +38,7 @@ en:
max:
page_header: ""
title_text: "You told us the income of buyer 1 is %{income}. This seems high. Are you sure this is correct?"
+
income2_value_check:
check_answer_label: "Buyer 2 income confirmation"
hint_text: ""
@@ -49,12 +50,14 @@ en:
max:
page_header: ""
title_text: "You told us the income of buyer 2 is %{income}. This seems high. Are you sure this is correct?"
+
combined_income_value_check:
page_header: ""
check_answer_label: "Combined income confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
title_text: "You told us the combined income of this household is %{combined_income}. This seems high. Are you sure this is correct?"
+
mortgage_value_check:
page_header: ""
check_answer_label: "Mortgage confirmation"
@@ -62,34 +65,96 @@ en:
question_text: "Are you sure that the mortgage is more than 5 times the income used for the mortgage application?"
title_text: "You told us that the mortgage amount is %{mortgage}."
informative_text: "This is more than 5 times the income, which is higher than we would expect."
+
savings_value_check:
page_header: ""
check_answer_label: "Savings confirmation"
hint_text: ""
question_text: "Are you sure the savings are higher than £100,000?"
joint_purchase:
- title_text: You told us the buyers’ savings were %{savings}."
+ title_text: "You told us the buyers’ savings were %{savings}."
informative_text: "This is higher than we would expect."
not_joint_purchase:
title_text: "You told us the buyer’s savings were %{savings}."
informative_text: "This is higher than we would expect."
- deposit_value_check:
+
+ staircase_bought_value_check:
page_header: ""
- check_answer_label: "Deposit confirmation"
+ check_answer_label: "Percentage bought confirmation"
hint_text: ""
- question_text: "Are you sure that the deposit is this much higher than the buyer's savings?"
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that %{percentage}% was bought in this staircasing transaction."
+ informative_text: "Most staircasing transactions are less than 50%"
+
+ stairowned_value_check:
joint_purchase:
+ page_header: ""
+ check_answer_label: "Percentage owned confirmation"
+ hint_text: ""
+ question_text: "Are you sure?"
+ title_text: "You told us that the buyers now own %{stairowned} of the property."
+ informative_text: "The maximum percentage that can be owned under the Older Persons Shared Ownership scheme is 75%, unless the property was funded outside the Affordable Homes Programme. Make sure these answers are correct."
+ not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Percentage owned confirmation"
+ hint_text: ""
+ question_text: "Are you sure?"
+ title_text: "You told us that the buyer now owns %{stairowned} of the property."
+ informative_text: "The maximum percentage that can be owned under the Older Persons Shared Ownership scheme is 75%, unless the property was funded outside the Affordable Homes Programme. Make sure these answers are correct."
+
+ hodate_check:
+ page_header: ""
+ check_answer_label: "Practical completion or handover date check"
+ hint_text: ""
+ question_text: "Are you sure?"
+ title_text: "You told us practical completion or handover date is more than 3 years before sale completion date."
+
+ value_value_check:
+ page_header: ""
+ check_answer_label: "Purchase price confirmation"
+ hint_text: ""
+ question_text: "Are you sure?"
+ title_text: "You told us the purchase price is %{value}."
+ informative_text: "This is %{higher_or_lower} than we would expect."
+
+ shared_ownership_deposit_value_check:
+ page_header: ""
+ check_answer_label: "Shared ownership deposit confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that the %{mortgage_deposit_and_discount_error_fields} add up to %{mortgage_deposit_and_discount_total}."
+
+ deposit_value_check:
+ joint_purchase:
+ page_header: ""
+ check_answer_label: "Deposit confirmation"
+ hint_text: ""
+ question_text: "Are you sure that the deposit is this much higher than the buyer's savings?"
title_text: "You told us the buyers’ deposit was %{deposit} and their savings were %{savings}."
informative_text: "The deposit amount is higher than we would expect for the amount of savings they have."
not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Deposit confirmation"
+ hint_text: ""
+ question_text: "Are you sure that the deposit is this much higher than the buyer's savings?"
title_text: "You told us the buyer’s deposit was %{deposit} and their savings were %{savings}."
informative_text: "The deposit amount is higher than we would expect for the amount of savings they have."
+
+ address_search_value_check:
+ page_header: ""
+ check_answer_label: ""
+ hint_text: ""
+ question_text: ""
+ title_text: "No address found."
+ informative_text: "We could not find an address that matches your search. You can search again or continue to enter the address manually."
+
wheel_value_check:
page_header: ""
check_answer_label: "Does anyone in the household use a wheelchair?"
hint_text: ""
question_text: "You told us that someone in the household uses a wheelchair."
title_text: "You told us that someone in the household uses a wheelchair."
+
buyer_livein_value_check:
buyer1:
page_header: ""
@@ -105,6 +170,7 @@ en:
question_text: "Are you sure this is correct?"
title_text: "You told us that buyer 2 will not live in the property."
informative_text: "For %{ownership_scheme} types, the buyer usually lives in the property."
+
student_not_child_value_check:
page_header: ""
check_answer_label: "Student not a child confirmation"
@@ -112,6 +178,7 @@ en:
question_text: "Are you sure this person is not a child?"
title_text: "You told us this person is a student aged between 16 and 19."
informative_text: "Are you sure this person is not a child?"
+
partner_under_16_value_check:
page_header: ""
check_answer_label: "Partner under 16 confirmation"
@@ -119,6 +186,7 @@ en:
question_text: "Are you sure this is correct?"
title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to buyer 1."
informative_text: "Are you sure this is correct?"
+
multiple_partners_value_check:
page_header: ""
check_answer_label: "Multiple partners confirmation"
@@ -126,3 +194,51 @@ en:
question_text: "Are you sure this is correct?"
title_text: "You told us there are more than 1 persons with 'Partner' relationship to buyer 1."
informative_text: "Are you sure this is correct?"
+
+ monthly_charges_value_check:
+ page_header: ""
+ check_answer_label: "Monthly charges confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that the monthly charges were %{mscharge}."
+ informative_text: "This is higher than we would expect."
+
+ extra_borrowing_value_check:
+ page_header: ""
+ check_answer_label: "Extra borrowing confirmation"
+ hint_text: ""
+ question_text: "Are you sure there is no extra borrowing?"
+ title_text: "You told us that the mortgage and deposit total is %{mortgage_and_deposit_total}."
+ informative_text: "This is higher than the purchase price minus the discount."
+
+ percentage_discount_value_check:
+ page_header: ""
+ check_answer_label: "Percentage discount confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that the percentage discount is %{discount}."
+ informative_text: "This is higher than we would expect."
+
+ grant_value_check:
+ page_header: ""
+ check_answer_label: "Grant value confirmation"
+ hint_text: ""
+ question_text: "Are you sure? Grants are usually £9,000 - £16,000"
+ title_text: "You told us that the grant amount is %{grant}."
+ informative_text: "Loans, grants and subsidies are usually between £9,000 and £16,000."
+
+ discounted_sale_value_check:
+ page_header: ""
+ check_answer_label: "Discounted sale value confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "Mortgage, deposit, and grant total must equal %{value_with_discount}."
+ informative_text: "Your given mortgage, deposit and grant total is %{mortgage_deposit_and_grant_total}."
+
+ deposit_and_mortgage_value_check:
+ page_header: ""
+ check_answer_label: "Deposit and mortgage against discount confirmation"
+ hint_text: ""
+ question_text: "Are you sure? Mortgage and deposit usually equal or are more than (value - discount)"
+ title_text: "You told us the mortgage amount was %{mortgage}, the cash deposit was %{deposit} and the discount was %{discount}."
+ informative_text: "We would expect the mortgage amount and the deposit added together to be the same as the purchase price minus the discount."
diff --git a/config/locales/forms/2025/lettings/guidance.en.yml b/config/locales/forms/2025/lettings/guidance.en.yml
new file mode 100644
index 000000000..340eb11d5
--- /dev/null
+++ b/config/locales/forms/2025/lettings/guidance.en.yml
@@ -0,0 +1,63 @@
+en:
+ forms:
+ 2025:
+ lettings:
+ guidance:
+ finding_location:
+ title: "What is a location?"
+ content: "A location is a postcode area where supported housing is provided under a scheme. A scheme can have multiple locations, and a location can have multiple units at the same postcode."
+ scheme_changes_link_text: "Read more about schemes and locations"
+
+ finding_scheme:
+ title: "Can’t find your scheme?"
+ content: "
Schemes are attached to the organisation that owns the property. Check you have correctly answered question 1 \"Which organisation owns this property?\"
+
If your organisation’s schemes were migrated from old CORE, they may have new names and codes. Search by postcode to find your scheme.
"
+ scheme_changes_link_text: "Read more about how schemes have changed"
+ view_schemes_link_text: "View your organisation’s schemes"
+
+ privacy_notice_tenant:
+ content: "Make sure the lead tenant has seen or been given access to %{privacy_notice_link} before completing this log. This is a legal requirement under data protection legislation."
+ privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice"
+
+ rent_type_definitions:
+ title: "Rent type definitions"
+ content: "
Social Rent: where target rents are determined through the national rent regime. This is sometimes also known as 'formula rent'.
+
Affordable Rent: where up to 80% of market rent can be charged. A new supply agreement is signed with Homes England or the Greater London Authority (GLA).
+
London Affordable Rent: a tenure of affordable housing available in London by the GLA. It is an affordable rent which must be set in accordance with the Regulator of Social Housing’s Affordable Rent guidance. The landlord of these homes must be registered with the Regulator of Social Housing. These are a type of Affordable Rent lettings.
+
Rent to Buy: a discount of up to 20% market rent is charged for a single rental period for a minimum of 5 years. After that period, the tenant is offered first chance to purchase the property (either shared ownership or outright) at full market value. These are a type of Intermediate Rent lettings.
+
London Living Rent: a tenure of affordable housing available in London by the GLA. It was introduced in Affordable Homes Programme 2016 to 2021. These are a type of Intermediate Rent lettings.
+
Other intermediate rent: any other specific scheme where up to 80% of market rent can be charged. This includes schemes with reduced rent so tenants can save towards a house purchasing deposit and schemes with an in-built future opportunity to buy the property being rented.
"
+
+ scheme_selection:
+ data_provider:
+ content: "If you’re not sure which scheme to choose, ask a data coordinator. Find your data coordinators on the %{users_page_link}."
+ users_page_link_text: "users page"
+ data_coordinator:
+ create_scheme_link_text: "Create a new supported housing scheme"
+
+ void_date:
+ title: "What is a void date?"
+ content: "
Date the property was (legally or contractually) available to let, or for:
+
+ - re-lets: the day after the previous tenant's contract ended
+ - new builds: the day the landlord legally first owned the property (‘completion date’)
+ - new conversions or acquisitions: completion date, or the day after rehabilitation work ended
+ - new leases: the day the landlord got contractual property rights and could let it out to tenants
+
"
+
+ what_counts_as_income:
+ title: "What counts as income?"
+ content: "
You should include any income after tax from:
+
+ - employment
+ - pensions
+ - Universal Credit
+
+
+
Don’t include:
+
+ - National Insurance (NI) contributions and tax
+ - housing benefit
+ - child benefit
+ - council tax support
+
"
diff --git a/config/locales/forms/2025/lettings/household_characteristics.en.yml b/config/locales/forms/2025/lettings/household_characteristics.en.yml
new file mode 100644
index 000000000..1aef9297a
--- /dev/null
+++ b/config/locales/forms/2025/lettings/household_characteristics.en.yml
@@ -0,0 +1,322 @@
+en:
+ forms:
+ 2025:
+ lettings:
+ household_characteristics:
+ hhmemb:
+ page_header: ""
+ check_answer_label: "Number of household members"
+ hint_text: "You can provide details for a maximum of 8 people."
+ question_text: "How many people live in the household for this letting?"
+
+ age1:
+ page_header: ""
+ age1_known:
+ check_answer_label: ""
+ hint_text: "The ’lead’ or ’main’ tenant is the person in the household who does the most paid work. If several people do the same amount of paid work, the lead tenant is whoever is the oldest."
+ question_text: "Do you know the lead tenant’s age?"
+ age1:
+ check_answer_label: "Lead tenant’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex1:
+ page_header: ""
+ check_answer_label: "Lead tenant’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes the lead tenant’s gender identity?"
+
+ ethnic_group:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic group"
+ hint_text: ""
+ question_text: "What is the lead tenant’s ethnic group?"
+
+ ethnic:
+ ethnic_background_black:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes lead tenant’s Black, African, Caribbean or Black British background?"
+ ethnic_background_asian:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes lead tenant’s Asian or Asian British background?"
+ ethnic_background_arab:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes the lead tenant’s Arab background?"
+ ethnic_background_mixed:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes lead tenant’s Mixed or Multiple ethnic groups background?"
+ ethnic_background_white:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes lead tenant’s White background?"
+
+ nationality_all:
+ page_header: ""
+ nationality_all:
+ check_answer_label: "Lead tenant’s nationality"
+ hint_text: ""
+ question_text: "Enter a nationality"
+ nationality_all_group:
+ check_answer_label: "Lead tenant’s nationality"
+ hint_text: "If the lead tenant is a dual national of the United Kingdom and another country, enter United Kingdom. If they are a dual national of two other countries, the tenant should decide which country to enter."
+ question_text: "What is the nationality of the lead tenant?"
+
+ ecstat1:
+ page_header: ""
+ check_answer_label: "Lead tenant’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes the lead tenant’s working situation?"
+
+ details_known_2:
+ page_header: "You’ve given us the details for 1 person in the household"
+ check_answer_label: "Details known for person 2"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 2?"
+
+ relat2:
+ page_header: ""
+ check_answer_label: "Person 2’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 2’s relationship to the lead tenant?"
+
+ age2:
+ page_header: ""
+ age2_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 2’s age?"
+ age2:
+ check_answer_label: "Person 2’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex2:
+ page_header: ""
+ check_answer_label: "Person 2’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes person 2’s gender identity?"
+
+ ecstat2:
+ page_header: ""
+ check_answer_label: "Person 2’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 2’s working situation?"
+
+ details_known_3:
+ page_header: "You’ve given us the details for 2 people in the household"
+ check_answer_label: "Details known for person 3"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 3?"
+
+ relat3:
+ page_header: ""
+ check_answer_label: "Person 3’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 3’s relationship to the lead tenant?"
+
+ age3:
+ page_header: ""
+ age3_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 3’s age?"
+ age3:
+ check_answer_label: "Person 3’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex3:
+ page_header: ""
+ check_answer_label: "Person 3’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes person 3’s gender identity?"
+
+ ecstat3:
+ page_header: ""
+ check_answer_label: "Person 3’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 3’s working situation?"
+
+ details_known_4:
+ page_header: "You’ve given us the details for 3 people in the household"
+ check_answer_label: "Details known for person 4"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 4?"
+
+ relat4:
+ page_header: ""
+ check_answer_label: "Person 4’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 4’s relationship to the lead tenant?"
+
+ age4:
+ page_header: ""
+ age4_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 4’s age?"
+ age4:
+ check_answer_label: "Person 4’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex4:
+ page_header: ""
+ check_answer_label: "Person 4’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes person 4’s gender identity?"
+
+ ecstat4:
+ page_header: ""
+ check_answer_label: "Person 4’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 4’s working situation?"
+
+ details_known_5:
+ page_header: "You’ve given us the details for 4 people in the household"
+ check_answer_label: "Details known for person 5"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 5?"
+
+ relat5:
+ page_header: ""
+ check_answer_label: "Person 5’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 5’s relationship to the lead tenant?"
+
+ age5:
+ page_header: ""
+ age5_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 5’s age?"
+ age5:
+ check_answer_label: "Person 5’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex5:
+ page_header: ""
+ check_answer_label: "Person 5’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes person 5’s gender identity?"
+
+ ecstat5:
+ page_header: ""
+ check_answer_label: "Person 5’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 5’s working situation?"
+
+ details_known_6:
+ page_header: "You’ve given us the details for 5 people in the household"
+ check_answer_label: "Details known for person 6"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 6?"
+
+ relat6:
+ page_header: ""
+ check_answer_label: "Person 6’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 6’s relationship to the lead tenant?"
+
+ age6:
+ page_header: ""
+ age6_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 6’s age?"
+ age6:
+ check_answer_label: "Person 6’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex6:
+ page_header: ""
+ check_answer_label: "Person 6’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes person 6’s gender identity?"
+
+ ecstat6:
+ page_header: ""
+ check_answer_label: "Person 6’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 6’s working situation?"
+
+ details_known_7:
+ page_header: "You’ve given us the details for 6 people in the household"
+ check_answer_label: "Details known for person 7"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 7?"
+
+ relat7:
+ page_header: ""
+ check_answer_label: "Person 7’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 7’s relationship to the lead tenant?"
+
+ age7:
+ page_header: ""
+ age7_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 7’s age?"
+ age7:
+ check_answer_label: "Person 7’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex7:
+ page_header: ""
+ check_answer_label: "Person 7’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes person 7’s gender identity?"
+
+ ecstat7:
+ page_header: ""
+ check_answer_label: "Person 7’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 7’s working situation?"
+
+ details_known_8:
+ page_header: "You’ve given us the details for 7 people in the household"
+ check_answer_label: "Details known for person 8"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 8?"
+
+ relat8:
+ page_header: ""
+ check_answer_label: "Person 8’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 8’s relationship to the lead tenant?"
+
+ age8:
+ page_header: ""
+ age8_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 8’s age?"
+ age8:
+ check_answer_label: "Person 8’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex8:
+ page_header: ""
+ check_answer_label: "Person 8’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes person 8’s gender identity?"
+
+ ecstat8:
+ page_header: ""
+ check_answer_label: "Person 8’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 8’s working situation?"
diff --git a/config/locales/forms/2025/lettings/household_needs.en.yml b/config/locales/forms/2025/lettings/household_needs.en.yml
new file mode 100644
index 000000000..ba63f2031
--- /dev/null
+++ b/config/locales/forms/2025/lettings/household_needs.en.yml
@@ -0,0 +1,57 @@
+en:
+ forms:
+ 2025:
+ lettings:
+ household_needs:
+ armedforces:
+ page_header: ""
+ check_answer_label: "Household links to UK armed forces"
+ hint_text: "This excludes national service.
If there are several people in the household with links to the UK armed forces, you should answer for the regular. If there’s no regular, answer for the reserve. If there’s no reserve, answer for the spouse or civil partner."
+ question_text: "Does anybody in the household have any links to the UK armed forces?"
+
+ leftreg:
+ page_header: ""
+ check_answer_label: "Person still serving in UK armed forces"
+ hint_text: ""
+ question_text: "Is the person still serving in the UK armed forces?"
+
+ reservist:
+ page_header: ""
+ check_answer_label: "Person seriously injured or ill as result of serving in UK armed forces"
+ hint_text: ""
+ question_text: "Was the person seriously injured or ill as a result of serving in the UK armed forces?"
+
+ preg_occ:
+ page_header: ""
+ check_answer_label: "Anybody in household pregnant"
+ hint_text: ""
+ question_text: "Is anybody in the household pregnant?"
+
+ housingneeds:
+ page_header: ""
+ check_answer_label: "Anybody with disabled access needs"
+ hint_text: ""
+ question_text: "Does anybody in the household have any disabled access needs?"
+
+ housingneeds_type:
+ page_header: "Disabled access needs"
+ housingneeds_type:
+ check_answer_label: "Disabled access needs"
+ hint_text: ""
+ question_text: "What type of access needs do they have?"
+ housingneeds_other:
+ check_answer_label: "Other disabled access needs"
+ hint_text: ""
+ question_text: "Do they have any other disabled access needs?"
+
+ illness:
+ page_header: ""
+ check_answer_label: "Anybody in household with physical or mental health condition"
+ hint_text: ""
+ question_text: "Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more?"
+
+ condition_effects:
+ page_header: ""
+ check_answer_label: "How is person affected by condition or illness"
+ hint_text: "Select all that apply."
+ question_text: "How is the person affected by their condition or illness?"
diff --git a/config/locales/forms/2025/lettings/household_situation.en.yml b/config/locales/forms/2025/lettings/household_situation.en.yml
new file mode 100644
index 000000000..2b72c45d0
--- /dev/null
+++ b/config/locales/forms/2025/lettings/household_situation.en.yml
@@ -0,0 +1,120 @@
+en:
+ forms:
+ 2025:
+ lettings:
+ household_situation:
+ layear:
+ page_header: ""
+ check_answer_label: "Length of time in local authority area"
+ hint_text: ""
+ question_text: "How long has the household continuously lived in the local authority area of the new letting?"
+
+ waityear:
+ page_header: ""
+ check_answer_label: "Length of time on local authority waiting list"
+ hint_text: ""
+ question_text: "How long has the household been on the local authority waiting list for the area of the new letting?"
+
+ reason:
+ reason_for_leaving_last_settled_home_renewal:
+ page_header: ""
+ reason:
+ check_answer_label: "Reason for leaving last settled home"
+ hint_text: "You told us this letting is a renewal. We have removed some options because of this."
+ question_text: "What is the tenant’s main reason for the household leaving their last settled home?"
+ reasonother:
+ check_answer_label: "Length of time on local authority waiting list"
+ hint_text: ""
+ question_text: "How long has the household been on the local authority waiting list for the area of the new letting?"
+ reason_for_leaving_last_settled_home:
+ page_header: ""
+ reason:
+ check_answer_label: "Reason for leaving last settled home"
+ hint_text: "The tenant’s ‘last settled home’ is their last long-standing home. For tenants who were in temporary accommodation, sleeping rough or otherwise homeless, their last settled home is where they were living previously."
+ question_text: "What is the tenant’s main reason for the household leaving their last settled home?"
+ reasonother:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "What is the reason?"
+
+ prevten:
+ renewal:
+ page_header: ""
+ check_answer_label: "Where was the household immediately before this letting?"
+ hint_text: "You told us this letting is a renewal. We have removed some options because of this.
This is where the household was the night before they moved into this new let."
+ question_text: "Where was the household immediately before this letting?"
+ not_renewal:
+ page_header: ""
+ check_answer_label: "Where was the household immediately before this letting?"
+ hint_text: "This is where the household was the night before they moved into this new let."
+ question_text: "Where was the household immediately before this letting?"
+
+ homeless:
+ page_header: ""
+ check_answer_label: "Household homeless immediately before letting"
+ hint_text: ""
+ question_text: "Did the household experience homelessness immediately before this letting?"
+
+ previous_postcode:
+ page_header: ""
+ ppcodenk:
+ check_answer_label: ""
+ hint_text: "This is the tenant’s last long-standing home. It is where the tenant was living before any period in temporary accommodation, sleeping rough or otherwise homeless."
+ question_text: "Do you know the postcode of the household’s last settled accommodation?"
+ ppostcode_full:
+ check_answer_label: "Postcode of household’s last settled accommodation"
+ hint_text: ""
+ question_text: "Postcode for the previous accommodation"
+
+ previous_local_authority:
+ page_header: ""
+ previous_la_known:
+ check_answer_label: ""
+ hint_text: "This is the tenant’s last long-standing home. It is where the tenant was living before any period in temporary accommodation, sleeping rough or otherwise homeless."
+ question_text: "Do you know the local authority of the household’s last settled accommodation?"
+ prevloc:
+ check_answer_label: "Location of household’s last settled accommodation"
+ hint_text: "Select ‘Northern Ireland’, ‘Scotland’, ‘Wales’ or ‘Outside the UK’ if the household’s last settled home was outside England."
+ question_text: "Select a local authority"
+
+ reasonpref:
+ page_header: ""
+ check_answer_label: "Household given reasonable preference"
+ hint_text: "Households may be given ‘reasonable preference’ for social housing under one or more specific categories by the local authority. This is also known as ‘priority need’."
+ question_text: "Was the household given ‘reasonable preference’ by the local authority?"
+
+ reasonable_preference_reason:
+ page_header: ""
+ check_answer_label: "Reason for reasonable preference"
+ hint_text: "Select all that apply."
+ question_text: "Why was the household given ‘reasonable preference’?"
+
+ letting_allocation:
+ page_header: ""
+ check_answer_label: "Allocation system"
+ hint_text: "Select all that apply."
+ question_text: "How was this letting allocated?"
+
+ referral:
+ supported_housing:
+ prp:
+ page_header: ""
+ check_answer_label: "Source of referral for letting"
+ hint_text: ""
+ question_text: "What was the source of referral for this letting?"
+ la:
+ page_header: ""
+ check_answer_label: "Source of referral for letting"
+ hint_text: "You told us that you are a local authority. We have removed some options because of this."
+ question_text: "What was the source of referral for this letting?"
+ general_needs:
+ prp:
+ page_header: ""
+ check_answer_label: "Source of referral for letting"
+ hint_text: "You told us that the needs type is general needs. We have removed some options because of this."
+ question_text: "What was the source of referral for this letting?"
+ la:
+ page_header: ""
+ check_answer_label: "Source of referral for letting"
+ hint_text: "You told us that you are a local authority and that the needs type is general needs. We have removed some options because of this."
+ question_text: "What was the source of referral for this letting?"
diff --git a/config/locales/forms/2025/lettings/income_and_benefits.en.yml b/config/locales/forms/2025/lettings/income_and_benefits.en.yml
new file mode 100644
index 000000000..55e193ff7
--- /dev/null
+++ b/config/locales/forms/2025/lettings/income_and_benefits.en.yml
@@ -0,0 +1,108 @@
+en:
+ forms:
+ 2025:
+ lettings:
+ income_and_benefits:
+ net_income_known:
+ page_header: "Household’s combined income after tax"
+ check_answer_label: "Do you know the household’s combined total income after tax?"
+ hint_text: ""
+ question_text: "Do you know the household’s combined income after tax?"
+
+ income_amount:
+ page_header: "Total household income"
+ incfreq:
+ check_answer_label: "How often does the household receive this amount?"
+ hint_text: ""
+ question_text: "How often does the household receive this amount?"
+ earnings:
+ check_answer_label: "Total household income"
+ hint_text: ""
+ question_text: "How much income does the household have in total?"
+
+ hb:
+ page_header: ""
+ check_answer_label: "Housing-related benefits received"
+ hint_text: "This is about when the tenant is in their new let. If they are unsure about the situation for their new let and their financial and working situation hasn’t changed significantly, answer based on what housing-related benefits they currently receive."
+ question_text: "Is the household likely to be receiving any of these housing-related benefits?"
+
+ benefits:
+ page_header: ""
+ check_answer_label: "Household income from Universal Credit, state pension or benefit"
+ hint_text: "This excludes child and housing benefit, council tax support and tax credits."
+ question_text: "How much of the household’s income is from Universal Credit, state pensions or benefits?"
+
+ household_charge:
+ page_header: ""
+ check_answer_label: "Does the household pay rent or charges"
+ hint_text: "If rent is charged on the property then answer Yes to this question, even if the tenants do not pay it themselves."
+ question_text: "Does the household pay rent or other charges for the accommodation?"
+
+ period:
+ page_header: ""
+ check_answer_label: "Frequency of household rent and charges"
+ hint_text: "Select how often the household is charged. This may be different to how often they pay."
+ question_text: "How often does the household pay rent and other charges?"
+
+ care_home:
+ page_header: ""
+ is_carehome:
+ check_answer_label: "Care home accommodation"
+ hint_text: ""
+ question_text: "Is this accommodation a care home?"
+ chcharge_weekly:
+ check_answer_label: "Care home charges"
+ hint_text: ""
+ question_text: "How much does the household pay every week?"
+ chcharge_bi_weekly:
+ check_answer_label: "Care home charges"
+ hint_text: ""
+ question_text: "How much does the household pay every 2 weeks?"
+ chcharge_4_weekly:
+ check_answer_label: "Care home charges"
+ hint_text: ""
+ question_text: "How much does the household pay every 4 weeks?"
+ chcharge_monthly:
+ check_answer_label: "Care home charges"
+ hint_text: ""
+ question_text: "How much does the household pay every month?"
+
+ rent_and_charges:
+ page_header: "Household rent and charges"
+ brent:
+ check_answer_label: "Basic rent"
+ hint_text: "This is the amount paid before any charges are added for services (for example, hot water or cleaning). Households may receive housing benefit or Universal Credit towards basic rent."
+ question_text: "What is the basic rent?"
+ scharge:
+ check_answer_label: "Service charge"
+ hint_text: "For example, for cleaning. Households may receive housing benefit or Universal Credit towards the service charge."
+ question_text: "What is the service charge?"
+ pscharge:
+ check_answer_label: "Personal service charge"
+ hint_text: "For example, for heating or hot water. This doesn’t include housing benefit or Universal Credit."
+ question_text: "What is the personal service charge?"
+ supcharg:
+ check_answer_label: "Support charge"
+ hint_text: "Any charges made to fund support services included in tenancy agreement."
+ question_text: "What is the support charge?"
+ tcharge:
+ check_answer_label: "Household rent and charges"
+ hint_text: "This is the total for rent and all charges."
+ question_text: "Total charge"
+
+ hbrentshortfall:
+ page_header: ""
+ check_answer_label: "Any outstanding amount for basic rent and charges"
+ hint_text: "Also known as the ‘outstanding amount’."
+ question_text: "After the household has received any housing-related benefits, will they still need to pay for rent and charges?"
+
+ outstanding_amount:
+ page_header: ""
+ tshortfall_known:
+ check_answer_label: "Do you know the outstanding amount?"
+ hint_text: "You only need to give an approximate figure."
+ question_text: "Can you estimate the outstanding amount?"
+ tshortfall:
+ check_answer_label: "Estimated outstanding amountt"
+ hint_text: "Also known as the ‘outstanding amount’."
+ question_text: "Estimated outstanding amount"
diff --git a/config/locales/forms/2025/lettings/property_information.en.yml b/config/locales/forms/2025/lettings/property_information.en.yml
new file mode 100644
index 000000000..bf3f3532c
--- /dev/null
+++ b/config/locales/forms/2025/lettings/property_information.en.yml
@@ -0,0 +1,127 @@
+en:
+ forms:
+ 2025:
+ lettings:
+ property_information:
+ first_time_property_let_as_social_housing:
+ page_header: ""
+ check_answer_label: "First time being let as social-housing?"
+ hint_text: ""
+ question_text: "Is this the first time the property has been let as social housing?"
+
+ uprn:
+ page_header: ""
+ uprn_known:
+ check_answer_label: "UPRN known?"
+ hint_text: "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.
The UPRN may not be the same as the property reference assigned by your organisation.
If you don’t know the UPRN you can enter the address of the property instead on the next screen."
+ question_text: "Do you know the property's UPRN?"
+ uprn:
+ check_answer_label: "UPRN"
+ hint_text: ""
+ question_text: "What is the property's UPRN?"
+
+ uprn_confirmed:
+ page_header: "We found an address that might be this property"
+ check_answer_label: "Is this the right address?"
+ hint_text: ""
+ question_text: "Is this the property address?"
+
+ address_matcher:
+ page_header: "Find an address"
+ address_line1_input:
+ check_answer_label: "Find address"
+ hint_text: ""
+ question_text: "Address line 1"
+ postcode_full_input:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Postcode"
+
+ uprn_selection:
+ page_header: "We found an address that might be this property"
+ check_answer_label: "Select the correct address"
+ hint_text: ""
+ question_text: "Select the correct address"
+
+ address:
+ page_header: "Q12 - What is the property's address?"
+ address_line1:
+ check_answer_label: "Address lines 1 and 2"
+ hint_text: ""
+ question_text: "Address line 1"
+ address_line2:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Address line 2 (optional)"
+ town_or_city:
+ check_answer_label: "Town or city"
+ hint_text: ""
+ question_text: "Town or city"
+ county:
+ check_answer_label: "County"
+ hint_text: ""
+ question_text: "County (optional)"
+ postcode_full:
+ check_answer_label: "Postcode"
+ hint_text: ""
+ question_text: "Postcode"
+
+ la:
+ page_header: ""
+ check_answer_label: "Local authority"
+ hint_text: ""
+ question_text: "What is the property’s local authority?"
+
+
+ unitletas:
+ page_header: ""
+ check_answer_label: "Most recent let type"
+ hint_text: "This is the rent type of the previous tenancy in this property."
+ question_text: "What type was the property most recently let as?"
+
+ rsnvac:
+ page_header: ""
+ check_answer_label: "Vacancy reason"
+ hint_text: ""
+ question_text: "What is the reason for the property being vacant?"
+
+ unittype_gn:
+ page_header: ""
+ check_answer_label: "Type of unit"
+ hint_text: ""
+ question_text: "What type of unit is the property?"
+
+ builtype:
+ page_header: ""
+ check_answer_label: "Type of building"
+ hint_text: ""
+ question_text: "What type of building is the property?"
+
+ wchair:
+ page_header: ""
+ check_answer_label: "Property built or adapted to wheelchair-user standards"
+ hint_text: "This is whether someone who uses a wheelchair is able to make full use of all of the property’s rooms and facilities, including use of both inside and outside space, and entering and exiting the property."
+ question_text: "Is the property built or adapted to wheelchair-user standards?"
+
+ beds:
+ page_header: ""
+ check_answer_label: "Number of bedrooms"
+ hint_text: "If shared accommodation, enter the number of bedrooms occupied by this household."
+ question_text: "How many bedrooms does the property have?"
+
+ voiddate:
+ page_header: "Void date"
+ check_answer_label: "Void date"
+ hint_text: ""
+ question_text: "What is the void date?"
+
+ property_major_repairs:
+ page_header: ""
+ majorrepairs:
+ check_answer_label: "Major repairs carried out during void period"
+ hint_text: "Major repairs are works that could not be reasonably carried out with a tenant living at the property. For example, structural repairs."
+ question_text: "Were any major repairs carried out during the void period?"
+ mrcdate:
+ check_answer_label: "Completion date of repairs"
+ hint_text: ""
+ question_text: "When were the repairs completed?"
diff --git a/config/locales/forms/2025/lettings/setup.en.yml b/config/locales/forms/2025/lettings/setup.en.yml
new file mode 100644
index 000000000..029b5e91e
--- /dev/null
+++ b/config/locales/forms/2025/lettings/setup.en.yml
@@ -0,0 +1,87 @@
+en:
+ forms:
+ 2025:
+ lettings:
+ setup:
+ owning_organisation_id:
+ page_header: ""
+ check_answer_label: "Stock owner"
+ hint_text: ""
+ question_text: "Which organisation owns this property?"
+
+ managing_organisation_id:
+ page_header: ""
+ check_answer_label: "Managing agent"
+ hint_text: ""
+ question_text: "Which organisation manages this letting?"
+
+ assigned_to_id:
+ page_header: ""
+ check_answer_label: "Log owner"
+ hint_text: ""
+ question_text: "Which user are you creating this log for?"
+
+ needstype:
+ page_header: ""
+ check_answer_label: "Needs type"
+ hint_text: "General needs housing includes both self-contained and shared housing without support or specific adaptations. Supported housing can include direct access hostels, group homes, residential care and nursing homes."
+ question_text: "What is the needs type?"
+
+ scheme_id:
+ page_header: "Scheme"
+ check_answer_label: "Scheme name"
+ hint_text: "Enter postcode or scheme name.
A supported housing scheme provides shared or self-contained housing for a particular client group, for example younger or vulnerable people."
+ question_text: "What scheme is this log for?"
+
+ location_id:
+ less_than_twenty:
+ page_header: "Location"
+ check_answer_label: "Location"
+ hint_text: ""
+ question_text: "Which location is this letting for?"
+ twenty_or_more:
+ page_header: "Location"
+ check_answer_label: "Location"
+ hint_text: '
This scheme has 20 or more locations.
Enter postcode or address.'
+ question_text: "Which location is this letting for?"
+
+ renewal:
+ page_header: ""
+ check_answer_label: "Property renewal"
+ hint_text: "If the property was previously being used as temporary accommodation, then answer 'no'."
+ question_text: "Is this letting a renewal of social housing to the same tenant in the same property?"
+
+ startdate:
+ page_header: ""
+ check_answer_label: "Tenancy start date"
+ hint_text: ""
+ question_text: "What is the tenancy start date?"
+
+ rent_type:
+ page_header: "Rent Type"
+ rent_type:
+ check_answer_label: "Rent type"
+ hint_text: ""
+ question_text: "What is the rent type?"
+ irproduct_other:
+ check_answer_label: "Product name"
+ hint_text: ""
+ question_text: "Name of rent product"
+
+ tenancycode:
+ page_header: ""
+ check_answer_label: "Tenant code"
+ hint_text: "This is how you usually refer to this tenancy on your own systems."
+ question_text: "What is the tenant code?"
+
+ propcode:
+ page_header: ""
+ check_answer_label: "Property reference"
+ hint_text: "This is how you usually refer to this property on your own systems."
+ question_text: "What is the property reference?"
+
+ declaration:
+ page_header: "Ministry of Housing, Communities and Local Government privacy notice"
+ check_answer_label: "Tenant has seen the privacy notice"
+ hint_text: ""
+ question_text: "Declaration"
diff --git a/config/locales/forms/2025/lettings/soft_validations.en.yml b/config/locales/forms/2025/lettings/soft_validations.en.yml
new file mode 100644
index 000000000..03a3cbb3d
--- /dev/null
+++ b/config/locales/forms/2025/lettings/soft_validations.en.yml
@@ -0,0 +1,132 @@
+en:
+ forms:
+ 2025:
+ lettings:
+ soft_validations:
+ pregnancy_value_check:
+ no_females_pregnant_household_value_check:
+ page_header: ""
+ check_answer_label: "Pregnancy confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us somebody in the household is pregnant."
+ informative_text: "You also told us that all the tenants living at the property are male."
+ females_in_soft_age_range_in_pregnant_household_value_check:
+ page_header: ""
+ check_answer_label: "Pregnancy confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us somebody in the household is pregnant."
+ informative_text: "You also told us that any female tenants living at the property are in the following age ranges:
- under 16 years old
- over 50 years old
"
+
+ no_retirement_value_check:
+ page_header: ""
+ check_answer_label: "Retirement confirmation"
+ hint_text: ""
+ question_text: "Are you sure this person is retired?"
+ title_text: "You told us this person is aged %{age} years and retired."
+ informative_text: "The minimum expected retirement age in England is 66."
+
+ retirement_value_check:
+ page_header: ""
+ check_answer_label: "Retirement confirmation"
+ hint_text: ""
+ question_text: "Are you sure this person isn’t retired?"
+ title_text: "You told us this person is over 66 and not retired."
+ informative_text: "Are you sure this person isn’t retired?"
+
+ partner_under_16_value_check:
+ page_header: ""
+ check_answer_label: "Partner under 16 confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to the lead tenant."
+ informative_text: "Are you sure this is correct?"
+
+ multiple_partners_value_check:
+ page_header: ""
+ check_answer_label: "Multiple partners confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us there are more than 1 persons with 'Partner' relationship to the lead tenant."
+ informative_text: "Are you sure this is correct?"
+
+ reasonother_value_check:
+ page_header: ""
+ check_answer_label: "Reason other confirmation"
+ hint_text: ""
+ question_text: "Are you sure this doesn’t fit an existing category?"
+ title_text: "You told us that the tenant’s main reason for leaving their last settled home was %{reasonother}."
+ informative_text: "The reason you have entered looks very similar to one of the existing response categories. Please check the categories and select the appropriate one. If the existing categories are not suitable, please confirm here to move onto the next question."
+
+ referral_value_check:
+ page_header: ""
+ check_answer_label: "Referral confirmation"
+ hint_text: ""
+ question_text: "Are you sure?"
+ title_text: "Are you sure?"
+ informative_text: "This is a general needs log, and this referral type is for supported housing."
+
+ net_income_value_check:
+ page_header: ""
+ check_answer_label: "Net income confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that the household’s income is %{earnings} %{incfreq}."
+ informative_text: "This is %{net_income_higher_or_lower_text} than we would expect for the household’s working situation."
+
+ care_home_charges_value_check:
+ page_header: ""
+ check_answer_label: "Care home charges confirmation"
+ hint_text: ""
+ question_text: "Are you sure there are no care home charges?"
+ title_text: "Care home charges should be provided if this is a care home accommodation."
+ informative_text: "Are you sure there are no care home charges?"
+
+ rent_value_check:
+ page_header: ""
+ check_answer_label: "Total rent confirmation"
+ hint_text: "Check the following:
- the decimal point
- the frequency, for example every week or every calendar month
- the rent type is correct, for example affordable or social rent
"
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us the rent is %{brent}."
+ informative_text: "This is %{higher_or_lower} than we would expect."
+
+ scharge_value_check:
+ page_header: ""
+ check_answer_label: "Service charge confirmation"
+ hint_text: "Check the following:
- the decimal point
- the frequency, for example every week or every calendar month
- the needs type
"
+ question_text: "Are you sure?"
+ title_text: "You told us the service charge is %{scharge}."
+ informative_text: "This is higher than we would expect."
+
+ pscharge_value_check:
+ page_header: ""
+ check_answer_label: "Personal service charge confirmation"
+ hint_text: "Check the following:
- the decimal point
- the frequency, for example every week or every calendar month
- the needs type
"
+ question_text: "Are you sure?"
+ title_text: "You told us the personal service charge is %{pscharge}."
+ informative_text: "This is higher than we would expect."
+
+ supcharg_value_check:
+ page_header: ""
+ check_answer_label: "Support charge confirmation"
+ hint_text: "Check the following:
- the decimal point
- the frequency, for example every week or every calendar month
- the needs type
"
+ question_text: "Are you sure?"
+ title_text: "You told us the support charge is %{supcharg}."
+ informative_text: "This is higher than we would expect."
+
+ void_date_value_check:
+ page_header: ""
+ check_answer_label: "Void date confirmation"
+ hint_text: ""
+ question_text: "Are you sure the property has been vacant for this long?"
+ title_text: "You told us that the property has been vacant for more than 2 years."
+ informative_text: "This is longer than we would expect."
+
+ major_repairs_date_value_check:
+ page_header: ""
+ check_answer_label: "Major repairs date confirmation"
+ hint_text: ""
+ question_text: "Are you sure the property has been vacant for this long?"
+ title_text: "You told us the property has been vacant for 2 years."
+ informative_text: "This is longer than we would expect."
diff --git a/config/locales/forms/2025/lettings/tenancy_information.en.yml b/config/locales/forms/2025/lettings/tenancy_information.en.yml
new file mode 100644
index 000000000..3276d1b3d
--- /dev/null
+++ b/config/locales/forms/2025/lettings/tenancy_information.en.yml
@@ -0,0 +1,66 @@
+en:
+ forms:
+ 2025:
+ lettings:
+ tenancy_information:
+ joint:
+ page_header: ""
+ check_answer_label: "Is this a joint tenancy?"
+ hint_text: "This is where two or more people are named on the tenancy agreement"
+ question_text: "Is this a joint tenancy?"
+
+ startertenancy:
+ page_header: ""
+ check_answer_label: "Is this a starter or introductory tenancy?"
+ hint_text: "If the tenancy has an ‘introductory period’ answer ‘yes’.
You should submit a CORE log at the beginning of the starter tenancy or introductory period, with the best information you have at the time. You do not need to submit a log when a tenant later rolls onto the main tenancy."
+ question_text: "Is this a starter tenancy?"
+
+ tenancy:
+ tenancy_type:
+ page_header: ""
+ tenancy:
+ check_answer_label: "Type of main tenancy"
+ hint_text: ""
+ question_text: "What is the type of tenancy?"
+ tenancyother:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Please state the tenancy type"
+ starter_tenancy_type:
+ page_header: ""
+ tenancy:
+ check_answer_label: "Type of main tenancy after the starter or introductory period has ended"
+ hint_text: ""
+ question_text: "What is the type of tenancy after the starter or introductory period has ended?"
+ tenancyother:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Please state the tenancy type"
+
+ tenancylength:
+ tenancy_length:
+ page_header: ""
+ check_answer_label: "Length of fixed-term tenancy"
+ hint_text: "Do not include the starter or introductory period."
+ question_text: "What is the length of the fixed-term tenancy to the nearest year?"
+ tenancy_length_affordable_rent:
+ page_header: ""
+ check_answer_label: "Length of fixed-term tenancy"
+ hint_text: "Do not include the starter or introductory period.The minimum period is 2 years for social or affordable rent general needs logs. You do not need to submit CORE logs for these types of tenancies if they are shorter than 2 years."
+ question_text: "What is the length of the fixed-term tenancy to the nearest year?"
+ tenancy_length_intermediate_rent:
+ page_header: ""
+ check_answer_label: "Length of fixed-term tenancy"
+ hint_text: "Do not include the starter or introductory period.The minimum period is 1 year for intermediate rent general needs logs. You do not need to submit CORE logs for these types of tenancies if they are shorter than 1 year."
+ question_text: "What is the length of the fixed-term tenancy to the nearest year?"
+ tenancy_length_periodic:
+ page_header: ""
+ check_answer_label: "Length of periodic tenancy"
+ hint_text: "As this is a periodic tenancy, this question is optional. If you do not have the information available click save and continue"
+ question_text: "What is the length of the periodic tenancy to the nearest year?"
+
+ sheltered:
+ page_header: ""
+ check_answer_label: "Is this letting in sheltered accommodation?"
+ hint_text: "Sheltered housing and special retirement housing are for tenants with low-level care and support needs. This typically provides some limited support to enable independent living, such as alarm-based assistance or a scheme manager.Extra care housing is for tenants with medium to high care and support needs, often with 24 hour access to support staff provided by an agency registered with the Care Quality Commission."
+ question_text: "Is this letting in sheltered accommodation?"
diff --git a/config/locales/forms/2025/sales/guidance.en.yml b/config/locales/forms/2025/sales/guidance.en.yml
new file mode 100644
index 000000000..4ed6796b3
--- /dev/null
+++ b/config/locales/forms/2025/sales/guidance.en.yml
@@ -0,0 +1,46 @@
+en:
+ forms:
+ 2025:
+ sales:
+ guidance:
+ shared_ownership_type_definitions:
+ title: "Shared Ownership Type Definitions"
+ content: "
Shared Ownership (old model lease): Cannot be used for homes funded through the Affordable Homes Programme 2021 to 2026. Use the new model lease for these properties.
+
Shared Ownership (new model lease): Homes bought using the Affordable Homes Programme 2021 to 2026.
+
Social HomeBuy — shared ownership purchase: Tenants of private registered providers purchase their home at discount on Shared Ownership terms.
+
Home Ownership for people with Long-Term Disabilities (HOLD): A shared ownership sale for those with long term disabilities.
+
Older Persons Shared Ownership: A type of shared ownership for those 55 years and over.
+
Rent to Buy — Shared Ownership: A sale following a period of discounted rent.
+
Right to Shared Ownership (RtSO): A sale of a share of a rented home to a tenant using this scheme.
+
London Living Rent — Shared Ownership: A shared ownership sale following a period of discounted rent as part of the London Living Rent scheme.
"
+
+ discounted_ownership_type_definitions:
+ title: "Discounted Ownership Type Definitions"
+ content: "
Right to Acquire (RTA): a discounted sale of a property built or purchased after 31 March 1997 to tenants of a private registered provider.
+
Preserved Right to Buy (PRTB): a discounted sale of a property that used to be owned by a council to tenants of a private registered provider.
+
Voluntary Right to Buy (VRTB): a discounted sale to tenants in this PRP owned property, as part of a pilot scheme.
+
Right to Buy (RTB): a discounted sale to tenants in this council owned property.
+
Rent to Buy full ownership: a sale on full ownership terms following a period of discounted rent.
+
Social HomeBuy for outright purchase: a discounted sale to tenants of a private registered provider on full ownership terms.
+
Any other equity loan scheme: any scheme, not covered elsewhere, in which a loan is used to purchase equity.
"
+
+ mortgage_lender:
+ title: "Can’t find the mortgage lender you’re looking for?"
+ content: "
+ - Double check the spelling and try again
+ - Type the first few letters to see the suggestions
+ - Type Other and continue - we’ll ask you to type in your answer in the next question
+
"
+
+ outright_sale_type_definitions:
+ title: "Outright sale type definitions"
+ content: "
Outright sale: the full purchase of a property, usually with a mortgage or cash.
+
Other sale: any sale which does not fit the criteria of any of the remaining options.
"
+
+ privacy_notice_buyer_joint_purchase:
+ content: "Make sure the buyers have seen or been given access to %{privacy_notice_link} before completing this log. This is a legal requirement under data protection legislation."
+ privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice"
+
+ privacy_notice_buyer:
+ content: "Make sure the buyer has seen or been given access to %{privacy_notice_link} before completing this log. This is a legal requirement under data protection legislation."
+ privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice"
diff --git a/config/locales/forms/2025/sales/household_characteristics.en.yml b/config/locales/forms/2025/sales/household_characteristics.en.yml
new file mode 100644
index 000000000..b92cba2de
--- /dev/null
+++ b/config/locales/forms/2025/sales/household_characteristics.en.yml
@@ -0,0 +1,345 @@
+en:
+ forms:
+ 2025:
+ sales:
+ household_characteristics:
+ age1:
+ page_header: ""
+ age1_known:
+ check_answer_label: "Buyer 1’s age"
+ hint_text: "Buyer 1 is the person in the household who does the most paid work. If it’s a joint purchase and the buyers do the same amount of paid work, buyer 1 is whoever is the oldest."
+ question_text: "Do you know buyer 1’s age?"
+ age1:
+ check_answer_label: "Buyer 1’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex1:
+ page_header: ""
+ check_answer_label: "Buyer 1’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes buyer 1’s gender identity?"
+
+ ethnic_group:
+ page_header: ""
+ check_answer_label: "Buyer 1’s ethnic group"
+ hint_text: ""
+ question_text: "What is buyer 1’s ethnic group?"
+
+ ethnic:
+ ethnic_background_black:
+ page_header: ""
+ check_answer_label: "Buyer 1’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 1’s Black, African, Caribbean or Black British background?"
+ ethnic_background_asian:
+ page_header: ""
+ check_answer_label: "Buyer 1’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 1’s Asian or Asian British background?"
+ ethnic_background_arab:
+ page_header: ""
+ check_answer_label: "Buyer 1’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 1’s Arab background?"
+ ethnic_background_mixed:
+ page_header: ""
+ check_answer_label: "Buyer 1’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 1’s Mixed or Multiple ethnic groups background?"
+ ethnic_background_white:
+ page_header: ""
+ check_answer_label: "Buyer 1’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 1’s White background?"
+
+ nationality_all_group:
+ page_header: ""
+ check_answer_label: "Buyer 1’s nationality"
+ hint_text: "If buyer 1 is a dual national of the United Kingdom and another country, enter United Kingdom. If they are a dual national of two other countries, the buyer should decide which country to enter."
+ question_text: "What is buyer 1’s nationality?"
+
+ nationality_all:
+ page_header: ""
+ check_answer_label: "Buyer 1’s nationality"
+ hint_text: ""
+ question_text: "Enter a nationality"
+
+ ecstat1:
+ page_header: ""
+ check_answer_label: "Buyer 1's working situation"
+ hint_text: ""
+ question_text: "Which of these best describes buyer 1's working situation?"
+
+ buy1livein:
+ page_header: ""
+ check_answer_label: "Will buyer 1 live in the property?"
+ hint_text: ""
+ question_text: "Will buyer 1 live in the property?"
+
+ relat2:
+ buyer:
+ page_header: ""
+ check_answer_label: "Buyer 2's relationship to buyer 1"
+ hint_text: ""
+ question_text: "What is buyer 2's relationship to buyer 1?"
+ person:
+ page_header: ""
+ check_answer_label: "Person 2’s relationship to Buyer 1"
+ hint_text: ""
+ question_text: "What is Person 2’s relationship to Buyer 1?"
+
+ age2:
+ buyer:
+ page_header: ""
+ age2_known:
+ check_answer_label: "Buyer 2’s age"
+ hint_text: ""
+ question_text: "Do you know buyer 2’s age?"
+ age2:
+ check_answer_label: "Buyer 2’s age"
+ hint_text: ""
+ question_text: "Age"
+ person:
+ page_header: ""
+ age2_known:
+ check_answer_label: "Person 2’s age known?"
+ hint_text: ""
+ question_text: "Do you know person 2’s age?"
+ age2:
+ check_answer_label: "Person 2’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex2:
+ buyer:
+ page_header: ""
+ check_answer_label: "Buyer 2’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes buyer 2’s gender identity?"
+ person:
+ page_header: ""
+ check_answer_label: "Person 2’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes Person 2’s gender identity?"
+
+ ethnic_group2:
+ page_header: ""
+ check_answer_label: "Buyer 2’s ethnic group"
+ hint_text: ""
+ question_text: "What is buyer 2’s ethnic group?"
+
+ ethnicbuy2:
+ ethnic_background_black:
+ page_header: ""
+ check_answer_label: "Buyer 2’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 2’s Black, African, Caribbean or Black British background?"
+ ethnic_background_asian:
+ page_header: ""
+ check_answer_label: "Buyer 2’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 2’s Asian or Asian British background?"
+ ethnic_background_arab:
+ page_header: ""
+ check_answer_label: "Buyer 2’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 2’s Arab background?"
+ ethnic_background_mixed:
+ page_header: ""
+ check_answer_label: "Buyer 2’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 2’s Mixed or Multiple ethnic groups background?"
+ ethnic_background_white:
+ page_header: ""
+ check_answer_label: "Buyer 2’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 2’s White background?"
+
+ nationality_all_buyer2_group:
+ page_header: ""
+ check_answer_label: "Buyer 2’s nationality"
+ hint_text: "If buyer 1 is a dual national of the United Kingdom and another country, enter United Kingdom. If they are a dual national of two other countries, the buyer should decide which country to enter."
+ question_text: "What is buyer 2’s nationality?"
+
+ nationality_all_buyer2:
+ page_header: ""
+ check_answer_label: "Buyer 2’s nationality"
+ hint_text: ""
+ question_text: "Enter a nationality"
+
+ ecstat2:
+ buyer:
+ page_header: ""
+ check_answer_label: "Buyer 2's working situation"
+ hint_text: ""
+ question_text: "Which of these best describes buyer 2's working situation?"
+ person:
+ page_header: ""
+ check_answer_label: "Person 2’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes Person 2’s working situation?"
+
+ buy2livein:
+ page_header: ""
+ check_answer_label: "Will buyer 2 live in the property?"
+ hint_text: ""
+ question_text: "Will buyer 2 live in the property?"
+
+ hholdcount:
+ joint_purchase:
+ page_header: ""
+ check_answer_label: "Number of other people living in the property"
+ hint_text: "You can provide details for a maximum of 4 other people for a joint purchase."
+ question_text: "Besides the buyers, how many other people live or will live in the property?"
+ not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Number of other people living in the property"
+ hint_text: "You can provide details for a maximum of 5 other people if there is only one buyer."
+ question_text: "Besides the buyer, how many other people live or will live in the property?"
+
+ details_known_2:
+ page_header: ""
+ check_answer_label: "Details known for person 2?"
+ hint_text: ""
+ question_text: "Do you know the details for person 2?"
+
+ details_known_3:
+ page_header: ""
+ check_answer_label: "Details known for person 3?"
+ hint_text: ""
+ question_text: "Do you know the details for person 3?"
+
+ relat3:
+ page_header: ""
+ check_answer_label: "Person 3’s relationship to Buyer 1"
+ hint_text: ""
+ question_text: "What is Person 3’s relationship to Buyer 1?"
+
+ age3:
+ page_header: ""
+ age3_known:
+ check_answer_label: "Person 3’s age known?"
+ hint_text: ""
+ question_text: "Do you know person 3’s age?"
+ age3:
+ check_answer_label: "Person 3’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex3:
+ page_header: ""
+ check_answer_label: "Person 3’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes Person 3’s gender identity?"
+
+ ecstat3:
+ page_header: ""
+ check_answer_label: "Person 3’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes Person 3’s working situation?"
+
+ details_known_4:
+ page_header: ""
+ check_answer_label: "Details known for person 4?"
+ hint_text: ""
+ question_text: "Do you know the details for person 4?"
+
+ relat4:
+ page_header: ""
+ check_answer_label: "Person 4’s relationship to Buyer 1"
+ hint_text: ""
+ question_text: "What is Person 4’s relationship to Buyer 1?"
+
+ age4:
+ page_header: ""
+ age4_known:
+ check_answer_label: "Person 4’s age known?"
+ hint_text: ""
+ question_text: "Do you know person 4’s age?"
+ age4:
+ check_answer_label: "Person 4’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex4:
+ page_header: ""
+ check_answer_label: "Person 4’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes Person 4’s gender identity?"
+
+ ecstat4:
+ page_header: ""
+ check_answer_label: "Person 4’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes Person 4’s working situation?"
+
+ details_known_5:
+ page_header: ""
+ check_answer_label: "Details known for person 5?"
+ hint_text: ""
+ question_text: "Do you know the details for person 5?"
+
+ relat5:
+ page_header: ""
+ check_answer_label: "Person 5’s relationship to Buyer 1"
+ hint_text: ""
+ question_text: "What is Person 5’s relationship to Buyer 1?"
+
+ age5:
+ page_header: ""
+ age5_known:
+ check_answer_label: "Person 5’s age known?"
+ hint_text: ""
+ question_text: "Do you know person 5’s age?"
+ age5:
+ check_answer_label: "Person 5’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex5:
+ page_header: ""
+ check_answer_label: "Person 5’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes Person 5’s gender identity?"
+
+ ecstat5:
+ page_header: ""
+ check_answer_label: "Person 5’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes Person 5’s working situation?"
+
+ details_known_6:
+ page_header: ""
+ check_answer_label: "Details known for person 6?"
+ hint_text: ""
+ question_text: "Do you know the details for person 6?"
+
+ relat6:
+ page_header: ""
+ check_answer_label: "Person 6’s relationship to Buyer 1"
+ hint_text: ""
+ question_text: "What is Person 6’s relationship to Buyer 1?"
+
+ age6:
+ page_header: ""
+ age6_known:
+ check_answer_label: "Person 6’s age known?"
+ hint_text: ""
+ question_text: "Do you know person 6’s age?"
+ age6:
+ check_answer_label: "Person 6’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex6:
+ page_header: ""
+ check_answer_label: "Person 6’s gender identity"
+ hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth."
+ question_text: "Which of these best describes Person 6’s gender identity?"
+
+ ecstat6:
+ page_header: ""
+ check_answer_label: "Person 6’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes Person 6’s working situation?"
diff --git a/config/locales/forms/2025/sales/household_needs.en.yml b/config/locales/forms/2025/sales/household_needs.en.yml
new file mode 100644
index 000000000..1908ba6ca
--- /dev/null
+++ b/config/locales/forms/2025/sales/household_needs.en.yml
@@ -0,0 +1,34 @@
+en:
+ forms:
+ 2025:
+ sales:
+ household_needs:
+ hhregres:
+ page_header: ""
+ check_answer_label: "Have any of the buyers ever served as a regular in the UK armed forces?"
+ hint_text: "A regular is somebody who has served in the Royal Navy, the Royal Marines, the Royal Airforce or Army full time and does not include reserve forces"
+ question_text: "Have any of the buyers ever served as a regular in the UK armed forces?"
+
+ hhregresstill:
+ page_header: ""
+ check_answer_label: "Are they still serving in the UK armed forces?"
+ hint_text: ""
+ question_text: "Is the buyer still serving in the UK armed forces?"
+
+ armedforcesspouse:
+ page_header: ""
+ check_answer_label: "Are any of the buyers a spouse or civil partner of a UK armed forces regular who died in service within the last 2 years?"
+ hint_text: ""
+ question_text: "Are any of the buyers a spouse or civil partner of a UK armed forces regular who died in service within the last 2 years?"
+
+ disabled:
+ page_header: ""
+ check_answer_label: "Does anyone in the household have a disability?"
+ hint_text: "This includes any long-term health condition that has an impact on the person's day-to-day life"
+ question_text: "Does anyone in the household consider themselves to have a disability?"
+
+ wheel:
+ page_header: ""
+ check_answer_label: "Does anyone in the household use a wheelchair?"
+ hint_text: "This can be inside or outside the home"
+ question_text: "Does anyone in the household use a wheelchair?"
diff --git a/config/locales/forms/2025/sales/household_situation.en.yml b/config/locales/forms/2025/sales/household_situation.en.yml
new file mode 100644
index 000000000..3aa3545d8
--- /dev/null
+++ b/config/locales/forms/2025/sales/household_situation.en.yml
@@ -0,0 +1,50 @@
+en:
+ forms:
+ 2025:
+ sales:
+ household_situation:
+ prevten:
+ page_header: ""
+ check_answer_label: "Buyer 1’s previous tenure"
+ hint_text: ""
+ question_text: "What was buyer 1’s previous tenure?"
+
+ last_accommodation:
+ page_header: ""
+ ppcodenk:
+ check_answer_label: "Buyer 1’s last settled accommodation"
+ hint_text: "This is also known as the household’s 'last settled home'"
+ question_text: "Do you know the postcode of buyer 1’s last settled accommodation?"
+ ppostcode_full:
+ check_answer_label: "Postcode of buyer 1’s last settled accommodation"
+ hint_text: ""
+ question_text: "Postcode"
+
+ last_accommodation_la:
+ page_header: ""
+ previous_la_known:
+ check_answer_label: "Local authority of buyer 1’s last settled accommodation"
+ hint_text: "This is also known as the household’s 'last settled home'"
+ question_text: "Do you know the local authority of buyer 1’s last settled accommodation?"
+ prevloc:
+ check_answer_label: "Local authority of buyer 1’s last settled accommodation"
+ hint_text: ""
+ question_text: "Select a local authority"
+
+ buyers_organisations:
+ page_header: ""
+ check_answer_label: "Organisations buyers were registered with"
+ hint_text: "Select all that apply. This question is optional. If no options are applicable, leave the options blank, and select save and continue."
+ question_text: "What organisations were the buyers registered with?"
+
+ buy2living:
+ page_header: ""
+ check_answer_label: "Buyer 2 living at the same address"
+ hint_text: ""
+ question_text: "At the time of purchase, was buyer 2 living at the same address as buyer 1?"
+
+ prevtenbuy2:
+ page_header: ""
+ check_answer_label: "Buyer 2’s previous tenure"
+ hint_text: ""
+ question_text: "What was buyer 2’s previous tenure?"
diff --git a/config/locales/forms/2025/sales/income_benefits_and_savings.en.yml b/config/locales/forms/2025/sales/income_benefits_and_savings.en.yml
new file mode 100644
index 000000000..20beb0b85
--- /dev/null
+++ b/config/locales/forms/2025/sales/income_benefits_and_savings.en.yml
@@ -0,0 +1,90 @@
+en:
+ forms:
+ 2025:
+ sales:
+ income_benefits_and_savings:
+ buyer_1_income:
+ page_header: ""
+ income1nk:
+ check_answer_label: "Buyer 1’s gross annual income known?"
+ hint_text: ""
+ question_text: "Do you know buyer 1’s annual income?"
+ income1:
+ check_answer_label: "Buyer 1’s gross annual income"
+ hint_text: "Provide the gross annual income (i.e. salary before tax) plus the annual amount of benefits, Universal Credit or pensions, and income from investments."
+ question_text: "Buyer 1’s gross annual income"
+
+ inc1mort:
+ page_header: ""
+ check_answer_label: "Buyer 1’s income used for mortgage application"
+ hint_text: ""
+ question_text: "Was buyer 1’s income used for a mortgage application?"
+
+ buyer_2_income:
+ page_header: ""
+ income2nk:
+ check_answer_label: "Buyer 2’s gross annual income known?"
+ hint_text: ""
+ question_text: "Do you know buyer 2’s annual income?"
+ income2:
+ check_answer_label: "Buyer 2’s gross annual income"
+ hint_text: "Provide the gross annual income (i.e. salary before tax) plus the annual amount of benefits, Universal Credit or pensions, and income from investments."
+ question_text: "Buyer 2’s gross annual income"
+
+ inc2mort:
+ page_header: ""
+ check_answer_label: "Buyer 2’s income used for mortgage application"
+ hint_text: ""
+ question_text: "Was buyer 2’s income used for a mortgage application?"
+
+ housing_benefits:
+ joint_purchase:
+ page_header: ""
+ check_answer_label: "Housing-related benefits buyers received before buying this property"
+ hint_text: ""
+ question_text: "Were the buyers receiving any of these housing-related benefits immediately before buying this property?"
+ not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Housing-related benefits buyer received before buying this property"
+ hint_text: ""
+ question_text: "Was the buyer receiving any of these housing-related benefits immediately before buying this property?"
+
+ savings:
+ joint_purchase:
+ page_header: ""
+ savingsnk:
+ check_answer_label: "Buyers’ total savings known?"
+ hint_text: ""
+ question_text: "Do you know how much the 'buyers' had in savings before they paid any deposit for the property?"
+ savings:
+ check_answer_label: "Buyers’ total savings before any deposit paid"
+ hint_text: "Include any savings, investments, ISAs, premium bonds, shares, or money held in a bank or building society account."
+ question_text: "Enter their total savings to the nearest £10"
+ not_joint_purchase:
+ page_header: ""
+ savingsnk:
+ check_answer_label: "Buyer’s total savings known?"
+ hint_text: ""
+ question_text: "Do you know how much the buyer had in savings before they paid any deposit for the property?"
+ savings:
+ check_answer_label: "Buyer’s total savings before any deposit paid"
+ hint_text: "Include any savings, investments, ISAs, premium bonds, shares, or money held in a bank or building society account."
+ question_text: "Enter their total savings to the nearest £10"
+
+ prevown:
+ joint_purchase:
+ page_header: ""
+ check_answer_label: "Buyers previously owned a property."
+ hint_text: ""
+ question_text: "Have any of the buyers previously owned a property?"
+ not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Buyer previously owned a property."
+ hint_text: ""
+ question_text: "Has the buyer previously owned a property?"
+
+ prevshared:
+ page_header: ""
+ check_answer_label: "Previous property shared ownership?"
+ hint_text: "For any buyer"
+ question_text: "Was the previous property under shared ownership?"
diff --git a/config/locales/forms/2025/sales/property_information.en.yml b/config/locales/forms/2025/sales/property_information.en.yml
new file mode 100644
index 000000000..240c96f09
--- /dev/null
+++ b/config/locales/forms/2025/sales/property_information.en.yml
@@ -0,0 +1,91 @@
+en:
+ forms:
+ 2025:
+ sales:
+ property_information:
+ uprn:
+ page_header: ""
+ uprn_known:
+ check_answer_label: "UPRN known?"
+ hint_text: "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.
The UPRN may not be the same as the property reference assigned by your organisation.
If you don’t know the UPRN you can enter the address of the property instead on the next screen."
+ question_text: "Do you know the property's UPRN?"
+ uprn:
+ check_answer_label: "UPRN"
+ hint_text: ""
+ question_text: "What is the property's UPRN?"
+
+ uprn_confirmed:
+ page_header: "We found an address that might be this property"
+ check_answer_label: "Is this the right address?"
+ hint_text: ""
+ question_text: "Is this the property address?"
+
+ address_matcher:
+ page_header: "Find an address"
+ address_line1_input:
+ check_answer_label: "Find address"
+ hint_text: ""
+ question_text: "Address line 1"
+ postcode_full_input:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Postcode"
+
+ uprn_selection:
+ page_header: "We found an address that might be this property"
+ check_answer_label: "Select the correct address"
+ hint_text: ""
+ question_text: "Select the correct address"
+
+ address:
+ page_header: "Q12 - What is the property's address?"
+ address_line1:
+ check_answer_label: "Address lines 1 and 2"
+ hint_text: ""
+ question_text: "Address line 1"
+ address_line2:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Address line 2 (optional)"
+ town_or_city:
+ check_answer_label: "Town or city"
+ hint_text: ""
+ question_text: "Town or city"
+ county:
+ check_answer_label: "County"
+ hint_text: ""
+ question_text: "County (optional)"
+ postcode_full:
+ check_answer_label: "Postcode"
+ hint_text: ""
+ question_text: "Postcode"
+
+ la:
+ page_header: ""
+ check_answer_label: "Local authority"
+ hint_text: ""
+ question_text: "What is the property’s local authority?"
+
+ beds:
+ page_header: ""
+ check_answer_label: "Number of bedrooms"
+ hint_text: "A bedsit has 1 bedroom."
+ question_text: "How many bedrooms does the property have?"
+
+ proptype:
+ page_header: ""
+ check_answer_label: "Type of unit"
+ hint_text: ""
+ question_text: "What type of unit is the property?"
+
+ builtype:
+ page_header: ""
+ check_answer_label: "Type of building"
+ hint_text: ""
+ question_text: "What type of building is the property?"
+
+ wchair:
+ page_header: ""
+ check_answer_label: "Property built or adapted to wheelchair-user standards"
+ hint_text: "This is whether someone who uses a wheelchair is able to make full use of all of the property’s rooms and facilities, including use of both inside and outside space, and entering and exiting the property."
+ question_text: "Is the property built or adapted to wheelchair-user standards?"
diff --git a/config/locales/forms/2025/sales/sale_information.en.yml b/config/locales/forms/2025/sales/sale_information.en.yml
new file mode 100644
index 000000000..51270a92e
--- /dev/null
+++ b/config/locales/forms/2025/sales/sale_information.en.yml
@@ -0,0 +1,206 @@
+en:
+ forms:
+ 2025:
+ sales:
+ sale_information:
+ living_before_purchase:
+ joint_purchase:
+ page_header: ""
+ proplen:
+ check_answer_label: "Number of years living in the property before purchase"
+ hint_text: "You should round up to the nearest year"
+ question_text: "How long did they live there?"
+ proplen_asked:
+ check_answer_label: "Buyers lived in the property before purchasing"
+ hint_text: ""
+ question_text: "Did the buyers live in the property before purchasing it?"
+ not_joint_purchase:
+ page_header: ""
+ proplen:
+ check_answer_label: "Number of years living in the property before purchase"
+ hint_text: "You should round up to the nearest year"
+ question_text: "How long did they live there?"
+ proplen_asked:
+ check_answer_label: "Buyer lived in the property before purchasing"
+ hint_text: ""
+ question_text: "Did the buyer live in the property before purchasing it?"
+
+ staircasing:
+ page_header: ""
+ check_answer_label: "Staircasing transaction"
+ hint_text: "A staircasing transaction is when the household purchases more shares in their property, increasing the proportion they own and decreasing the proportion the housing association owns. Once the household purchases 100% of the shares, they own the property"
+ question_text: "Is this a staircasing transaction?"
+ about_staircasing:
+ page_header: "About the staircasing transaction"
+ stairbought:
+ check_answer_label: "Percentage bought in this staircasing transaction"
+ hint_text: ""
+ question_text: "What percentage of the property has been bought in this staircasing transaction?"
+ stairowned:
+ joint_purchase:
+ check_answer_label: "Percentage the buyers now own in total"
+ hint_text: ""
+ question_text: "What percentage of the property do the buyers now own in total?"
+ not_joint_purchase:
+ check_answer_label: "Percentage the buyer now owns in total"
+ hint_text: ""
+ question_text: "What percentage of the property does the buyer now own in total?"
+ staircasesale:
+ check_answer_label: "Part of a back-to-back staircasing transaction"
+ hint_text: ""
+ question_text: "Is this transaction part of a back-to-back staircasing transaction to facilitate sale of the home on the open market?"
+
+ resale:
+ page_header: ""
+ check_answer_label: "Is this a resale?"
+ hint_text: "If the social landlord has previously sold the property to another buyer and is now reselling the property, select 'yes'. If this is the first time the property has been sold, select 'no'."
+ question_text: "Is this a resale?"
+
+ exchange_date:
+ page_header: ""
+ check_answer_label: "Exchange of contracts date"
+ hint_text: ""
+ question_text: "What is the exchange of contracts date?"
+
+ handover_date:
+ page_header: ""
+ check_answer_label: "Practical completion or handover date"
+ hint_text: "This is the date on which the building contractor hands over responsibility for the completed property to the private registered provider (PRP)"
+ question_text: "What is the practical completion or handover date?"
+
+ la_nominations:
+ page_header: ""
+ check_answer_label: "Household rehoused under a local authority nominations agreement?"
+ hint_text: "A local authority nominations agreement is a written agreement between a local authority and private registered provider (PRP) that some or all of its sales vacancies are offered to local authorities for rehousing"
+ question_text: "Was the household rehoused under a 'local authority nominations agreement'?"
+
+ soctenant:
+ joint_purchase:
+ page_header: ""
+ check_answer_label: "Any buyers were registered providers, housing association or local authority tenants immediately before this sale?"
+ hint_text: ""
+ question_text: "Were any of the buyers private registered providers, housing association or local authority tenants immediately before this sale?"
+ not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Buyer was a registered provider, housing association or local authority tenant immediately before this sale?"
+ hint_text: ""
+ question_text: "Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale?"
+
+ frombeds:
+ page_header: "About the buyers’ previous property"
+ check_answer_label: "Number of bedrooms in previous property"
+ hint_text: "For bedsits enter 1"
+ question_text: "How many bedrooms did the property have?"
+
+ fromprop:
+ page_header: ""
+ check_answer_label: "Previous property type"
+ hint_text: ""
+ question_text: "What was the previous property type?"
+
+ socprevten:
+ page_header: ""
+ check_answer_label: "Previous property tenure"
+ hint_text: ""
+ question_text: "What was the previous tenure of the buyer?"
+
+ value:
+ page_header: "About the price of the property"
+ check_answer_label: "Full purchase price"
+ hint_text: "Enter the full purchase price of the property before any discounts are applied. For shared ownership, enter the full purchase price paid for 100% equity (this is equal to the value of the share owned by the PRP plus the value bought by the purchaser)"
+ question_text: "What was the full purchase price?"
+
+ equity:
+ page_header: "About the price of the property"
+ check_answer_label: "Initial percentage equity stake"
+ hint_text: "Enter the amount of initial equity held by the purchaser (for example, 25% or 50%)"
+ question_text: "What was the initial percentage equity stake purchased?"
+
+ mortgageused:
+ page_header: "Mortgage Amount"
+ check_answer_label: "Mortgage used"
+ hint_text: ""
+ question_text: "Was a mortgage used for the purchase of this property?"
+
+ mortgage:
+ page_header: "Mortgage Amount"
+ check_answer_label: "Mortgage amount"
+ hint_text: "Enter the amount of mortgage agreed with the mortgage lender. Exclude any deposits or cash payments. Numeric in pounds. Rounded to the nearest pound."
+ question_text: "What is the mortgage amount?"
+
+ mortgagelender:
+ page_header: ""
+ check_answer_label: "Mortgage lender"
+ hint_text: ""
+ question_text: "What is the name of the mortgage lender?"
+
+ mortgagelenderother:
+ page_header: ""
+ check_answer_label: "Other Mortgage Lender"
+ hint_text: ""
+ question_text: "What is the other mortgage lender?"
+
+ mortlen:
+ page_header: ""
+ check_answer_label: "Length of mortgage"
+ hint_text: "You should round up to the nearest year. Value should not exceed 60 years."
+ question_text: "What is the length of the mortgage?"
+
+ extrabor:
+ page_header: ""
+ check_answer_label: "Any other borrowing?"
+ hint_text: ""
+ question_text: "Does this include any extra borrowing?"
+
+ deposit:
+ page_header: "About the deposit"
+ check_answer_label: "Deposit amount"
+ hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan. As this is a fully staircased sale this question is optional. If you do not have the information available click save and continue"
+ question_text: "How much cash deposit was paid on the property?"
+
+ cashdis:
+ page_header: "About the deposit"
+ check_answer_label: "Cash discount through SocialHomeBuy"
+ hint_text: "Enter the total cash discount given on the property being purchased through the Social HomeBuy scheme"
+ question_text: "How much cash discount was given through Social HomeBuy?"
+
+ mrent:
+ page_header: ""
+ check_answer_label: "Monthly rent"
+ hint_text: "Amount paid before any charges"
+ question_text: "What is the basic monthly rent?"
+
+ leaseholdcharges:
+ page_header: ""
+ has_mscharge:
+ check_answer_label: "Does the property have any monthly leasehold charges?"
+ hint_text: "For example, service and management charges"
+ question_text: "Does the property have any monthly leasehold charges?"
+ mscharge:
+ check_answer_label: "Monthly leasehold charges"
+ hint_text: ""
+ question_text: "Enter the total monthly charge"
+
+ purchase_price:
+ discounted_ownership:
+ page_header: "About the price of the property"
+ check_answer_label: "Purchase price"
+ hint_text: "For all schemes, including Right to Acquire (RTA), Right to Buy (RTB), Voluntary Right to Buy (VRTB) or Preserved Right to Buy (PRTB) sales, enter the full price of the property without any discount"
+ question_text: "What is the full purchase price?"
+ outright_sale:
+ page_header: "About the price of the property"
+ check_answer_label: "Purchase price"
+ hint_text: ""
+ question_text: "What is the full purchase price?"
+
+ discount:
+ page_header: "About the price of the property"
+ check_answer_label: "Percentage discount"
+ hint_text: "For Right to Buy (RTB), Preserved Right to Buy (PRTB), and Voluntary Right to Buy (VRTB)If discount capped, enter capped %If the property is being sold to an existing tenant under the RTB, PRTB, or VRTB schemes, enter the % discount from the full market value that is being given."
+ question_text: "What was the percentage discount?"
+
+ grant:
+ page_header: "About the price of the property"
+ check_answer_label: "Amount of any loan, grant or subsidy"
+ hint_text: "For all schemes except Right to Buy (RTB), Preserved Right to Buy (PRTB), Voluntary Right to Buy (VRTB) and Rent to Buy"
+ question_text: "What was the amount of any loan, grant, discount or subsidy given?"
diff --git a/config/locales/forms/2025/sales/setup.en.yml b/config/locales/forms/2025/sales/setup.en.yml
new file mode 100644
index 000000000..4f00ab0c2
--- /dev/null
+++ b/config/locales/forms/2025/sales/setup.en.yml
@@ -0,0 +1,110 @@
+en:
+ forms:
+ 2025:
+ sales:
+ setup:
+ owning_organisation_id:
+ page_header: ""
+ check_answer_label: "Owning organisation"
+ hint_text: ""
+ question_text: "Which organisation owns this log?"
+
+ managing_organisation_id:
+ page_header: ""
+ check_answer_label: "Reported by"
+ hint_text: ""
+ question_text: "Which organisation is reporting this sale?"
+
+ assigned_to_id:
+ page_header: ""
+ check_answer_label: "Log owner"
+ hint_text: ""
+ question_text: "Which user are you creating this log for?"
+
+ saledate:
+ page_header: ""
+ check_answer_label: "Sale completion date"
+ hint_text: ""
+ question_text: "What is the sale completion date?"
+
+ purchid:
+ page_header: ""
+ check_answer_label: "Purchaser code"
+ hint_text: "This is how you usually refer to the purchaser on your own systems."
+ question_text: "What is the purchaser code?"
+
+ ownershipsch:
+ page_header: ""
+ check_answer_label: "Purchase made under ownership scheme"
+ hint_text: ""
+ question_text: "Was this purchase made through an ownership scheme?"
+
+ type:
+ shared_ownership:
+ page_header: "Type of shared ownership sale"
+ check_answer_label: "Type of shared ownership sale"
+ hint_text: "When the purchaser buys an initial share of up to 75% of the property value and pays rent to the Private Registered Provider (PRP) on the remaining portion, or a subsequent staircasing transaction"
+ question_text: "What is the type of shared ownership sale?"
+ discounted_ownership:
+ page_header: "Type of discounted ownership sale"
+ check_answer_label: "Type of discounted ownership sale"
+ hint_text: ""
+ question_text: "What is the type of discounted ownership sale?"
+ outright_ownership:
+ page_header: "Type of outright sale"
+ type:
+ check_answer_label: "Type of outright sale"
+ hint_text: ""
+ question_text: "What is the type of outright sale?"
+ othtype:
+ check_answer_label: "Type of other sale"
+ hint_text: ""
+ question_text: "What type of sale is it?"
+
+ companybuy:
+ page_header: ""
+ check_answer_label: "Company buyer"
+ hint_text: ""
+ question_text: "Is the buyer a company?"
+
+ buylivein:
+ page_header: ""
+ check_answer_label: "Buyers living in property"
+ hint_text: ""
+ question_text: "Will any buyers live in the property?"
+
+ jointpur:
+ page_header: ""
+ check_answer_label: "Joint purchase"
+ hint_text: "This is where two or more people are named as legal owners of the property after the purchase"
+ question_text: "Is this a joint purchase?"
+
+ jointmore:
+ page_header: ""
+ check_answer_label: "More than 2 joint buyers"
+ hint_text: ""
+ question_text: "Are there more than 2 joint buyers of this property?"
+
+ noint:
+ joint_purchase:
+ page_header: ""
+ check_answer_label: "Buyers interviewed in person?"
+ hint_text: "You should still try to answer all questions even if the buyers weren’t interviewed in person"
+ question_text: "Were the buyers interviewed for any of the answers you will provide on this log?"
+ not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Buyer interviewed in person?"
+ hint_text: "You should still try to answer all questions even if the buyer wasn’t interviewed in person"
+ question_text: "Was the buyer interviewed for any of the answers you will provide on this log?"
+
+ privacynotice:
+ joint_purchase:
+ page_header: "Ministry of Housing, Communities and Local Government privacy notice"
+ check_answer_label: "Buyers have seen the privacy notice?"
+ hint_text: ""
+ question_text: "Declaration"
+ not_joint_purchase:
+ page_header: "Ministry of Housing, Communities and Local Government privacy notice"
+ check_answer_label: "Buyer has seen the privacy notice?"
+ hint_text: ""
+ question_text: "Declaration"
diff --git a/config/locales/forms/2025/sales/soft_validations.en.yml b/config/locales/forms/2025/sales/soft_validations.en.yml
new file mode 100644
index 000000000..c8f0990ba
--- /dev/null
+++ b/config/locales/forms/2025/sales/soft_validations.en.yml
@@ -0,0 +1,244 @@
+en:
+ forms:
+ 2025:
+ sales:
+ soft_validations:
+ retirement_value_check:
+ max:
+ page_header: ""
+ check_answer_label: "Retirement confirmation"
+ hint_text: ""
+ question_text: "Are you sure this person isn't retired?"
+ title_text: "You told us this person is over 66 and not retired."
+ informative_text: "The minimum expected retirement age in England is 66."
+ min:
+ page_header: ""
+ check_answer_label: "Retirement confirmation"
+ hint_text: ""
+ question_text: "Are you sure this person is retired?"
+ title_text: "You told us this person is aged %{age} years and retired."
+ informative_text: "The minimum expected retirement age in England is 66."
+ old_persons_shared_ownership_value_check:
+ page_header: ""
+ check_answer_label: "Shared ownership confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text:
+ joint_purchase: "You told us the buyers are using the Older Persons Shared Ownership scheme."
+ not_joint_purchase: "You told us the buyer is using the Older Persons Shared Ownership scheme."
+ informative_text: "At least one buyer must be aged 65 years and over to use this scheme."
+ income1_value_check:
+ check_answer_label: "Buyer 1 income confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ min:
+ page_header: ""
+ title_text: "You told us income was %{income}."
+ informative_text: "This is less than we would expect for someone in this working situation."
+ max:
+ page_header: ""
+ title_text: "You told us the income of buyer 1 is %{income}. This seems high. Are you sure this is correct?"
+
+ income2_value_check:
+ check_answer_label: "Buyer 2 income confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ min:
+ page_header: ""
+ title_text: "You told us income was %{income}."
+ informative_text: "This is less than we would expect for someone in this working situation."
+ max:
+ page_header: ""
+ title_text: "You told us the income of buyer 2 is %{income}. This seems high. Are you sure this is correct?"
+
+ combined_income_value_check:
+ page_header: ""
+ check_answer_label: "Combined income confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us the combined income of this household is %{combined_income}. This seems high. Are you sure this is correct?"
+
+ mortgage_value_check:
+ page_header: ""
+ check_answer_label: "Mortgage confirmation"
+ hint_text: ""
+ question_text: "Are you sure that the mortgage is more than 5 times the income used for the mortgage application?"
+ title_text: "You told us that the mortgage amount is %{mortgage}."
+ informative_text: "This is more than 5 times the income, which is higher than we would expect."
+
+ savings_value_check:
+ page_header: ""
+ check_answer_label: "Savings confirmation"
+ hint_text: ""
+ question_text: "Are you sure the savings are higher than £100,000?"
+ joint_purchase:
+ title_text: "You told us the buyers’ savings were %{savings}."
+ informative_text: "This is higher than we would expect."
+ not_joint_purchase:
+ title_text: "You told us the buyer’s savings were %{savings}."
+ informative_text: "This is higher than we would expect."
+
+ staircase_bought_value_check:
+ page_header: ""
+ check_answer_label: "Percentage bought confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that %{percentage}% was bought in this staircasing transaction."
+ informative_text: "Most staircasing transactions are less than 50%"
+
+ stairowned_value_check:
+ joint_purchase:
+ page_header: ""
+ check_answer_label: "Percentage owned confirmation"
+ hint_text: ""
+ question_text: "Are you sure?"
+ title_text: "You told us that the buyers now own %{stairowned} of the property."
+ informative_text: "The maximum percentage that can be owned under the Older Persons Shared Ownership scheme is 75%, unless the property was funded outside the Affordable Homes Programme. Make sure these answers are correct."
+ not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Percentage owned confirmation"
+ hint_text: ""
+ question_text: "Are you sure?"
+ title_text: "You told us that the buyer now owns %{stairowned} of the property."
+ informative_text: "The maximum percentage that can be owned under the Older Persons Shared Ownership scheme is 75%, unless the property was funded outside the Affordable Homes Programme. Make sure these answers are correct."
+
+ hodate_check:
+ page_header: ""
+ check_answer_label: "Practical completion or handover date check"
+ hint_text: ""
+ question_text: "Are you sure?"
+ title_text: "You told us practical completion or handover date is more than 3 years before sale completion date."
+
+ value_value_check:
+ page_header: ""
+ check_answer_label: "Purchase price confirmation"
+ hint_text: ""
+ question_text: "Are you sure?"
+ title_text: "You told us the purchase price is %{value}."
+ informative_text: "This is %{higher_or_lower} than we would expect."
+
+ shared_ownership_deposit_value_check:
+ page_header: ""
+ check_answer_label: "Shared ownership deposit confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that the %{mortgage_deposit_and_discount_error_fields} add up to %{mortgage_deposit_and_discount_total}."
+
+ deposit_value_check:
+ joint_purchase:
+ page_header: ""
+ check_answer_label: "Deposit confirmation"
+ hint_text: ""
+ question_text: "Are you sure that the deposit is this much higher than the buyer's savings?"
+ title_text: "You told us the buyers’ deposit was %{deposit} and their savings were %{savings}."
+ informative_text: "The deposit amount is higher than we would expect for the amount of savings they have."
+ not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Deposit confirmation"
+ hint_text: ""
+ question_text: "Are you sure that the deposit is this much higher than the buyer's savings?"
+ title_text: "You told us the buyer’s deposit was %{deposit} and their savings were %{savings}."
+ informative_text: "The deposit amount is higher than we would expect for the amount of savings they have."
+
+ address_search_value_check:
+ page_header: ""
+ check_answer_label: ""
+ hint_text: ""
+ question_text: ""
+ title_text: "No address found."
+ informative_text: "We could not find an address that matches your search. You can search again or continue to enter the address manually."
+
+ wheel_value_check:
+ page_header: ""
+ check_answer_label: "Does anyone in the household use a wheelchair?"
+ hint_text: ""
+ question_text: "You told us that someone in the household uses a wheelchair."
+ title_text: "You told us that someone in the household uses a wheelchair."
+
+ buyer_livein_value_check:
+ buyer1:
+ page_header: ""
+ check_answer_label: "Buyer live in confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that buyer 1 will not live in the property."
+ informative_text: "For %{ownership_scheme} types, the buyer usually lives in the property."
+ buyer2:
+ page_header: ""
+ check_answer_label: "Buyer live in confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that buyer 2 will not live in the property."
+ informative_text: "For %{ownership_scheme} types, the buyer usually lives in the property."
+
+ student_not_child_value_check:
+ page_header: ""
+ check_answer_label: "Student not a child confirmation"
+ hint_text: ""
+ question_text: "Are you sure this person is not a child?"
+ title_text: "You told us this person is a student aged between 16 and 19."
+ informative_text: "Are you sure this person is not a child?"
+
+ partner_under_16_value_check:
+ page_header: ""
+ check_answer_label: "Partner under 16 confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to buyer 1."
+ informative_text: "Are you sure this is correct?"
+
+ multiple_partners_value_check:
+ page_header: ""
+ check_answer_label: "Multiple partners confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us there are more than 1 persons with 'Partner' relationship to buyer 1."
+ informative_text: "Are you sure this is correct?"
+
+ monthly_charges_value_check:
+ page_header: ""
+ check_answer_label: "Monthly charges confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that the monthly charges were %{mscharge}."
+ informative_text: "This is higher than we would expect."
+
+ extra_borrowing_value_check:
+ page_header: ""
+ check_answer_label: "Extra borrowing confirmation"
+ hint_text: ""
+ question_text: "Are you sure there is no extra borrowing?"
+ title_text: "You told us that the mortgage and deposit total is %{mortgage_and_deposit_total}."
+ informative_text: "This is higher than the purchase price minus the discount."
+
+ percentage_discount_value_check:
+ page_header: ""
+ check_answer_label: "Percentage discount confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that the percentage discount is %{discount}."
+ informative_text: "This is higher than we would expect."
+
+ grant_value_check:
+ page_header: ""
+ check_answer_label: "Grant value confirmation"
+ hint_text: ""
+ question_text: "Are you sure? Grants are usually £9,000 - £16,000"
+ title_text: "You told us that the grant amount is %{grant}."
+ informative_text: "Loans, grants and subsidies are usually between £9,000 and £16,000."
+
+ discounted_sale_value_check:
+ page_header: ""
+ check_answer_label: "Discounted sale value confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "Mortgage, deposit, and grant total must equal %{value_with_discount}."
+ informative_text: "Your given mortgage, deposit and grant total is %{mortgage_deposit_and_grant_total}."
+
+ deposit_and_mortgage_value_check:
+ page_header: ""
+ check_answer_label: "Deposit and mortgage against discount confirmation"
+ hint_text: ""
+ question_text: "Are you sure? Mortgage and deposit usually equal or are more than (value - discount)"
+ title_text: "You told us the mortgage amount was %{mortgage}, the cash deposit was %{deposit} and the discount was %{discount}."
+ informative_text: "We would expect the mortgage amount and the deposit added together to be the same as the purchase price minus the discount."
diff --git a/config/locales/validations/lettings/2023/bulk_upload.en.yml b/config/locales/validations/lettings/2023/bulk_upload.en.yml
new file mode 100644
index 000000000..e61dbe4a1
--- /dev/null
+++ b/config/locales/validations/lettings/2023/bulk_upload.en.yml
@@ -0,0 +1,56 @@
+en:
+ validations:
+ lettings:
+ 2023:
+ bulk_upload:
+ not_answered: "You must answer %{question}"
+ invalid_option: "Enter a valid value for %{question}"
+ invalid_number: "Enter a number for %{question}"
+ spreadsheet_dupe: "This is a duplicate of a log in your file."
+ duplicate: "This is a duplicate log."
+ blank_file: "Template is blank - The template must be filled in for us to create the logs and check if data is correct."
+ wrong_template:
+ wrong_template: "Incorrect start dates, please ensure you have used the correct template."
+ no_headers: "Your file does not contain the required header rows. Add or check the header rows and upload your file again. [Read more about using the template headers](%{guidance_link})."
+ wrong_field_numbers_count: "Incorrect number of fields, please ensure you have used the correct template."
+ over_max_column_count: "Too many columns, please ensure you have used the correct template."
+ owning_organisation:
+ not_found: "The owning organisation code is incorrect."
+ not_stock_owner: "The owning organisation code provided is for an organisation that does not own stock."
+ not_permitted: "You do not have permission to add logs for this owning organisation."
+ managing_organisation:
+ no_relationship: "This managing organisation does not have a relationship with the owning organisation."
+ not_found: "The managing organisation code is incorrect."
+ not_answered: "The managing organisation code is incorrect."
+ assigned_to:
+ not_found: "User with the specified email could not be found."
+ organisation_not_related: "User must be related to owning organisation or managing organisation."
+ startdate:
+ outside_collection_window: "Enter a date within the %{year_combo} collection year, which is between 1st April %{start_year} and 31st March %{end_year}."
+ year_not_two_or_four_digits: "Tenancy start year must be 2 or 4 digits."
+ housingneeds:
+ no_and_dont_know_disabled_needs_conjunction: "No disabled access needs and don’t know disabled access needs cannot be selected together."
+ dont_know_disabled_needs_conjunction: "Don’t know disabled access needs can’t be selected if you have selected fully wheelchair-accessible housing, wheelchair access to essential rooms, level access housing or other disabled access needs."
+ no_disabled_needs_conjunction: "No disabled access needs can’t be selected if you have selected fully wheelchair-accessible housing, wheelchair access to essential rooms, level access housing or other disabled access needs."
+ housingneeds_type:
+ only_one_option_permitted: "Only one disabled access need: fully wheelchair-accessible housing, wheelchair access to essential rooms or level access housing, can be selected."
+ condition_effects:
+ no_choices: "You cannot answer this question as you told us nobody in the household has a physical or mental health condition (or other illness) expected to last 12 months or more."
+ lettype:
+ needstype_general_needs: "This needs type is general needs, but the letting type is supported housing. Change either the needs type or the letting type."
+ needstype_supported_housing: "This needs type is supported housing, but the letting type is general needs. Change either the needs type or the letting type."
+ needstype:
+ lettype_not_general_needs: "This letting type is supported housing, but the needs type is general needs. Change either the needs type or the letting type."
+ lettype_not_supported_housing: "This letting type is general needs, but the needs type is supported housing. Change either the needs type or the letting type."
+ reason:
+ renewal_reason_needed: "The reason for leaving must be \"End of assured shorthold tenancy - no fault\" or \"End of fixed term tenancy - no fault\" if the letting is a renewal."
+ referral:
+ general_needs_prp_referred_by_la: "The source of the referral cannot be referred by local authority housing department for a general needs log."
+ nominated_by_local_ha_but_la: "The source of the referral cannot be Nominated by local housing authority as your organisation is a local authority."
+ scheme:
+ must_relate_to_org: "%{capitalised_location_or_scheme} code must relate to a %{location_or_scheme} that is owned by the owning organisation or managing organisation."
+ does_not_belong_to_org: "This %{scheme_or_management_group} code does not belong to the owning organisation or managing organisation."
+ declaration:
+ missing: "You must show the MHCLG privacy notice to the tenant before you can submit this log."
+ age:
+ invalid: "Age of person %{person_num} must be a number or the letter R"
\ No newline at end of file
diff --git a/config/locales/validations/lettings/2024/bulk_upload.en.yml b/config/locales/validations/lettings/2024/bulk_upload.en.yml
new file mode 100644
index 000000000..76985ee32
--- /dev/null
+++ b/config/locales/validations/lettings/2024/bulk_upload.en.yml
@@ -0,0 +1,56 @@
+en:
+ validations:
+ lettings:
+ 2024:
+ bulk_upload:
+ not_answered: "You must answer %{question}"
+ invalid_option: "Enter a valid value for %{question}"
+ invalid_number: "Enter a number for %{question}"
+ spreadsheet_dupe: "This is a duplicate of a log in your file."
+ duplicate: "This is a duplicate log."
+ blank_file: "Template is blank - The template must be filled in for us to create the logs and check if data is correct."
+ wrong_template:
+ wrong_template: "Incorrect start dates, please ensure you have used the correct template."
+ no_headers: "Your file does not contain the required header rows. Add or check the header rows and upload your file again. [Read more about using the template headers](%{guidance_link})."
+ wrong_field_numbers_count: "Incorrect number of fields, please ensure you have used the correct template."
+ over_max_column_count: "Too many columns, please ensure you have used the correct template."
+ owning_organisation:
+ not_found: "The owning organisation code is incorrect."
+ not_stock_owner: "The owning organisation code provided is for an organisation that does not own stock."
+ not_permitted:
+ not_support: "You do not have permission to add logs for this owning organisation."
+ support: "This owning organisation is not affiliated with %{org_name}."
+ managing_organisation:
+ no_relationship: "This managing organisation does not have a relationship with the owning organisation."
+ not_found: "The managing organisation code is incorrect."
+ assigned_to:
+ not_found: "User with the specified email could not be found."
+ organisation_not_related: "User must be related to owning organisation or managing organisation."
+ startdate:
+ outside_collection_window: "Enter a date within the %{year_combo} collection year, which is between 1st April %{start_year} and 31st March %{end_year}."
+ year_not_two_or_four_digits: "Tenancy start year must be 2 or 4 digits."
+ housingneeds:
+ no_and_dont_know_disabled_needs_conjunction: "No disabled access needs and don’t know disabled access needs cannot be selected together."
+ dont_know_disabled_needs_conjunction: "Don’t know disabled access needs can’t be selected if you have selected fully wheelchair-accessible housing, wheelchair access to essential rooms, level access housing or other disabled access needs."
+ no_disabled_needs_conjunction: "No disabled access needs can’t be selected if you have selected fully wheelchair-accessible housing, wheelchair access to essential rooms, level access housing or other disabled access needs."
+ housingneeds_type:
+ only_one_option_permitted: "Only one disabled access need: fully wheelchair-accessible housing, wheelchair access to essential rooms or level access housing, can be selected."
+ condition_effects:
+ no_choices: "You cannot answer this question as you told us nobody in the household has a physical or mental health condition (or other illness) expected to last 12 months or more."
+ reason:
+ renewal_reason_needed: "The reason for leaving must be \"End of social or private sector tenancy - no fault\", \"End of social or private sector tenancy - evicted due to anti-social behaviour (ASB)\", \"End of social or private sector tenancy - evicted due to rent arrears\" or \"End of social or private sector tenancy - evicted for any other reason\"."
+ referral:
+ general_needs_prp_referred_by_la: "The source of the referral cannot be referred by local authority housing department for a general needs log."
+ nominated_by_local_ha_but_la: "The source of the referral cannot be Nominated by local housing authority as your organisation is a local authority."
+ scheme:
+ must_relate_to_org: "This scheme code does not belong to the owning organisation or managing organisation."
+ location:
+ must_relate_to_org: "Location code must relate to a location that is owned by the owning organisation or managing organisation."
+ age:
+ invalid: "Age of person %{person_num} must be a number or the letter R"
+ address:
+ not_found: "We could not find this address. Check the address data in your CSV file is correct and complete, or select the correct address using the CORE site."
+ nationality:
+ invalid: "Select a valid nationality."
+ charges:
+ missing_charges: "Please enter the %{sentence_fragment}. If there is no %{sentence_fragment}, please enter '0'."
\ No newline at end of file
diff --git a/config/locales/validations/lettings/date.en.yml b/config/locales/validations/lettings/date.en.yml
new file mode 100644
index 000000000..54c53996f
--- /dev/null
+++ b/config/locales/validations/lettings/date.en.yml
@@ -0,0 +1,20 @@
+en:
+ validations:
+ lettings:
+ date:
+ startdate:
+ after_void_date: "Enter a tenancy start date that is after the void date."
+ after_major_repair_date: "Enter a tenancy start date that is after the major repair date."
+ ten_years_after_void_date: "Enter a tenancy start date that is no more than 10 years after the void date."
+ ten_years_after_mrc_date: "Enter a tenancy start date that is no more than 10 years after the major repairs completion date."
+
+ mrcdate:
+ before_tenancy_start: "Enter a major repairs date that is before the tenancy start date."
+ not_first_let: "Major repairs date must not be completed if the tenancy is a first let."
+ ten_years_before_tenancy_start: "Enter a major repairs completion date that is no more than 10 years before the tenancy start date."
+ before_void_date: "Major repairs date must be after the void date if provided."
+
+ void_date:
+ ten_years_before_tenancy_start: "Enter a void date no more than 10 years before the tenancy start date."
+ before_tenancy_start: "Enter a void date that is before the tenancy start date."
+ after_mrcdate: "Void date must be before the major repairs date if provided."
diff --git a/config/locales/validations/lettings/setup.en.yml b/config/locales/validations/lettings/setup.en.yml
new file mode 100644
index 000000000..d2ee9bf0f
--- /dev/null
+++ b/config/locales/validations/lettings/setup.en.yml
@@ -0,0 +1,53 @@
+en:
+ validations:
+ lettings:
+ setup:
+ startdate:
+ not_within:
+ next_two_weeks: "The tenancy start date must not be later than 14 days from today’s date."
+ must_be_within:
+ current_collection_year:
+ "Enter a date within the %{current_start_year_short} to %{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}."
+ previous_and_current_collection_year:
+ "Enter a date within the %{previous_start_year_short} to %{previous_end_year_short} or %{previous_end_year_short} to %{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}."
+ invalid_merged_organisations_start_date:
+ same_organisation: "Enter a date when the owning and managing organisation was active. %{owning_organisation} became inactive on %{merge_date} and was replaced by %{absorbing_organisation}."
+ same_merge: "Enter a date when the owning and managing organisations were active. %{owning_organisation} and %{managing_organisation} became inactive on %{owning_organisation_merge_date} and were replaced by %{owning_absorbing_organisation}."
+ owning_organisation: "Enter a date when the owning organisation was active. %{owning_organisation} became inactive on %{merge_date} and was replaced by %{absorbing_organisation}."
+ managing_organisation: "Enter a date when the managing organisation was active. %{managing_organisation} became inactive on %{merge_date} and was replaced by %{absorbing_organisation}."
+ different_merge: "Enter a date when the owning and managing organisations were active. %{owning_organisation} became inactive on %{owning_organisation_merge_date} and was replaced by %{owning_absorbing_organisation}. %{managing_organisation} became inactive on %{managing_organisation_merge_date} and was replaced by %{managing_absorbing_organisation}."
+ invalid_absorbing_organisations_start_date:
+ same_organisation: "Enter a date when the owning and managing organisation was active. %{owning_organisation} became active on %{available_from}."
+ owning_organisation: "Enter a date when the owning organisation was active. %{owning_organisation} became active on %{available_from}."
+ managing_organisation: "Enter a date when the managing organisation was active. %{managing_organisation} became active on %{available_from}."
+ different_organisations: "Enter a date when the owning and managing organisations were active. %{owning_organisation} became active on %{owning_organisation_active_from}, and %{managing_organisation} became active on %{managing_organisation_active_from}."
+
+ assigned_to:
+ invalid: "Please select the owning organisation or managing organisation that you belong to."
+
+ owning_organisation:
+ invalid: "Please select the owning organisation or managing organisation that you belong to."
+ inactive:
+ merged_organisation:
+ "The owning organisation must be active on the tenancy start date. %{owning_organisation} became inactive on %{merge_date} and was replaced by %{absorbing_organisation}."
+ absorbing_organisation:
+ "The owning organisation must be active on the tenancy start date. %{owning_organisation} became active on %{available_from}."
+
+ managing_organisation:
+ invalid: "Please select the owning organisation or managing organisation that you belong to."
+ data_sharing_agreement_not_signed: "The organisation must accept the Data Sharing Agreement before it can be selected as the managing organisation."
+ inactive:
+ merged_organisation:
+ "The managing organisation must be active on the tenancy start date. %{managing_organisation} became inactive on %{merge_date} and was replaced by %{absorbing_organisation}."
+ absorbing_organisation:
+ "The managing organisation must be active on the tenancy start date. %{managing_organisation} became active on %{available_from}."
+
+ intermediate_rent_product_name:
+ blank: "Enter name of other intermediate rent product."
+
+ scheme:
+ incomplete: "This scheme is incomplete. Select another scheme or update this one."
+ no_completed_locations: "This scheme cannot be chosen as it has no completed locations."
+
+ location:
+ incomplete: "This location is incomplete. Select another location or update this one."
diff --git a/config/locales/validations/lettings/tenancy.en.yml b/config/locales/validations/lettings/tenancy.en.yml
new file mode 100644
index 000000000..4c053e9ae
--- /dev/null
+++ b/config/locales/validations/lettings/tenancy.en.yml
@@ -0,0 +1,25 @@
+en:
+ validations:
+ lettings:
+ tenancy:
+ needstype:
+ invalid_fixed_tenancylength: "Enter a tenancy length between %{min_tenancy_length} and 99 years for a tenancy of this type."
+ invalid_periodic_tenancylength: "Enter a tenancy length between %{min_tenancy_length} and 99 years (or don't specify the length) for a tenancy of this type."
+
+ tenancylength:
+ invalid_fixed_tenancylength: "Enter a tenancy length between %{min_tenancy_length} and 99 years for a tenancy of this type."
+ invalid_periodic_tenancylength: "Enter a tenancy length between %{min_tenancy_length} and 99 years (or don't specify the length) for a tenancy of this type."
+ fixed_term_not_required: "You must only answer the length of the tenancy if it's fixed-term."
+
+ tenancy:
+ invalid_fixed_tenancylength: "Enter a tenancy length between %{min_tenancy_length} and 99 years for a tenancy of this type."
+ invalid_periodic_tenancylength: "Enter a tenancy length between %{min_tenancy_length} and 99 years (or don't specify the length) for a tenancy of this type."
+ fixed_term_not_required: "You must only answer the length of the tenancy if it's fixed-term."
+
+ rent_type:
+ invalid_fixed_tenancylength: "Enter a tenancy length between %{min_tenancy_length} and 99 years for a tenancy of this type."
+ invalid_periodic_tenancylength: "Enter a tenancy length between %{min_tenancy_length} and 99 years (or don't specify the length) for a tenancy of this type."
+
+ joint:
+ sole_tenancy: "This cannot be a joint tenancy as you've told us there's only one person in the household."
+ multiple_members_required: "There must be more than one person in the household as you've told us this is a joint tenancy."
diff --git a/config/locales/validations/sales/2023/bulk_upload.en.yml b/config/locales/validations/sales/2023/bulk_upload.en.yml
new file mode 100644
index 000000000..517f56858
--- /dev/null
+++ b/config/locales/validations/sales/2023/bulk_upload.en.yml
@@ -0,0 +1,29 @@
+en:
+ validations:
+ sales:
+ 2023:
+ bulk_upload:
+ not_answered: "You must answer %{question}"
+ invalid_option: "Enter a valid value for %{question}"
+ spreadsheet_dupe: "This is a duplicate of a log in your file."
+ duplicate: "This is a duplicate log."
+ blank_file: "Template is blank - The template must be filled in for us to create the logs and check if data is correct."
+ wrong_template:
+ wrong_template: "Incorrect sale dates, please ensure you have used the correct template."
+ no_headers: "Your file does not contain the required header rows. Add or check the header rows and upload your file again. [Read more about using the template headers](%{guidance_link})."
+ wrong_field_numbers_count: "Incorrect number of fields, please ensure you have used the correct template."
+ over_max_column_count: "Too many columns, please ensure you have used the correct template."
+ owning_organisation:
+ not_answered: "The owning organisation code is incorrect."
+ not_found: "The owning organisation code is incorrect."
+ not_stock_owner: "The owning organisation code provided is for an organisation that does not own stock."
+ not_permitted: "You do not have permission to add logs for this owning organisation."
+ assigned_to:
+ not_found: "User with the specified email could not be found."
+ organisation_not_related: "User must be related to owning organisation or managing organisation."
+ managing_organisation_not_related: "This user belongs to an organisation that does not have a relationship with the owning organisation."
+ saledate:
+ outside_collection_window: "Enter a date within the %{year_combo} collection year, which is between 1st April %{start_year} and 31st March %{end_year}."
+ year_not_two_or_four_digits: "Sale completion year must be 2 or 4 digits."
+ ecstat1:
+ child_under_16: "Buyer 1 cannot be a child under 16."
diff --git a/config/locales/validations/sales/2024/bulk_upload.en.yml b/config/locales/validations/sales/2024/bulk_upload.en.yml
new file mode 100644
index 000000000..fc68662d1
--- /dev/null
+++ b/config/locales/validations/sales/2024/bulk_upload.en.yml
@@ -0,0 +1,44 @@
+en:
+ validations:
+ sales:
+ 2024:
+ bulk_upload:
+ not_answered: "You must answer %{question}"
+ invalid_option: "Enter a valid value for %{question}"
+ spreadsheet_dupe: "This is a duplicate of a log in your file."
+ duplicate: "This is a duplicate log."
+ blank_file: "Template is blank - The template must be filled in for us to create the logs and check if data is correct."
+ wrong_template:
+ over_max_column_count: "Too many columns, please ensure you have used the correct template."
+ no_headers: "Your file does not contain the required header rows. Add or check the header rows and upload your file again. [Read more about using the template headers](%{guidance_link})."
+ wrong_field_numbers_count: "Incorrect number of fields, please ensure you have used the correct template."
+ wrong_template: "Incorrect sale dates, please ensure you have used the correct template."
+ numeric:
+ within_range: "%{field} must be between %{min} and %{max}."
+ owning_organisation:
+ not_found: "The owning organisation code is incorrect."
+ not_stock_owner: "The owning organisation code provided is for an organisation that does not own stock."
+ not_permitted:
+ support: "This owning organisation is not affiliated with %(name)."
+ not_support: "You do not have permission to add logs for this owning organisation."
+ assigned_to:
+ not_found: "User with the specified email could not be found."
+ organisation_not_related: "User must be related to owning organisation or managing organisation."
+ managing_organisation_not_related: "This organisation does not have a relationship with the owning organisation."
+ saledate:
+ outside_collection_window: "Enter a date within the %{year_combo} collection year, which is between 1st April %{start_year} and 31st March %{end_year}."
+ year_not_two_or_four_digits: "Sale completion year must be 2 or 4 digits."
+ ecstat1:
+ buyer_cannot_be_over_16_and_child: "Buyer 1's age cannot be 16 or over if their working situation is child under 16."
+ buyer_cannot_be_child: "Buyer 1 cannot have a working situation of child under 16."
+ age1:
+ buyer_cannot_be_over_16_and_child: "Buyer 1's age cannot be 16 or over if their working situation is child under 16."
+ ecstat2:
+ buyer_cannot_be_over_16_and_child: "Buyer 2's age cannot be 16 or over if their working situation is child under 16."
+ buyer_cannot_be_child: "Buyer 2 cannot have a working situation of child under 16."
+ age2:
+ buyer_cannot_be_over_16_and_child: "Buyer 2's age cannot be 16 or over if their working situation is child under 16."
+ address:
+ not_found: "We could not find this address. Check the address data in your CSV file is correct and complete, or select the correct address using the CORE site."
+ nationality:
+ invalid: "Select a valid nationality."
diff --git a/spec/components/data_protection_confirmation_banner_component_spec.rb b/spec/components/data_protection_confirmation_banner_component_spec.rb
index 608628093..fb687f25c 100644
--- a/spec/components/data_protection_confirmation_banner_component_spec.rb
+++ b/spec/components/data_protection_confirmation_banner_component_spec.rb
@@ -27,7 +27,7 @@ RSpec.describe DataProtectionConfirmationBannerComponent, type: :component do
expect(component.display_banner?).to eq(true)
expect(render).to have_link(
"Contact helpdesk to assign a data protection officer",
- href: "https://dluhcdigital.atlassian.net/servicedesk/customer/portal/6/group/11",
+ href: "https://mhclgdigital.atlassian.net/servicedesk/customer/portal/6/group/11",
)
expect(render).to have_selector("p", text: "To create logs your organisation must state a data protection officer. They must sign the Data Sharing Agreement.")
end
@@ -131,7 +131,7 @@ RSpec.describe DataProtectionConfirmationBannerComponent, type: :component do
expect(component.display_banner?).to eq(true)
expect(render).to have_link(
"Contact helpdesk to assign a data protection officer",
- href: "https://dluhcdigital.atlassian.net/servicedesk/customer/portal/6/group/11",
+ href: "https://mhclgdigital.atlassian.net/servicedesk/customer/portal/6/group/11",
)
expect(render).to have_selector("p", text: "To create logs your organisation must state a data protection officer. They must sign the Data Sharing Agreement.")
end
diff --git a/spec/features/bulk_upload_lettings_logs_spec.rb b/spec/features/bulk_upload_lettings_logs_spec.rb
index 315e1461e..b3e403cbf 100644
--- a/spec/features/bulk_upload_lettings_logs_spec.rb
+++ b/spec/features/bulk_upload_lettings_logs_spec.rb
@@ -74,6 +74,25 @@ RSpec.describe "Bulk upload lettings log" do
expect(page).to have_content("Upload lettings logs in bulk")
end
+
+ it "shows file to large error" do
+ stub_const("Forms::BulkUploadLettings::UploadYourFile::MAX_FILE_SIZE", 1.bytes)
+ visit("/lettings-logs")
+
+ click_link("Upload lettings logs in bulk")
+ expect(page).to have_content("Which year")
+ click_button("Continue")
+ choose(current_formatted_year)
+ click_button("Continue")
+ click_button("Continue")
+
+ allow_any_instance_of(Forms::BulkUploadLettings::UploadYourFile).to receive(:`).and_return("text/csv")
+
+ attach_file "file", file_fixture("2023_24_lettings_bulk_upload.xlsx")
+ click_button("Upload")
+
+ expect(page).to have_content("File must be 10MB or less. Check your file and delete data that does not need to be uploaded.")
+ end
end
# rubocop:enable RSpec/AnyInstance
diff --git a/spec/features/bulk_upload_sales_logs_spec.rb b/spec/features/bulk_upload_sales_logs_spec.rb
index b7098999d..b32df43e1 100644
--- a/spec/features/bulk_upload_sales_logs_spec.rb
+++ b/spec/features/bulk_upload_sales_logs_spec.rb
@@ -71,6 +71,26 @@ RSpec.describe "Bulk upload sales log" do
expect(page).to have_content("Upload sales logs in bulk")
end
+
+ it "shows file to large error" do
+ stub_const("Forms::BulkUploadSales::UploadYourFile::MAX_FILE_SIZE", 1.bytes)
+ visit("/sales-logs")
+ click_link("Upload sales logs in bulk")
+
+ expect(page).to have_content("Which year")
+ click_button("Continue")
+ click_button("Continue")
+ choose("2023 to 2024")
+ click_button("Continue")
+ click_button("Continue")
+
+ allow_any_instance_of(Forms::BulkUploadSales::UploadYourFile).to receive(:`).and_return("text/csv")
+
+ attach_file "file", file_fixture("2023_24_lettings_bulk_upload.xlsx")
+ click_button("Upload")
+
+ expect(page).to have_content("File must be 10MB or less. Check your file and delete data that does not need to be uploaded.")
+ end
end
# rubocop:enable RSpec/AnyInstance
diff --git a/spec/fixtures/forms/2021_2022.json b/spec/fixtures/forms/2021_2022.json
index 3159459ad..cb0aaf06e 100644
--- a/spec/fixtures/forms/2021_2022.json
+++ b/spec/fixtures/forms/2021_2022.json
@@ -740,7 +740,7 @@
}
],
"title_text": {
- "translation": "soft_validations.net_income.title_text",
+ "translation": "forms.2024.lettings.soft_validations.net_income_value_check.title_text",
"arguments": [
{
"key": "incfreq",
@@ -755,7 +755,7 @@
]
},
"informative_text": {
- "translation": "soft_validations.net_income.hint_text",
+ "translation": "forms.2024.lettings.soft_validations.net_income_value_check.informative_text",
"arguments": [
{
"key": "net_income_higher_or_lower_text",
diff --git a/spec/helpers/filters_helper_spec.rb b/spec/helpers/filters_helper_spec.rb
index b709a16ac..ce60d07f7 100644
--- a/spec/helpers/filters_helper_spec.rb
+++ b/spec/helpers/filters_helper_spec.rb
@@ -517,12 +517,46 @@ RSpec.describe FiltersHelper do
allow(Time).to receive(:now).and_return(Time.zone.local(2024, 5, 1))
end
- it "has the correct options" do
- expect(collection_year_options).to eq(
- {
- "2024" => "2024 to 2025", "2023" => "2023 to 2024", "2022" => "2022 to 2023"
- },
- )
+ context "and in crossover period" do
+ before do
+ allow(FormHandler.instance).to receive(:in_crossover_period?).and_return(true)
+ end
+
+ it "has the correct options" do
+ expect(collection_year_options).to eq(
+ {
+ "2024" => "2024 to 2025", "2023" => "2023 to 2024", "2022" => "2022 to 2023"
+ },
+ )
+ end
+ end
+
+ context "and not in crossover period" do
+ before do
+ allow(FormHandler.instance).to receive(:in_crossover_period?).and_return(false)
+ end
+
+ it "has the correct options" do
+ expect(collection_year_options).to eq(
+ {
+ "2024" => "2024 to 2025", "2023" => "2023 to 2024"
+ },
+ )
+ end
+
+ context "with future form use turned on" do
+ before do
+ allow(FeatureToggle).to receive(:allow_future_form_use?).and_return(true)
+ end
+
+ it "includes next year in the options" do
+ expect(collection_year_options).to eq(
+ {
+ "2025" => "2025 to 2026", "2024" => "2024 to 2025", "2023" => "2023 to 2024"
+ },
+ )
+ end
+ end
end
end
end
diff --git a/spec/helpers/interruption_screen_helper_spec.rb b/spec/helpers/interruption_screen_helper_spec.rb
index 60cd71131..0d4456f2a 100644
--- a/spec/helpers/interruption_screen_helper_spec.rb
+++ b/spec/helpers/interruption_screen_helper_spec.rb
@@ -93,7 +93,7 @@ RSpec.describe InterruptionScreenHelper do
context "when 1 out of 2 arguments are given" do
it "returns an empty string" do
informative_text = {
- "translation" => "soft_validations.net_income.hint_text",
+ "translation" => "forms.2024.lettings.soft_validations.net_income_value_check.informative_text",
"arguments" => [
{
"key" => "ecstat1",
diff --git a/spec/mailers/csv_download_mailer_spec.rb b/spec/mailers/csv_download_mailer_spec.rb
index 704d71e1e..138a0e4ce 100644
--- a/spec/mailers/csv_download_mailer_spec.rb
+++ b/spec/mailers/csv_download_mailer_spec.rb
@@ -42,7 +42,7 @@ RSpec.describe CsvDownloadMailer do
## Missing town or city
The town or city in some logs is missing. This data is required in the new version of CORE.\n",
how_to_fix: "You need to:\n
-- download [this spreadsheet for lettings logs](#{link}). This link will expire in one week. To request another link, [contact the CORE helpdesk](https://dluhcdigital.atlassian.net/servicedesk/customer/portal/6/group/11).
+- download [this spreadsheet for lettings logs](#{link}). This link will expire in one week. To request another link, [contact the CORE helpdesk](https://mhclgdigital.atlassian.net/servicedesk/customer/portal/6/group/11).
- fill in the missing address data
- check that the existing address data is correct\n",
duration: "20 minutes",
@@ -70,7 +70,7 @@ In some of your logs, the UPRN is the same as the purchaser code, but these are
If a log has the correct UPRN, leave the UPRN unchanged. If the UPRN is incorrect, clear the value and provide the full address instead. Alternatively, you can change the UPRN on the CORE system.\n",
how_to_fix: "You need to:\n
-- download [this spreadsheet for sales logs](#{link}). This link will expire in one week. To request another link, [contact the CORE helpdesk](https://dluhcdigital.atlassian.net/servicedesk/customer/portal/6/group/11).
+- download [this spreadsheet for sales logs](#{link}). This link will expire in one week. To request another link, [contact the CORE helpdesk](https://mhclgdigital.atlassian.net/servicedesk/customer/portal/6/group/11).
- check that the address data is correct
- correct any address errors\n",
duration: "20 minutes",
diff --git a/spec/models/form/lettings/pages/care_home_charges_value_check_spec.rb b/spec/models/form/lettings/pages/care_home_charges_value_check_spec.rb
index 0530cf445..e9c1d5879 100644
--- a/spec/models/form/lettings/pages/care_home_charges_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/care_home_charges_value_check_spec.rb
@@ -30,12 +30,12 @@ RSpec.describe Form::Lettings::Pages::CareHomeChargesValueCheck, type: :model do
it "has the correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.care_home_charges.title_text",
+ "translation" => "forms.2024.lettings.soft_validations.care_home_charges_value_check.title_text",
})
end
it "has the correct informative_text" do
- expect(page.informative_text).to eq("")
+ expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.lettings.soft_validations.care_home_charges_value_check.informative_text" })
end
it "has the correct interruption_screen_question_ids" do
diff --git a/spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_age_value_check_spec.rb b/spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_age_value_check_spec.rb
index 0b3d770b3..865fc6fd2 100644
--- a/spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_age_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_age_value_check_spec.rb
@@ -37,27 +37,15 @@ RSpec.describe Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPe
it "has the correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.pregnancy.title",
- "arguments" => [
- {
- "key" => "sex1",
- "label" => true,
- "i18n_template" => "sex1",
- },
- ],
+ "translation" => "forms.2024.lettings.soft_validations.pregnancy_value_check.females_in_soft_age_range_in_pregnant_household_value_check.title_text",
+ "arguments" => [],
})
end
it "has the correct informative_text" do
expect(page.informative_text).to eq({
- "translation" => "soft_validations.pregnancy.females_not_in_soft_age_range",
- "arguments" => [
- {
- "key" => "sex1",
- "label" => true,
- "i18n_template" => "sex1",
- },
- ],
+ "translation" => "forms.2024.lettings.soft_validations.pregnancy_value_check.females_in_soft_age_range_in_pregnant_household_value_check.informative_text",
+ "arguments" => [],
})
end
end
@@ -82,27 +70,15 @@ RSpec.describe Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPe
it "has the correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.pregnancy.title",
- "arguments" => [
- {
- "key" => "sex1",
- "label" => true,
- "i18n_template" => "sex1",
- },
- ],
+ "translation" => "forms.2024.lettings.soft_validations.pregnancy_value_check.females_in_soft_age_range_in_pregnant_household_value_check.title_text",
+ "arguments" => [],
})
end
it "has the correct informative_text" do
expect(page.informative_text).to eq({
- "translation" => "soft_validations.pregnancy.females_not_in_soft_age_range",
- "arguments" => [
- {
- "key" => "sex1",
- "label" => true,
- "i18n_template" => "sex1",
- },
- ],
+ "translation" => "forms.2024.lettings.soft_validations.pregnancy_value_check.females_in_soft_age_range_in_pregnant_household_value_check.informative_text",
+ "arguments" => [],
})
end
end
diff --git a/spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_value_check_spec.rb b/spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_value_check_spec.rb
index f380a5cb9..8ce2e5451 100644
--- a/spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_value_check_spec.rb
@@ -37,27 +37,15 @@ RSpec.describe Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPe
it "has the correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.pregnancy.title",
- "arguments" => [
- {
- "key" => "sex1",
- "label" => true,
- "i18n_template" => "sex1",
- },
- ],
+ "translation" => "forms.2024.lettings.soft_validations.pregnancy_value_check.females_in_soft_age_range_in_pregnant_household_value_check.title_text",
+ "arguments" => [],
})
end
it "has the correct informative_text" do
expect(page.informative_text).to eq({
- "translation" => "soft_validations.pregnancy.females_not_in_soft_age_range",
- "arguments" => [
- {
- "key" => "sex1",
- "label" => true,
- "i18n_template" => "sex1",
- },
- ],
+ "translation" => "forms.2024.lettings.soft_validations.pregnancy_value_check.females_in_soft_age_range_in_pregnant_household_value_check.informative_text",
+ "arguments" => [],
})
end
end
@@ -82,27 +70,15 @@ RSpec.describe Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPe
it "has the correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.pregnancy.title",
- "arguments" => [
- {
- "key" => "sex1",
- "label" => true,
- "i18n_template" => "sex1",
- },
- ],
+ "translation" => "forms.2024.lettings.soft_validations.pregnancy_value_check.females_in_soft_age_range_in_pregnant_household_value_check.title_text",
+ "arguments" => [],
})
end
it "has the correct informative_text" do
expect(page.informative_text).to eq({
- "translation" => "soft_validations.pregnancy.females_not_in_soft_age_range",
- "arguments" => [
- {
- "key" => "sex1",
- "label" => true,
- "i18n_template" => "sex1",
- },
- ],
+ "translation" => "forms.2024.lettings.soft_validations.pregnancy_value_check.females_in_soft_age_range_in_pregnant_household_value_check.informative_text",
+ "arguments" => [],
})
end
end
diff --git a/spec/models/form/lettings/pages/first_time_property_let_as_social_housing_spec.rb b/spec/models/form/lettings/pages/first_time_property_let_as_social_housing_spec.rb
index b095af406..43dc70378 100644
--- a/spec/models/form/lettings/pages/first_time_property_let_as_social_housing_spec.rb
+++ b/spec/models/form/lettings/pages/first_time_property_let_as_social_housing_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Lettings::Pages::FirstTimePropertyLetAsSocialHousing, type:
let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/pages/lead_tenant_ethnic_background_white_spec.rb b/spec/models/form/lettings/pages/lead_tenant_ethnic_background_white_spec.rb
index 1f2986064..b75e57674 100644
--- a/spec/models/form/lettings/pages/lead_tenant_ethnic_background_white_spec.rb
+++ b/spec/models/form/lettings/pages/lead_tenant_ethnic_background_white_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Lettings::Pages::LeadTenantEthnicBackgroundWhite, type: :mo
let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/pages/max_rent_value_check_spec.rb b/spec/models/form/lettings/pages/max_rent_value_check_spec.rb
deleted file mode 100644
index 273272d8b..000000000
--- a/spec/models/form/lettings/pages/max_rent_value_check_spec.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-require "rails_helper"
-
-RSpec.describe Form::Lettings::Pages::MaxRentValueCheck, type: :model do
- subject(:page) { described_class.new(page_id, page_definition, subsection) }
-
- let(:page_id) { "max_rent_value_check" }
- let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
-
- it "has correct subsection" do
- expect(page.subsection).to eq(subsection)
- end
-
- it "has correct questions" do
- expect(page.questions.map(&:id)).to eq(%w[rent_value_check])
- end
-
- it "has the correct id" do
- expect(page.id).to eq("max_rent_value_check")
- end
-
- it "has correct depends_on" do
- expect(page.depends_on).to eq([{ "rent_in_soft_max_range?" => true }])
- end
-
- it "has the correct title_text" do
- expect(page.title_text).to eq({ "arguments" => [{ "i18n_template" => "brent", "key" => "brent", "label" => true }], "translation" => "soft_validations.rent.outside_range_title" })
- end
-
- it "has the correct interruption_screen_question_ids" do
- expect(page.interruption_screen_question_ids).to eq(%w[brent period startdate uprn postcode_full la beds rent_type needstype])
- end
-end
diff --git a/spec/models/form/lettings/pages/min_rent_value_check_spec.rb b/spec/models/form/lettings/pages/min_rent_value_check_spec.rb
deleted file mode 100644
index 950f2f43f..000000000
--- a/spec/models/form/lettings/pages/min_rent_value_check_spec.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-require "rails_helper"
-
-RSpec.describe Form::Lettings::Pages::MinRentValueCheck, type: :model do
- subject(:page) { described_class.new(page_id, page_definition, subsection) }
-
- let(:page_id) { "min_rent_value_check" }
- let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
-
- it "has correct subsection" do
- expect(page.subsection).to eq(subsection)
- end
-
- it "has the correct description" do
- expect(page.description).to be nil
- end
-
- it "has correct questions" do
- expect(page.questions.map(&:id)).to eq(%w[rent_value_check])
- end
-
- it "has the correct id" do
- expect(page.id).to eq("min_rent_value_check")
- end
-
- it "has correct depends_on" do
- expect(page.depends_on).to eq(
- [{ "rent_in_soft_min_range?" => true }],
- )
- end
-
- it "has the correct title_text" do
- expect(page.title_text).to eq({
- "translation" => "soft_validations.rent.outside_range_title",
- "arguments" => [{ "i18n_template" => "brent", "key" => "brent", "label" => true }],
- })
- end
-
- it "has the correct interruption_screen_question_ids" do
- expect(page.interruption_screen_question_ids).to eq(%w[brent period startdate uprn postcode_full la beds rent_type needstype])
- end
-end
diff --git a/spec/models/form/lettings/pages/multiple_partners_value_check_spec.rb b/spec/models/form/lettings/pages/multiple_partners_value_check_spec.rb
index 551a3b070..f116cb601 100644
--- a/spec/models/form/lettings/pages/multiple_partners_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/multiple_partners_value_check_spec.rb
@@ -4,7 +4,8 @@ RSpec.describe Form::Lettings::Pages::MultiplePartnersValueCheck, type: :model d
subject(:page) { described_class.new(page_id, page_definition, subsection, person_index:) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
+ let(:subsection) { instance_double(Form::Subsection, form:) }
let(:person_index) { 1 }
let(:page_id) { "multiple_partners_value_check" }
@@ -39,13 +40,13 @@ RSpec.describe Form::Lettings::Pages::MultiplePartnersValueCheck, type: :model d
it "has correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.multiple_partners_lettings.title",
+ "translation" => "forms.2024.lettings.soft_validations.multiple_partners_value_check.title_text",
"arguments" => [],
})
end
it "has correct informative_text" do
- expect(page.informative_text).to eq({})
+ expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.lettings.soft_validations.multiple_partners_value_check.informative_text" })
end
it "has correct interruption_screen_question_ids" do
@@ -71,13 +72,13 @@ RSpec.describe Form::Lettings::Pages::MultiplePartnersValueCheck, type: :model d
it "has correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.multiple_partners_lettings.title",
+ "translation" => "forms.2024.lettings.soft_validations.multiple_partners_value_check.title_text",
"arguments" => [],
})
end
it "has correct informative_text" do
- expect(page.informative_text).to eq({})
+ expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.lettings.soft_validations.multiple_partners_value_check.informative_text" })
end
it "has correct interruption_screen_question_ids" do
diff --git a/spec/models/form/lettings/pages/net_income_value_check_spec.rb b/spec/models/form/lettings/pages/net_income_value_check_spec.rb
index 523e02c8b..fe98919ae 100644
--- a/spec/models/form/lettings/pages/net_income_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/net_income_value_check_spec.rb
@@ -24,13 +24,13 @@ RSpec.describe Form::Lettings::Pages::NetIncomeValueCheck, type: :model do
end
it "has the correct title_text" do
- expect(page.title_text).to eq({ "translation" => "soft_validations.net_income.title_text", "arguments" => [{ "i18n_template" => "incfreq", "key" => "incfreq", "label" => true }, { "arguments_for_key" => "earnings", "i18n_template" => "earnings", "key" => "field_formatted_as_currency" }] })
+ expect(page.title_text).to eq({ "translation" => "forms.2024.lettings.soft_validations.net_income_value_check.title_text", "arguments" => [{ "i18n_template" => "incfreq", "key" => "incfreq", "label" => true }, { "arguments_for_key" => "earnings", "i18n_template" => "earnings", "key" => "field_formatted_as_currency" }] })
end
it "has the correct informative_text" do
expect(page.informative_text).to eq({
"arguments" => [{ "i18n_template" => "net_income_higher_or_lower_text", "key" => "net_income_higher_or_lower_text", "label" => false }],
- "translation" => "soft_validations.net_income.hint_text",
+ "translation" => "forms.2024.lettings.soft_validations.net_income_value_check.informative_text",
})
end
end
diff --git a/spec/models/form/lettings/pages/no_females_pregnant_household_person_age_value_check_spec.rb b/spec/models/form/lettings/pages/no_females_pregnant_household_person_age_value_check_spec.rb
index 286ac6183..6cf6302f8 100644
--- a/spec/models/form/lettings/pages/no_females_pregnant_household_person_age_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/no_females_pregnant_household_person_age_value_check_spec.rb
@@ -37,27 +37,15 @@ RSpec.describe Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonAgeValueCh
it "has the correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.pregnancy.title",
- "arguments" => [
- {
- "key" => "sex1",
- "label" => true,
- "i18n_template" => "sex1",
- },
- ],
+ "translation" => "forms.2024.lettings.soft_validations.pregnancy_value_check.no_females_pregnant_household_value_check.title_text",
+ "arguments" => [],
})
end
it "has the correct informative_text" do
expect(page.informative_text).to eq({
- "translation" => "soft_validations.pregnancy.all_male_tenants",
- "arguments" => [
- {
- "key" => "sex1",
- "label" => true,
- "i18n_template" => "sex1",
- },
- ],
+ "translation" => "forms.2024.lettings.soft_validations.pregnancy_value_check.no_females_pregnant_household_value_check.informative_text",
+ "arguments" => [],
})
end
end
@@ -82,27 +70,15 @@ RSpec.describe Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonAgeValueCh
it "has the correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.pregnancy.title",
- "arguments" => [
- {
- "key" => "sex1",
- "label" => true,
- "i18n_template" => "sex1",
- },
- ],
+ "translation" => "forms.2024.lettings.soft_validations.pregnancy_value_check.no_females_pregnant_household_value_check.title_text",
+ "arguments" => [],
})
end
it "has the correct informative_text" do
expect(page.informative_text).to eq({
- "translation" => "soft_validations.pregnancy.all_male_tenants",
- "arguments" => [
- {
- "key" => "sex1",
- "label" => true,
- "i18n_template" => "sex1",
- },
- ],
+ "translation" => "forms.2024.lettings.soft_validations.pregnancy_value_check.no_females_pregnant_household_value_check.informative_text",
+ "arguments" => [],
})
end
end
diff --git a/spec/models/form/lettings/pages/no_females_pregnant_household_person_value_check_spec.rb b/spec/models/form/lettings/pages/no_females_pregnant_household_person_value_check_spec.rb
index 205f19ae1..f986f17d2 100644
--- a/spec/models/form/lettings/pages/no_females_pregnant_household_person_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/no_females_pregnant_household_person_value_check_spec.rb
@@ -37,27 +37,15 @@ RSpec.describe Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck
it "has the correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.pregnancy.title",
- "arguments" => [
- {
- "key" => "sex1",
- "label" => true,
- "i18n_template" => "sex1",
- },
- ],
+ "translation" => "forms.2024.lettings.soft_validations.pregnancy_value_check.no_females_pregnant_household_value_check.title_text",
+ "arguments" => [],
})
end
it "has the correct informative_text" do
expect(page.informative_text).to eq({
- "translation" => "soft_validations.pregnancy.all_male_tenants",
- "arguments" => [
- {
- "key" => "sex1",
- "label" => true,
- "i18n_template" => "sex1",
- },
- ],
+ "translation" => "forms.2024.lettings.soft_validations.pregnancy_value_check.no_females_pregnant_household_value_check.informative_text",
+ "arguments" => [],
})
end
end
@@ -82,27 +70,15 @@ RSpec.describe Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck
it "has the correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.pregnancy.title",
- "arguments" => [
- {
- "key" => "sex1",
- "label" => true,
- "i18n_template" => "sex1",
- },
- ],
+ "translation" => "forms.2024.lettings.soft_validations.pregnancy_value_check.no_females_pregnant_household_value_check.title_text",
+ "arguments" => [],
})
end
it "has the correct informative_text" do
expect(page.informative_text).to eq({
- "translation" => "soft_validations.pregnancy.all_male_tenants",
- "arguments" => [
- {
- "key" => "sex1",
- "label" => true,
- "i18n_template" => "sex1",
- },
- ],
+ "translation" => "forms.2024.lettings.soft_validations.pregnancy_value_check.no_females_pregnant_household_value_check.informative_text",
+ "arguments" => [],
})
end
end
diff --git a/spec/models/form/lettings/pages/partner_under16_value_check_spec.rb b/spec/models/form/lettings/pages/partner_under16_value_check_spec.rb
index a769f95cc..168f4ca91 100644
--- a/spec/models/form/lettings/pages/partner_under16_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/partner_under16_value_check_spec.rb
@@ -4,7 +4,8 @@ RSpec.describe Form::Lettings::Pages::PartnerUnder16ValueCheck, type: :model do
subject(:page) { described_class.new(page_id, page_definition, subsection, person_index:) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
+ let(:subsection) { instance_double(Form::Subsection, form:) }
let(:person_index) { 1 }
let(:page_id) { "partner_under_16_value_check" }
@@ -39,7 +40,7 @@ RSpec.describe Form::Lettings::Pages::PartnerUnder16ValueCheck, type: :model do
it "has correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.partner_under_16_lettings.title",
+ "translation" => "forms.2024.lettings.soft_validations.partner_under_16_value_check.title_text",
"arguments" => [
{
"key" => "age1",
@@ -51,7 +52,7 @@ RSpec.describe Form::Lettings::Pages::PartnerUnder16ValueCheck, type: :model do
end
it "has correct informative_text" do
- expect(page.informative_text).to eq({})
+ expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.lettings.soft_validations.partner_under_16_value_check.informative_text" })
end
it "has correct interruption_screen_question_ids" do
@@ -77,7 +78,7 @@ RSpec.describe Form::Lettings::Pages::PartnerUnder16ValueCheck, type: :model do
it "has correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.partner_under_16_lettings.title",
+ "translation" => "forms.2024.lettings.soft_validations.partner_under_16_value_check.title_text",
"arguments" => [
{
"key" => "age2",
@@ -89,7 +90,7 @@ RSpec.describe Form::Lettings::Pages::PartnerUnder16ValueCheck, type: :model do
end
it "has correct informative_text" do
- expect(page.informative_text).to eq({})
+ expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.lettings.soft_validations.partner_under_16_value_check.informative_text" })
end
it "has correct interruption_screen_question_ids" do
@@ -115,7 +116,7 @@ RSpec.describe Form::Lettings::Pages::PartnerUnder16ValueCheck, type: :model do
it "has correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.partner_under_16_lettings.title",
+ "translation" => "forms.2024.lettings.soft_validations.partner_under_16_value_check.title_text",
"arguments" => [
{
"key" => "age3",
@@ -127,7 +128,7 @@ RSpec.describe Form::Lettings::Pages::PartnerUnder16ValueCheck, type: :model do
end
it "has correct informative_text" do
- expect(page.informative_text).to eq({})
+ expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.lettings.soft_validations.partner_under_16_value_check.informative_text" })
end
it "has correct interruption_screen_question_ids" do
@@ -153,7 +154,7 @@ RSpec.describe Form::Lettings::Pages::PartnerUnder16ValueCheck, type: :model do
it "has correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.partner_under_16_lettings.title",
+ "translation" => "forms.2024.lettings.soft_validations.partner_under_16_value_check.title_text",
"arguments" => [
{
"key" => "age4",
@@ -165,7 +166,7 @@ RSpec.describe Form::Lettings::Pages::PartnerUnder16ValueCheck, type: :model do
end
it "has correct informative_text" do
- expect(page.informative_text).to eq({})
+ expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.lettings.soft_validations.partner_under_16_value_check.informative_text" })
end
it "has correct interruption_screen_question_ids" do
@@ -191,7 +192,7 @@ RSpec.describe Form::Lettings::Pages::PartnerUnder16ValueCheck, type: :model do
it "has correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.partner_under_16_lettings.title",
+ "translation" => "forms.2024.lettings.soft_validations.partner_under_16_value_check.title_text",
"arguments" => [
{
"key" => "age5",
@@ -203,7 +204,7 @@ RSpec.describe Form::Lettings::Pages::PartnerUnder16ValueCheck, type: :model do
end
it "has correct informative_text" do
- expect(page.informative_text).to eq({})
+ expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.lettings.soft_validations.partner_under_16_value_check.informative_text" })
end
it "has correct interruption_screen_question_ids" do
@@ -229,7 +230,7 @@ RSpec.describe Form::Lettings::Pages::PartnerUnder16ValueCheck, type: :model do
it "has correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.partner_under_16_lettings.title",
+ "translation" => "forms.2024.lettings.soft_validations.partner_under_16_value_check.title_text",
"arguments" => [
{
"key" => "age6",
@@ -241,7 +242,7 @@ RSpec.describe Form::Lettings::Pages::PartnerUnder16ValueCheck, type: :model do
end
it "has correct informative_text" do
- expect(page.informative_text).to eq({})
+ expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.lettings.soft_validations.partner_under_16_value_check.informative_text" })
end
it "has correct interruption_screen_question_ids" do
diff --git a/spec/models/form/lettings/pages/person_age_spec.rb b/spec/models/form/lettings/pages/person_age_spec.rb
index c9a57c138..2043052fd 100644
--- a/spec/models/form/lettings/pages/person_age_spec.rb
+++ b/spec/models/form/lettings/pages/person_age_spec.rb
@@ -1,12 +1,11 @@
require "rails_helper"
RSpec.describe Form::Lettings::Pages::PersonAge, type: :model do
- subject(:page) { described_class.new(nil, page_definition, subsection, person_index:, person_type:) }
+ subject(:page) { described_class.new(nil, page_definition, subsection, person_index:) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_2024_or_later?: false)) }
let(:person_index) { 2 }
- let(:person_type) { "non_child" }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
@@ -21,30 +20,14 @@ RSpec.describe Form::Lettings::Pages::PersonAge, type: :model do
expect(page.questions.map(&:id)).to eq(%w[age2_known age2])
end
- context "when child" do
- let(:person_type) { "child" }
-
- it "has the correct id" do
- expect(page.id).to eq("person_2_age_child")
- end
-
- it "has correct depends_on" do
- expect(page.depends_on).to eq(
- [{ "details_known_2" => 0, "person_2_child_relation?" => true }],
- )
- end
+ it "has the correct id" do
+ expect(page.id).to eq("person_2_age")
end
- context "when not child" do
- it "has the correct id" do
- expect(page.id).to eq("person_2_age_non_child")
- end
-
- it "has correct depends_on" do
- expect(page.depends_on).to eq(
- [{ "details_known_2" => 0, "person_2_child_relation?" => false }],
- )
- end
+ it "has correct depends_on" do
+ expect(page.depends_on).to eq(
+ [{ "details_known_2" => 0 }],
+ )
end
end
@@ -56,12 +39,12 @@ RSpec.describe Form::Lettings::Pages::PersonAge, type: :model do
end
it "has the correct id" do
- expect(page.id).to eq("person_3_age_non_child")
+ expect(page.id).to eq("person_3_age")
end
it "has correct depends_on" do
expect(page.depends_on).to eq(
- [{ "details_known_3" => 0, "person_3_child_relation?" => false }],
+ [{ "details_known_3" => 0 }],
)
end
end
diff --git a/spec/models/form/lettings/pages/person_over_retirement_value_check_spec.rb b/spec/models/form/lettings/pages/person_over_retirement_value_check_spec.rb
index ec00f0d75..c8a482ee4 100644
--- a/spec/models/form/lettings/pages/person_over_retirement_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/person_over_retirement_value_check_spec.rb
@@ -28,13 +28,14 @@ RSpec.describe Form::Lettings::Pages::PersonOverRetirementValueCheck, type: :mod
it "has the correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.retirement.max.title",
+ "translation" => "forms.2024.lettings.soft_validations.retirement_value_check.title_text",
})
end
it "has the correct informative_text" do
expect(page.informative_text).to eq({
- "translation" => "soft_validations.retirement.max.hint_text",
+ "translation" => "forms.2024.lettings.soft_validations.retirement_value_check.informative_text",
+ "arguments" => [],
})
end
end
@@ -50,13 +51,14 @@ RSpec.describe Form::Lettings::Pages::PersonOverRetirementValueCheck, type: :mod
it "has the correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.retirement.max.title",
+ "translation" => "forms.2024.lettings.soft_validations.retirement_value_check.title_text",
})
end
it "has the correct informative_text" do
expect(page.informative_text).to eq({
- "translation" => "soft_validations.retirement.max.hint_text",
+ "translation" => "forms.2024.lettings.soft_validations.retirement_value_check.informative_text",
+ "arguments" => [],
})
end
end
diff --git a/spec/models/form/lettings/pages/person_relationship_to_lead_spec.rb b/spec/models/form/lettings/pages/person_relationship_to_lead_spec.rb
index a0ebb9cbc..829d55ad0 100644
--- a/spec/models/form/lettings/pages/person_relationship_to_lead_spec.rb
+++ b/spec/models/form/lettings/pages/person_relationship_to_lead_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Pages::PersonRelationshipToLead, type: :model do
subject(:page) { described_class.new(nil, page_definition, subsection, person_index:) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_2024_or_later?: false)) }
let(:person_index) { 2 }
it "has correct subsection" do
diff --git a/spec/models/form/lettings/pages/person_under_retirement_value_check_spec.rb b/spec/models/form/lettings/pages/person_under_retirement_value_check_spec.rb
index 37ca94f9e..6226e0309 100644
--- a/spec/models/form/lettings/pages/person_under_retirement_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/person_under_retirement_value_check_spec.rb
@@ -28,7 +28,7 @@ RSpec.describe Form::Lettings::Pages::PersonUnderRetirementValueCheck, type: :mo
it "has the correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.retirement.min.title",
+ "translation" => "forms.2024.lettings.soft_validations.no_retirement_value_check.title_text",
"arguments" => [
{
"key" => "age2",
@@ -40,7 +40,7 @@ RSpec.describe Form::Lettings::Pages::PersonUnderRetirementValueCheck, type: :mo
end
it "has the correct informative_text" do
- expect(page.informative_text).to eq({})
+ expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.lettings.soft_validations.no_retirement_value_check.informative_text" })
end
end
@@ -55,7 +55,7 @@ RSpec.describe Form::Lettings::Pages::PersonUnderRetirementValueCheck, type: :mo
it "has the correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.retirement.min.title",
+ "translation" => "forms.2024.lettings.soft_validations.no_retirement_value_check.title_text",
"arguments" => [
{
"key" => "age3",
@@ -67,7 +67,7 @@ RSpec.describe Form::Lettings::Pages::PersonUnderRetirementValueCheck, type: :mo
end
it "has the correct informative_text" do
- expect(page.informative_text).to eq({})
+ expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.lettings.soft_validations.no_retirement_value_check.informative_text" })
end
end
end
diff --git a/spec/models/form/lettings/pages/previous_local_authority_spec.rb b/spec/models/form/lettings/pages/previous_local_authority_spec.rb
index 9e6d91be3..37ae11133 100644
--- a/spec/models/form/lettings/pages/previous_local_authority_spec.rb
+++ b/spec/models/form/lettings/pages/previous_local_authority_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Pages::PreviousLocalAuthority, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1))) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/previous_postcode_spec.rb b/spec/models/form/lettings/pages/previous_postcode_spec.rb
index eba9af065..354f78a98 100644
--- a/spec/models/form/lettings/pages/previous_postcode_spec.rb
+++ b/spec/models/form/lettings/pages/previous_postcode_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Pages::PreviousPostcode, type: :model do
let(:page_id) { "previous_postcode" }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1))) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/property_local_authority_spec.rb b/spec/models/form/lettings/pages/property_local_authority_spec.rb
index fe5363d97..75d680ddd 100644
--- a/spec/models/form/lettings/pages/property_local_authority_spec.rb
+++ b/spec/models/form/lettings/pages/property_local_authority_spec.rb
@@ -37,7 +37,7 @@ RSpec.describe Form::Lettings::Pages::PropertyLocalAuthority, type: :model do
context "with form before 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "is routed to when la is not inferred and it is general needs log" do
@@ -61,7 +61,7 @@ RSpec.describe Form::Lettings::Pages::PropertyLocalAuthority, type: :model do
context "with form after 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "is routed to when la is not inferred, it is general needs log and address search has been given" do
diff --git a/spec/models/form/lettings/pages/property_wheelchair_accessible_spec.rb b/spec/models/form/lettings/pages/property_wheelchair_accessible_spec.rb
index 90da08fb6..8090c6ed4 100644
--- a/spec/models/form/lettings/pages/property_wheelchair_accessible_spec.rb
+++ b/spec/models/form/lettings/pages/property_wheelchair_accessible_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Lettings::Pages::PropertyWheelchairAccessible, type: :model
let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
before do
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct subsection" do
diff --git a/spec/models/form/lettings/pages/renewal_spec.rb b/spec/models/form/lettings/pages/renewal_spec.rb
index edeeaff1b..77ba3aec8 100644
--- a/spec/models/form/lettings/pages/renewal_spec.rb
+++ b/spec/models/form/lettings/pages/renewal_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Lettings::Pages::Renewal, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/pages/rent_type_spec.rb b/spec/models/form/lettings/pages/rent_type_spec.rb
index 41dc0a1a9..3cec8e01e 100644
--- a/spec/models/form/lettings/pages/rent_type_spec.rb
+++ b/spec/models/form/lettings/pages/rent_type_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Pages::RentType, type: :model do
before do
allow(subsection).to receive(:form).and_return(form)
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct subsection" do
diff --git a/spec/models/form/lettings/pages/starter_tenancy_type_spec.rb b/spec/models/form/lettings/pages/starter_tenancy_type_spec.rb
index 6842f7d3e..005b546a8 100644
--- a/spec/models/form/lettings/pages/starter_tenancy_type_spec.rb
+++ b/spec/models/form/lettings/pages/starter_tenancy_type_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Pages::StarterTenancyType, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/pages/uprn_spec.rb b/spec/models/form/lettings/pages/uprn_spec.rb
index 2ab83c76a..81f1aec40 100644
--- a/spec/models/form/lettings/pages/uprn_spec.rb
+++ b/spec/models/form/lettings/pages/uprn_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Lettings::Pages::Uprn, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(subsection).to receive(:form).and_return(form)
end
@@ -57,7 +57,7 @@ RSpec.describe Form::Lettings::Pages::Uprn, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "points to address search page" do
diff --git a/spec/models/form/lettings/questions/age1_known_spec.rb b/spec/models/form/lettings/questions/age1_known_spec.rb
index 6ec594359..94c36d3d5 100644
--- a/spec/models/form/lettings/questions/age1_known_spec.rb
+++ b/spec/models/form/lettings/questions/age1_known_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Lettings::Questions::Age1Known, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/questions/age_spec.rb b/spec/models/form/lettings/questions/age_spec.rb
index 4ec1ee985..639f695fd 100644
--- a/spec/models/form/lettings/questions/age_spec.rb
+++ b/spec/models/form/lettings/questions/age_spec.rb
@@ -1,12 +1,11 @@
require "rails_helper"
RSpec.describe Form::Lettings::Questions::Age, type: :model do
- subject(:question) { described_class.new(nil, question_definition, page, person_index:, person_type:) }
+ subject(:question) { described_class.new(nil, question_definition, page, person_index:) }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 4), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 4), start_year_2024_or_later?: false))) }
let(:person_index) { 2 }
- let(:person_type) { "non_child" }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/declaration_spec.rb b/spec/models/form/lettings/questions/declaration_spec.rb
index bf8743520..25705414c 100644
--- a/spec/models/form/lettings/questions/declaration_spec.rb
+++ b/spec/models/form/lettings/questions/declaration_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::Declaration, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?)
+ allow(form).to receive(:start_year_2024_or_later?)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -33,7 +33,7 @@ RSpec.describe Form::Lettings::Questions::Declaration, type: :model do
context "when the form year is before 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has the correct answer_options" do
@@ -57,7 +57,7 @@ RSpec.describe Form::Lettings::Questions::Declaration, type: :model do
context "when the form year is >= 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
@@ -67,7 +67,7 @@ RSpec.describe Form::Lettings::Questions::Declaration, type: :model do
end
it "uses the expected top guidance partial" do
- expect(question.top_guidance_partial).to eq("privacy_notice_tenant_2024")
+ expect(question.top_guidance_partial).to eq("privacy_notice_tenant")
end
it "has check_answers_card_number nil" do
diff --git a/spec/models/form/lettings/questions/ethnic_white_spec.rb b/spec/models/form/lettings/questions/ethnic_white_spec.rb
index 7857893a1..ab20dd8ca 100644
--- a/spec/models/form/lettings/questions/ethnic_white_spec.rb
+++ b/spec/models/form/lettings/questions/ethnic_white_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::EthnicWhite, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -44,7 +44,7 @@ RSpec.describe Form::Lettings::Questions::EthnicWhite, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/first_time_property_let_as_social_housing_spec.rb b/spec/models/form/lettings/questions/first_time_property_let_as_social_housing_spec.rb
index 7f38f0108..756f5e84e 100644
--- a/spec/models/form/lettings/questions/first_time_property_let_as_social_housing_spec.rb
+++ b/spec/models/form/lettings/questions/first_time_property_let_as_social_housing_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::FirstTimePropertyLetAsSocialHousing, t
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -34,7 +34,7 @@ RSpec.describe Form::Lettings::Questions::FirstTimePropertyLetAsSocialHousing, t
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/gender_identity1_spec.rb b/spec/models/form/lettings/questions/gender_identity1_spec.rb
index 2a943cbe0..19503ea33 100644
--- a/spec/models/form/lettings/questions/gender_identity1_spec.rb
+++ b/spec/models/form/lettings/questions/gender_identity1_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Lettings::Questions::GenderIdentity1, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false) }
before do
allow(page).to receive(:subsection).and_return(subsection)
diff --git a/spec/models/form/lettings/questions/hb_spec.rb b/spec/models/form/lettings/questions/hb_spec.rb
index ed8f19cd5..9a1477954 100644
--- a/spec/models/form/lettings/questions/hb_spec.rb
+++ b/spec/models/form/lettings/questions/hb_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::Hb, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/questions/homeless_spec.rb b/spec/models/form/lettings/questions/homeless_spec.rb
index 40beb9698..f18a8ece7 100644
--- a/spec/models/form/lettings/questions/homeless_spec.rb
+++ b/spec/models/form/lettings/questions/homeless_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe Form::Lettings::Questions::Homeless, type: :model do
subject(:question) { described_class.new(nil, nil, page) }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 4)))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 4), type: "lettings"), id: "household_situation")) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/housingneeds_other_spec.rb b/spec/models/form/lettings/questions/housingneeds_other_spec.rb
index f7be373e1..ead58bb35 100644
--- a/spec/models/form/lettings/questions/housingneeds_other_spec.rb
+++ b/spec/models/form/lettings/questions/housingneeds_other_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::HousingneedsOther, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -42,7 +42,7 @@ RSpec.describe Form::Lettings::Questions::HousingneedsOther, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/is_carehome_spec.rb b/spec/models/form/lettings/questions/is_carehome_spec.rb
index 958873599..b82ddeaeb 100644
--- a/spec/models/form/lettings/questions/is_carehome_spec.rb
+++ b/spec/models/form/lettings/questions/is_carehome_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::IsCarehome, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -42,7 +42,7 @@ RSpec.describe Form::Lettings::Questions::IsCarehome, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options in the correct order" do
diff --git a/spec/models/form/lettings/questions/joint_spec.rb b/spec/models/form/lettings/questions/joint_spec.rb
index 1207d97d4..d856e9c18 100644
--- a/spec/models/form/lettings/questions/joint_spec.rb
+++ b/spec/models/form/lettings/questions/joint_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::Joint, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/questions/layear_spec.rb b/spec/models/form/lettings/questions/layear_spec.rb
index 04296beae..5ea537514 100644
--- a/spec/models/form/lettings/questions/layear_spec.rb
+++ b/spec/models/form/lettings/questions/layear_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::Layear, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -49,7 +49,7 @@ RSpec.describe Form::Lettings::Questions::Layear, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/letting_allocation_spec.rb b/spec/models/form/lettings/questions/letting_allocation_spec.rb
index 63c750e5d..980c8fea5 100644
--- a/spec/models/form/lettings/questions/letting_allocation_spec.rb
+++ b/spec/models/form/lettings/questions/letting_allocation_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::LettingAllocation, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -45,7 +45,7 @@ RSpec.describe Form::Lettings::Questions::LettingAllocation, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/max_rent_value_check_spec.rb b/spec/models/form/lettings/questions/max_rent_value_check_spec.rb
deleted file mode 100644
index 6fa0784e4..000000000
--- a/spec/models/form/lettings/questions/max_rent_value_check_spec.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-require "rails_helper"
-
-RSpec.describe Form::Lettings::Questions::MaxRentValueCheck, type: :model do
- subject(:question) { described_class.new(nil, question_definition, page, check_answers_card_number:) }
-
- let(:question_definition) { nil }
- let(:check_answers_card_number) { nil }
- let(:page) { instance_double(Form::Page) }
-
- it "has correct page" do
- expect(question.page).to eq(page)
- end
-
- it "has the correct id" do
- expect(question.id).to eq("rent_value_check")
- end
-
- it "has the correct type" do
- expect(question.type).to eq("interruption_screen")
- end
-
- it "has the correct answer_options" do
- expect(question.answer_options).to eq({
- "0" => { "value" => "Yes" },
- "1" => { "value" => "No" },
- })
- end
-
- it "has the correct hidden_in_check_answers" do
- expect(question.hidden_in_check_answers).to eq({ "depends_on" => [{ "rent_value_check" => 0 }, { "rent_value_check" => 1 }] })
- end
-end
diff --git a/spec/models/form/lettings/questions/min_rent_value_check_spec.rb b/spec/models/form/lettings/questions/min_rent_value_check_spec.rb
deleted file mode 100644
index c3d8a16bc..000000000
--- a/spec/models/form/lettings/questions/min_rent_value_check_spec.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-require "rails_helper"
-
-RSpec.describe Form::Lettings::Questions::MinRentValueCheck, type: :model do
- subject(:question) { described_class.new(nil, question_definition, page, check_answers_card_number:) }
-
- let(:question_definition) { nil }
- let(:check_answers_card_number) { nil }
- let(:page) { instance_double(Form::Page) }
-
- it "has correct page" do
- expect(question.page).to eq(page)
- end
-
- it "has the correct id" do
- expect(question.id).to eq("rent_value_check")
- end
-
- it "has the correct type" do
- expect(question.type).to eq("interruption_screen")
- end
-
- it "has the correct answer_options" do
- expect(question.answer_options).to eq({
- "0" => { "value" => "Yes" },
- "1" => { "value" => "No" },
- })
- end
-
- it "has the correct hidden_in_check_answers" do
- expect(question.hidden_in_check_answers).to eq({ "depends_on" => [{ "rent_value_check" => 0 }, { "rent_value_check" => 1 }] })
- end
-end
diff --git a/spec/models/form/lettings/questions/person_relationship_spec.rb b/spec/models/form/lettings/questions/person_relationship_spec.rb
index 20d05e316..0023c60ef 100644
--- a/spec/models/form/lettings/questions/person_relationship_spec.rb
+++ b/spec/models/form/lettings/questions/person_relationship_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Questions::PersonRelationship, type: :model do
subject(:question) { described_class.new(nil, question_definition, page, person_index:) }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 4), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 4), start_year_2024_or_later?: false))) }
let(:person_index) { 2 }
it "has correct page" do
diff --git a/spec/models/form/lettings/questions/ppcodenk_spec.rb b/spec/models/form/lettings/questions/ppcodenk_spec.rb
index 8a29b032d..7186875d3 100644
--- a/spec/models/form/lettings/questions/ppcodenk_spec.rb
+++ b/spec/models/form/lettings/questions/ppcodenk_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Lettings::Questions::Ppcodenk, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/questions/previous_la_known_spec.rb b/spec/models/form/lettings/questions/previous_la_known_spec.rb
index defb56bdf..f05d376ab 100644
--- a/spec/models/form/lettings/questions/previous_la_known_spec.rb
+++ b/spec/models/form/lettings/questions/previous_la_known_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Lettings::Questions::PreviousLaKnown, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/questions/previous_let_type_spec.rb b/spec/models/form/lettings/questions/previous_let_type_spec.rb
index 0739fe386..95c1451cd 100644
--- a/spec/models/form/lettings/questions/previous_let_type_spec.rb
+++ b/spec/models/form/lettings/questions/previous_let_type_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Lettings::Questions::PreviousLetType, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -44,7 +44,7 @@ RSpec.describe Form::Lettings::Questions::PreviousLetType, type: :model do
context "with collection year on or after 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer options" do
diff --git a/spec/models/form/lettings/questions/reason_renewal_spec.rb b/spec/models/form/lettings/questions/reason_renewal_spec.rb
index 02abe1527..e58a33a21 100644
--- a/spec/models/form/lettings/questions/reason_renewal_spec.rb
+++ b/spec/models/form/lettings/questions/reason_renewal_spec.rb
@@ -5,12 +5,12 @@ RSpec.describe Form::Lettings::Questions::ReasonRenewal, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, id: "reason_renewal") }
let(:subsection) { instance_double(Form::Subsection) }
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -54,7 +54,7 @@ RSpec.describe Form::Lettings::Questions::ReasonRenewal, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/reason_spec.rb b/spec/models/form/lettings/questions/reason_spec.rb
index 81fd7a5c1..4b71ee176 100644
--- a/spec/models/form/lettings/questions/reason_spec.rb
+++ b/spec/models/form/lettings/questions/reason_spec.rb
@@ -5,12 +5,12 @@ RSpec.describe Form::Lettings::Questions::Reason, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, id: "reason") }
let(:subsection) { instance_double(Form::Subsection) }
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -84,7 +84,7 @@ RSpec.describe Form::Lettings::Questions::Reason, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/reasonpref_spec.rb b/spec/models/form/lettings/questions/reasonpref_spec.rb
index 5957d4979..43326b7c0 100644
--- a/spec/models/form/lettings/questions/reasonpref_spec.rb
+++ b/spec/models/form/lettings/questions/reasonpref_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Lettings::Questions::Reasonpref, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/questions/referral_prp_spec.rb b/spec/models/form/lettings/questions/referral_prp_spec.rb
index e11bf250c..a10b6d383 100644
--- a/spec/models/form/lettings/questions/referral_prp_spec.rb
+++ b/spec/models/form/lettings/questions/referral_prp_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::ReferralPrp, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -64,7 +64,7 @@ RSpec.describe Form::Lettings::Questions::ReferralPrp, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/referral_spec.rb b/spec/models/form/lettings/questions/referral_spec.rb
index b3f526697..75e6c2f42 100644
--- a/spec/models/form/lettings/questions/referral_spec.rb
+++ b/spec/models/form/lettings/questions/referral_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::Referral, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -62,7 +62,7 @@ RSpec.describe Form::Lettings::Questions::Referral, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/referral_supported_housing_prp_spec.rb b/spec/models/form/lettings/questions/referral_supported_housing_prp_spec.rb
index ab13acd26..3059c122d 100644
--- a/spec/models/form/lettings/questions/referral_supported_housing_prp_spec.rb
+++ b/spec/models/form/lettings/questions/referral_supported_housing_prp_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::ReferralSupportedHousingPrp, type: :mo
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -64,7 +64,7 @@ RSpec.describe Form::Lettings::Questions::ReferralSupportedHousingPrp, type: :mo
let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/referral_supported_housing_spec.rb b/spec/models/form/lettings/questions/referral_supported_housing_spec.rb
index 5e05bf65b..5a4af55e5 100644
--- a/spec/models/form/lettings/questions/referral_supported_housing_spec.rb
+++ b/spec/models/form/lettings/questions/referral_supported_housing_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::ReferralSupportedHousing, type: :model
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -62,7 +62,7 @@ RSpec.describe Form::Lettings::Questions::ReferralSupportedHousing, type: :model
let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/renewal_spec.rb b/spec/models/form/lettings/questions/renewal_spec.rb
index 27fe1bf86..af2c22c15 100644
--- a/spec/models/form/lettings/questions/renewal_spec.rb
+++ b/spec/models/form/lettings/questions/renewal_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::Renewal, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/questions/rent_type_spec.rb b/spec/models/form/lettings/questions/rent_type_spec.rb
index 15183ce6b..7d45320ad 100644
--- a/spec/models/form/lettings/questions/rent_type_spec.rb
+++ b/spec/models/form/lettings/questions/rent_type_spec.rb
@@ -12,7 +12,7 @@ RSpec.describe Form::Lettings::Questions::RentType, type: :model do
before do
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct page" do
@@ -37,7 +37,7 @@ RSpec.describe Form::Lettings::Questions::RentType, type: :model do
context "when 2023" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has the correct answer_options" do
@@ -58,7 +58,7 @@ RSpec.describe Form::Lettings::Questions::RentType, type: :model do
context "when 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
@@ -73,7 +73,7 @@ RSpec.describe Form::Lettings::Questions::RentType, type: :model do
end
it "has the correct guidance partial" do
- expect(question.top_guidance_partial).to eq("rent_type_definitions_2024")
+ expect(question.top_guidance_partial).to eq("rent_type_definitions")
end
end
end
diff --git a/spec/models/form/lettings/questions/rsnvac_spec.rb b/spec/models/form/lettings/questions/rsnvac_spec.rb
index 45469cebb..5eb37ddb5 100644
--- a/spec/models/form/lettings/questions/rsnvac_spec.rb
+++ b/spec/models/form/lettings/questions/rsnvac_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::Rsnvac, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -78,7 +78,7 @@ RSpec.describe Form::Lettings::Questions::Rsnvac, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/scheme_id_spec.rb b/spec/models/form/lettings/questions/scheme_id_spec.rb
index c490cded4..ba5734b3b 100644
--- a/spec/models/form/lettings/questions/scheme_id_spec.rb
+++ b/spec/models/form/lettings/questions/scheme_id_spec.rb
@@ -12,7 +12,7 @@ RSpec.describe Form::Lettings::Questions::SchemeId, type: :model do
before do
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct page" do
diff --git a/spec/models/form/lettings/questions/sheltered_spec.rb b/spec/models/form/lettings/questions/sheltered_spec.rb
index 33b1007d2..1f21a92eb 100644
--- a/spec/models/form/lettings/questions/sheltered_spec.rb
+++ b/spec/models/form/lettings/questions/sheltered_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Lettings::Questions::Sheltered, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -40,7 +40,7 @@ RSpec.describe Form::Lettings::Questions::Sheltered, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/starter_tenancy_type_spec.rb b/spec/models/form/lettings/questions/starter_tenancy_type_spec.rb
index 66ea2b355..1100796c8 100644
--- a/spec/models/form/lettings/questions/starter_tenancy_type_spec.rb
+++ b/spec/models/form/lettings/questions/starter_tenancy_type_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::StarterTenancyType, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, id: "starter_tenancy_type") }
let(:subsection) { instance_double(Form::Subsection) }
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
@@ -16,7 +16,7 @@ RSpec.describe Form::Lettings::Questions::StarterTenancyType, type: :model do
context "with 2023/24 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has the correct answer options" do
@@ -50,7 +50,7 @@ RSpec.describe Form::Lettings::Questions::StarterTenancyType, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer options" do
diff --git a/spec/models/form/lettings/questions/tenancy_length_affordable_rent_spec.rb b/spec/models/form/lettings/questions/tenancy_length_affordable_rent_spec.rb
index fb334f909..ba9a72001 100644
--- a/spec/models/form/lettings/questions/tenancy_length_affordable_rent_spec.rb
+++ b/spec/models/form/lettings/questions/tenancy_length_affordable_rent_spec.rb
@@ -5,12 +5,12 @@ RSpec.describe Form::Lettings::Questions::TenancyLengthAffordableRent, type: :mo
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, id: "affordable_tenancy_length") }
let(:subsection) { instance_double(Form::Subsection) }
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/questions/tenancy_length_intermediate_rent_spec.rb b/spec/models/form/lettings/questions/tenancy_length_intermediate_rent_spec.rb
index 0c0923bf8..55b51ccfa 100644
--- a/spec/models/form/lettings/questions/tenancy_length_intermediate_rent_spec.rb
+++ b/spec/models/form/lettings/questions/tenancy_length_intermediate_rent_spec.rb
@@ -5,12 +5,12 @@ RSpec.describe Form::Lettings::Questions::TenancyLengthIntermediateRent, type: :
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, id: "intermediate_tenancy_length") }
let(:subsection) { instance_double(Form::Subsection) }
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/questions/tenancy_length_periodic_spec.rb b/spec/models/form/lettings/questions/tenancy_length_periodic_spec.rb
index 3a0fae171..449677736 100644
--- a/spec/models/form/lettings/questions/tenancy_length_periodic_spec.rb
+++ b/spec/models/form/lettings/questions/tenancy_length_periodic_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::TenancyLengthPeriodic, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1))), id: "periodic_tenancy_length") }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/tenancy_length_spec.rb b/spec/models/form/lettings/questions/tenancy_length_spec.rb
index 2d87d0923..cc7bf9f9f 100644
--- a/spec/models/form/lettings/questions/tenancy_length_spec.rb
+++ b/spec/models/form/lettings/questions/tenancy_length_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe Form::Lettings::Questions::TenancyLength, type: :model do
subject(:question) { described_class.new(nil, nil, page) }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1))), id: "tenancy_length") }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/tenancy_other_spec.rb b/spec/models/form/lettings/questions/tenancy_other_spec.rb
index ce8aec5db..a6a2962dc 100644
--- a/spec/models/form/lettings/questions/tenancy_other_spec.rb
+++ b/spec/models/form/lettings/questions/tenancy_other_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe Form::Lettings::Questions::TenancyOther, type: :model do
subject(:question) { described_class.new(nil, nil, page) }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1))), id: "tenancy_type") }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/tenancy_type_spec.rb b/spec/models/form/lettings/questions/tenancy_type_spec.rb
index 13998094a..82a5ae3e7 100644
--- a/spec/models/form/lettings/questions/tenancy_type_spec.rb
+++ b/spec/models/form/lettings/questions/tenancy_type_spec.rb
@@ -3,12 +3,12 @@ require "rails_helper"
RSpec.describe Form::Lettings::Questions::TenancyType, type: :model do
subject(:question) { described_class.new(nil, nil, page) }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, id: "tenancy_type") }
let(:subsection) { instance_double(Form::Subsection) }
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -31,7 +31,7 @@ RSpec.describe Form::Lettings::Questions::TenancyType, type: :model do
context "with 2023/24 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has the correct answer options" do
@@ -65,7 +65,7 @@ RSpec.describe Form::Lettings::Questions::TenancyType, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer options" do
diff --git a/spec/models/form/lettings/questions/waityear_spec.rb b/spec/models/form/lettings/questions/waityear_spec.rb
index 5f1f344b9..5d9a5b3a9 100644
--- a/spec/models/form/lettings/questions/waityear_spec.rb
+++ b/spec/models/form/lettings/questions/waityear_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Lettings::Questions::Waityear, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -59,7 +59,7 @@ RSpec.describe Form::Lettings::Questions::Waityear, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/wheelchair_spec.rb b/spec/models/form/lettings/questions/wheelchair_spec.rb
index 984a2209f..0a9226ada 100644
--- a/spec/models/form/lettings/questions/wheelchair_spec.rb
+++ b/spec/models/form/lettings/questions/wheelchair_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Lettings::Questions::Wheelchair, type: :model do
before do
allow(page).to receive(:subsection).and_return(subsection)
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct page" do
diff --git a/spec/models/form/lettings/subsections/household_characteristics_spec.rb b/spec/models/form/lettings/subsections/household_characteristics_spec.rb
index c71ee165c..b45f86fce 100644
--- a/spec/models/form/lettings/subsections/household_characteristics_spec.rb
+++ b/spec/models/form/lettings/subsections/household_characteristics_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod
let(:subsection_id) { nil }
let(:subsection_definition) { nil }
let(:section) { instance_double(Form::Lettings::Sections::Household) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
allow(section).to receive(:form).and_return(form)
@@ -18,7 +18,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod
context "with start year before 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct pages" do
@@ -49,8 +49,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod
working_situation_lead_tenant_over_retirement_value_check
person_2_known
person_2_relationship_to_lead
- person_2_age_child
- person_2_age_non_child
+ person_2_age
no_females_pregnant_household_person_2_age_value_check
females_in_soft_age_range_in_pregnant_household_person_2_age_value_check
age_2_under_retirement_value_check
@@ -64,8 +63,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod
working_situation_2_over_retirement_value_check
person_3_known
person_3_relationship_to_lead
- person_3_age_child
- person_3_age_non_child
+ person_3_age
no_females_pregnant_household_person_3_age_value_check
females_in_soft_age_range_in_pregnant_household_person_3_age_value_check
age_3_under_retirement_value_check
@@ -79,8 +77,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod
working_situation_3_over_retirement_value_check
person_4_known
person_4_relationship_to_lead
- person_4_age_child
- person_4_age_non_child
+ person_4_age
no_females_pregnant_household_person_4_age_value_check
females_in_soft_age_range_in_pregnant_household_person_4_age_value_check
age_4_under_retirement_value_check
@@ -94,8 +91,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod
working_situation_4_over_retirement_value_check
person_5_known
person_5_relationship_to_lead
- person_5_age_child
- person_5_age_non_child
+ person_5_age
no_females_pregnant_household_person_5_age_value_check
females_in_soft_age_range_in_pregnant_household_person_5_age_value_check
age_5_under_retirement_value_check
@@ -109,8 +105,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod
working_situation_5_over_retirement_value_check
person_6_known
person_6_relationship_to_lead
- person_6_age_child
- person_6_age_non_child
+ person_6_age
no_females_pregnant_household_person_6_age_value_check
females_in_soft_age_range_in_pregnant_household_person_6_age_value_check
age_6_under_retirement_value_check
@@ -124,8 +119,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod
working_situation_6_over_retirement_value_check
person_7_known
person_7_relationship_to_lead
- person_7_age_child
- person_7_age_non_child
+ person_7_age
no_females_pregnant_household_person_7_age_value_check
females_in_soft_age_range_in_pregnant_household_person_7_age_value_check
age_7_under_retirement_value_check
@@ -139,8 +133,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod
working_situation_7_over_retirement_value_check
person_8_known
person_8_relationship_to_lead
- person_8_age_child
- person_8_age_non_child
+ person_8_age
no_females_pregnant_household_person_8_age_value_check
females_in_soft_age_range_in_pregnant_household_person_8_age_value_check
age_8_under_retirement_value_check
@@ -159,7 +152,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod
context "with start year >= 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct pages" do
@@ -191,8 +184,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod
person_2_relationship_to_lead
relationship_2_partner_under_16_value_check
relationship_2_multiple_partners_value_check
- person_2_age_child
- person_2_age_non_child
+ person_2_age
no_females_pregnant_household_person_2_age_value_check
females_in_soft_age_range_in_pregnant_household_person_2_age_value_check
age_2_under_retirement_value_check
@@ -209,8 +201,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod
person_3_relationship_to_lead
relationship_3_partner_under_16_value_check
relationship_3_multiple_partners_value_check
- person_3_age_child
- person_3_age_non_child
+ person_3_age
no_females_pregnant_household_person_3_age_value_check
females_in_soft_age_range_in_pregnant_household_person_3_age_value_check
age_3_under_retirement_value_check
@@ -227,8 +218,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod
person_4_relationship_to_lead
relationship_4_partner_under_16_value_check
relationship_4_multiple_partners_value_check
- person_4_age_child
- person_4_age_non_child
+ person_4_age
no_females_pregnant_household_person_4_age_value_check
females_in_soft_age_range_in_pregnant_household_person_4_age_value_check
age_4_under_retirement_value_check
@@ -245,8 +235,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod
person_5_relationship_to_lead
relationship_5_partner_under_16_value_check
relationship_5_multiple_partners_value_check
- person_5_age_child
- person_5_age_non_child
+ person_5_age
no_females_pregnant_household_person_5_age_value_check
females_in_soft_age_range_in_pregnant_household_person_5_age_value_check
age_5_under_retirement_value_check
@@ -263,8 +252,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod
person_6_relationship_to_lead
relationship_6_partner_under_16_value_check
relationship_6_multiple_partners_value_check
- person_6_age_child
- person_6_age_non_child
+ person_6_age
no_females_pregnant_household_person_6_age_value_check
females_in_soft_age_range_in_pregnant_household_person_6_age_value_check
age_6_under_retirement_value_check
@@ -281,8 +269,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod
person_7_relationship_to_lead
relationship_7_partner_under_16_value_check
relationship_7_multiple_partners_value_check
- person_7_age_child
- person_7_age_non_child
+ person_7_age
no_females_pregnant_household_person_7_age_value_check
females_in_soft_age_range_in_pregnant_household_person_7_age_value_check
age_7_under_retirement_value_check
@@ -299,8 +286,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod
person_8_relationship_to_lead
relationship_8_partner_under_16_value_check
relationship_8_multiple_partners_value_check
- person_8_age_child
- person_8_age_non_child
+ person_8_age
no_females_pregnant_household_person_8_age_value_check
females_in_soft_age_range_in_pregnant_household_person_8_age_value_check
age_8_under_retirement_value_check
diff --git a/spec/models/form/lettings/subsections/household_needs_spec.rb b/spec/models/form/lettings/subsections/household_needs_spec.rb
index 6e4dd25f1..dcd957601 100644
--- a/spec/models/form/lettings/subsections/household_needs_spec.rb
+++ b/spec/models/form/lettings/subsections/household_needs_spec.rb
@@ -5,7 +5,8 @@ RSpec.describe Form::Lettings::Subsections::HouseholdNeeds, type: :model do
let(:subsection_id) { nil }
let(:subsection_definition) { nil }
- let(:section) { instance_double(Form::Lettings::Sections::Household) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
+ let(:section) { instance_double(Form::Lettings::Sections::Household, form:) }
it "has correct section" do
expect(household_needs.section).to eq(section)
diff --git a/spec/models/form/lettings/subsections/household_situation_spec.rb b/spec/models/form/lettings/subsections/household_situation_spec.rb
index dd6f20d89..d672b3ccc 100644
--- a/spec/models/form/lettings/subsections/household_situation_spec.rb
+++ b/spec/models/form/lettings/subsections/household_situation_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdSituation, type: :model do
let(:subsection_id) { nil }
let(:subsection_definition) { nil }
let(:section) { instance_double(Form::Lettings::Sections::Household) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
allow(section).to receive(:form).and_return(form)
@@ -18,7 +18,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdSituation, type: :model do
context "with form year before 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct pages" do
@@ -48,7 +48,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdSituation, type: :model do
context "with form year >= 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct pages" do
diff --git a/spec/models/form/lettings/subsections/income_and_benefits_spec.rb b/spec/models/form/lettings/subsections/income_and_benefits_spec.rb
index c260ff56d..7bdc26bfa 100644
--- a/spec/models/form/lettings/subsections/income_and_benefits_spec.rb
+++ b/spec/models/form/lettings/subsections/income_and_benefits_spec.rb
@@ -5,7 +5,8 @@ RSpec.describe Form::Lettings::Subsections::IncomeAndBenefits, type: :model do
let(:subsection_id) { nil }
let(:subsection_definition) { nil }
- let(:section) { instance_double(Form::Lettings::Sections::RentAndCharges) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
+ let(:section) { instance_double(Form::Lettings::Sections::RentAndCharges, form:) }
it "has correct section" do
expect(income_and_benefits.section).to eq(section)
@@ -30,8 +31,7 @@ RSpec.describe Form::Lettings::Subsections::IncomeAndBenefits, type: :model do
rent_bi_weekly
rent_4_weekly
rent_monthly
- brent_min_rent_value_check
- brent_max_rent_value_check
+ brent_rent_value_check
scharge_value_check
pscharge_value_check
supcharg_value_check
diff --git a/spec/models/form/lettings/subsections/property_information_spec.rb b/spec/models/form/lettings/subsections/property_information_spec.rb
index 7d406d1a7..cc12f621a 100644
--- a/spec/models/form/lettings/subsections/property_information_spec.rb
+++ b/spec/models/form/lettings/subsections/property_information_spec.rb
@@ -14,37 +14,7 @@ RSpec.describe Form::Lettings::Subsections::PropertyInformation, type: :model do
let(:form) { instance_double(Form, start_date:) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
- end
-
- context "when 2022" do
- let(:start_date) { Time.utc(2022, 2, 8) }
-
- it "has correct pages" do
- expect(property_information.pages.compact.map(&:id)).to eq(
- %w[
- property_postcode
- property_local_authority
- local_authority_min_rent_value_check
- local_authority_max_rent_value_check
- first_time_property_let_as_social_housing
- property_let_type
- property_vacancy_reason_not_first_let
- property_vacancy_reason_first_let
- property_number_of_times_relet
- property_unit_type
- property_building_type
- property_wheelchair_accessible
- property_number_of_bedrooms
- beds_min_rent_value_check
- beds_max_rent_value_check
- void_date
- void_date_value_check
- property_major_repairs
- property_major_repairs_value_check
- ],
- )
- end
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
context "when 2023" do
@@ -57,8 +27,7 @@ RSpec.describe Form::Lettings::Subsections::PropertyInformation, type: :model do
uprn_confirmation
address
property_local_authority
- local_authority_min_rent_value_check
- local_authority_max_rent_value_check
+ local_authority_rent_value_check
first_time_property_let_as_social_housing
property_let_type
property_vacancy_reason_not_first_let
@@ -68,8 +37,7 @@ RSpec.describe Form::Lettings::Subsections::PropertyInformation, type: :model do
property_building_type
property_wheelchair_accessible
property_number_of_bedrooms
- beds_min_rent_value_check
- beds_max_rent_value_check
+ beds_rent_value_check
void_date
void_date_value_check
property_major_repairs
@@ -83,7 +51,7 @@ RSpec.describe Form::Lettings::Subsections::PropertyInformation, type: :model do
let(:start_date) { Time.utc(2024, 2, 8) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct pages" do
@@ -96,8 +64,7 @@ RSpec.describe Form::Lettings::Subsections::PropertyInformation, type: :model do
uprn_selection
address
property_local_authority
- local_authority_min_rent_value_check
- local_authority_max_rent_value_check
+ local_authority_rent_value_check
first_time_property_let_as_social_housing
property_let_type
property_vacancy_reason_not_first_let
@@ -106,8 +73,7 @@ RSpec.describe Form::Lettings::Subsections::PropertyInformation, type: :model do
property_building_type
property_wheelchair_accessible
property_number_of_bedrooms
- beds_min_rent_value_check
- beds_max_rent_value_check
+ beds_rent_value_check
void_date
void_date_value_check
property_major_repairs
diff --git a/spec/models/form/lettings/subsections/setup_spec.rb b/spec/models/form/lettings/subsections/setup_spec.rb
index 074f7ae5e..997f4d08e 100644
--- a/spec/models/form/lettings/subsections/setup_spec.rb
+++ b/spec/models/form/lettings/subsections/setup_spec.rb
@@ -18,7 +18,7 @@ RSpec.describe Form::Lettings::Subsections::Setup, type: :model do
context "with start year before 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct pages" do
@@ -43,7 +43,7 @@ RSpec.describe Form::Lettings::Subsections::Setup, type: :model do
context "with start year >= 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct pages" do
diff --git a/spec/models/form/lettings/subsections/tenancy_information_spec.rb b/spec/models/form/lettings/subsections/tenancy_information_spec.rb
index 96770ea78..fce8e57fb 100644
--- a/spec/models/form/lettings/subsections/tenancy_information_spec.rb
+++ b/spec/models/form/lettings/subsections/tenancy_information_spec.rb
@@ -12,11 +12,11 @@ RSpec.describe Form::Lettings::Subsections::TenancyInformation, type: :model do
end
describe "pages" do
- let(:section) { instance_double(Form::Sales::Sections::Household, form:) }
+ let(:section) { instance_double(Form::Lettings::Sections::TenancyAndProperty, form:) }
let(:form) { instance_double(Form, start_date:) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
context "when 2023" do
@@ -33,7 +33,7 @@ RSpec.describe Form::Lettings::Subsections::TenancyInformation, type: :model do
let(:start_date) { Time.utc(2024, 2, 8) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct pages" do
diff --git a/spec/models/form/sales/pages/about_price_value_check_spec.rb b/spec/models/form/sales/pages/about_price_value_check_spec.rb
index 7d3c31537..1193768db 100644
--- a/spec/models/form/sales/pages/about_price_value_check_spec.rb
+++ b/spec/models/form/sales/pages/about_price_value_check_spec.rb
@@ -5,7 +5,8 @@ RSpec.describe Form::Sales::Pages::AboutPriceValueCheck, type: :model do
let(:page_id) { "savings_value_check" }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
+ let(:subsection) { instance_double(Form::Subsection, form:) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
@@ -28,12 +29,12 @@ RSpec.describe Form::Sales::Pages::AboutPriceValueCheck, type: :model do
end
it "has the correct title_text" do
- expect(page.title_text).to eq({ "arguments" => [{ "i18n_template" => "value", "key" => "value", "label" => true }], "translation" => "soft_validations.purchase_price.title_text" })
+ expect(page.title_text).to eq({ "arguments" => [{ "i18n_template" => "value", "key" => "value", "label" => true }], "translation" => "forms.2024.sales.soft_validations.value_value_check.title_text" })
end
it "has the correct informative_text" do
expect(page.informative_text).to eq({
- "translation" => "soft_validations.purchase_price.hint_text",
+ "translation" => "forms.2024.sales.soft_validations.value_value_check.informative_text",
"arguments" => [
{
"key" => "field_formatted_as_currency",
diff --git a/spec/models/form/sales/pages/buyer1_ethnic_background_arab_spec.rb b/spec/models/form/sales/pages/buyer1_ethnic_background_arab_spec.rb
index 68328a5db..a5cf4dd07 100644
--- a/spec/models/form/sales/pages/buyer1_ethnic_background_arab_spec.rb
+++ b/spec/models/form/sales/pages/buyer1_ethnic_background_arab_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Pages::Buyer1EthnicBackgroundArab, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false)) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/sales/pages/buyer1_ethnic_background_asian_spec.rb b/spec/models/form/sales/pages/buyer1_ethnic_background_asian_spec.rb
index b4c8a198d..c0eb8a108 100644
--- a/spec/models/form/sales/pages/buyer1_ethnic_background_asian_spec.rb
+++ b/spec/models/form/sales/pages/buyer1_ethnic_background_asian_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Pages::Buyer1EthnicBackgroundAsian, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false)) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/sales/pages/buyer1_ethnic_background_black_spec.rb b/spec/models/form/sales/pages/buyer1_ethnic_background_black_spec.rb
index 7650f49fa..0a04ff806 100644
--- a/spec/models/form/sales/pages/buyer1_ethnic_background_black_spec.rb
+++ b/spec/models/form/sales/pages/buyer1_ethnic_background_black_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Pages::Buyer1EthnicBackgroundBlack, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false)) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/sales/pages/buyer1_ethnic_background_mixed_spec.rb b/spec/models/form/sales/pages/buyer1_ethnic_background_mixed_spec.rb
index 42420774f..e7cae6445 100644
--- a/spec/models/form/sales/pages/buyer1_ethnic_background_mixed_spec.rb
+++ b/spec/models/form/sales/pages/buyer1_ethnic_background_mixed_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Pages::Buyer1EthnicBackgroundMixed, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false)) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/sales/pages/buyer1_ethnic_background_white_spec.rb b/spec/models/form/sales/pages/buyer1_ethnic_background_white_spec.rb
index 79dddc53a..ff45cd2c3 100644
--- a/spec/models/form/sales/pages/buyer1_ethnic_background_white_spec.rb
+++ b/spec/models/form/sales/pages/buyer1_ethnic_background_white_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Sales::Pages::Buyer1EthnicBackgroundWhite, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/sales/pages/buyer1_ethnic_group_spec.rb b/spec/models/form/sales/pages/buyer1_ethnic_group_spec.rb
index dcc90fe51..9a94fc0fd 100644
--- a/spec/models/form/sales/pages/buyer1_ethnic_group_spec.rb
+++ b/spec/models/form/sales/pages/buyer1_ethnic_group_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Pages::Buyer1EthnicGroup, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false)) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/sales/pages/buyer1_live_in_property_spec.rb b/spec/models/form/sales/pages/buyer1_live_in_property_spec.rb
index 2f3c92aa7..edc53bd79 100644
--- a/spec/models/form/sales/pages/buyer1_live_in_property_spec.rb
+++ b/spec/models/form/sales/pages/buyer1_live_in_property_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Pages::Buyer1LiveInProperty, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false)) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/sales/pages/buyer1_nationality_spec.rb b/spec/models/form/sales/pages/buyer1_nationality_spec.rb
index a9cb1e381..a84a44009 100644
--- a/spec/models/form/sales/pages/buyer1_nationality_spec.rb
+++ b/spec/models/form/sales/pages/buyer1_nationality_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Pages::Buyer1Nationality, type: :model do
before do
allow(subsection).to receive(:form).and_return(form)
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct subsection" do
@@ -33,7 +33,7 @@ RSpec.describe Form::Sales::Pages::Buyer1Nationality, type: :model do
context "with year 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct questions" do
diff --git a/spec/models/form/sales/pages/buyer1_working_situation_spec.rb b/spec/models/form/sales/pages/buyer1_working_situation_spec.rb
index 2ae7f0f1e..fb8529967 100644
--- a/spec/models/form/sales/pages/buyer1_working_situation_spec.rb
+++ b/spec/models/form/sales/pages/buyer1_working_situation_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Pages::Buyer1WorkingSituation, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false)) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/sales/pages/buyer2_nationality_spec.rb b/spec/models/form/sales/pages/buyer2_nationality_spec.rb
index 97b5f7caf..e01215d21 100644
--- a/spec/models/form/sales/pages/buyer2_nationality_spec.rb
+++ b/spec/models/form/sales/pages/buyer2_nationality_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Pages::Buyer2Nationality, type: :model do
before do
allow(subsection).to receive(:form).and_return(form)
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct subsection" do
@@ -42,7 +42,7 @@ RSpec.describe Form::Sales::Pages::Buyer2Nationality, type: :model do
context "with year 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct questions" do
diff --git a/spec/models/form/sales/pages/buyer2_relationship_to_buyer1_spec.rb b/spec/models/form/sales/pages/buyer2_relationship_to_buyer1_spec.rb
index 96a67f5bf..6fbd835c5 100644
--- a/spec/models/form/sales/pages/buyer2_relationship_to_buyer1_spec.rb
+++ b/spec/models/form/sales/pages/buyer2_relationship_to_buyer1_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Pages::Buyer2RelationshipToBuyer1, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false)) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/sales/pages/buyer_interview_spec.rb b/spec/models/form/sales/pages/buyer_interview_spec.rb
index 24704526d..f7c6bbb70 100644
--- a/spec/models/form/sales/pages/buyer_interview_spec.rb
+++ b/spec/models/form/sales/pages/buyer_interview_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Pages::BuyerInterview, type: :model do
let(:page_id) { "buyer_interview" }
let(:page_definition) { nil }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false) }
let(:subsection) { instance_double(Form::Subsection, form:, id: "setup") }
it "has correct subsection" do
@@ -45,7 +45,7 @@ RSpec.describe Form::Sales::Pages::BuyerInterview, type: :model do
end
context "when form is after 2024" do
- let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_after_2024?: true) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_2024_or_later?: true) }
context "when there are joint buyers" do
subject(:page) { described_class.new(page_id, page_definition, subsection, joint_purchase: true) }
diff --git a/spec/models/form/sales/pages/buyer_live_spec.rb b/spec/models/form/sales/pages/buyer_live_spec.rb
index dd237214c..ac5ac2c27 100644
--- a/spec/models/form/sales/pages/buyer_live_spec.rb
+++ b/spec/models/form/sales/pages/buyer_live_spec.rb
@@ -11,7 +11,7 @@ RSpec.describe Form::Sales::Pages::BuyerLive, type: :model do
let(:form) { instance_double(Form, start_date: current_collection_start_date) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/sales/pages/buyer_previous_spec.rb b/spec/models/form/sales/pages/buyer_previous_spec.rb
index d55243dec..8e1486ee6 100644
--- a/spec/models/form/sales/pages/buyer_previous_spec.rb
+++ b/spec/models/form/sales/pages/buyer_previous_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Sales::Pages::BuyerPrevious, type: :model do
let(:page_definition) { nil }
let(:subsection) { instance_double(Form::Subsection, depends_on: nil, enabled?: true, form:) }
let(:start_date_after_2024) { false }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: start_date_after_2024, depends_on_met: true) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: start_date_after_2024, depends_on_met: true) }
let(:joint_purchase) { false }
it "has correct subsection" do
diff --git a/spec/models/form/sales/pages/deposit_discount_spec.rb b/spec/models/form/sales/pages/deposit_discount_spec.rb
index d183e379b..f94c46707 100644
--- a/spec/models/form/sales/pages/deposit_discount_spec.rb
+++ b/spec/models/form/sales/pages/deposit_discount_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Pages::DepositDiscount, type: :model do
let(:subsection) { instance_double(Form::Subsection) }
before do
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct subsection" do
@@ -45,7 +45,7 @@ RSpec.describe Form::Sales::Pages::DepositDiscount, type: :model do
context "when it's a 2024 form" do
before do
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: true, start_date: Time.zone.local(2024, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: true, start_date: Time.zone.local(2024, 4, 1)))
end
it "has correct depends_on" do
diff --git a/spec/models/form/sales/pages/deposit_spec.rb b/spec/models/form/sales/pages/deposit_spec.rb
index b33604176..ea309bffc 100644
--- a/spec/models/form/sales/pages/deposit_spec.rb
+++ b/spec/models/form/sales/pages/deposit_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Sales::Pages::Deposit, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
let(:subsection) { instance_double(Form::Subsection, enabled?: true, depends_on: true) }
- let(:form) { instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1), depends_on_met: true) }
+ let(:form) { instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1), depends_on_met: true) }
let(:optional) { false }
before do
@@ -31,7 +31,7 @@ RSpec.describe Form::Sales::Pages::Deposit, type: :model do
context "when routing with start year after 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
context "and optional is false" do
@@ -131,7 +131,7 @@ RSpec.describe Form::Sales::Pages::Deposit, type: :model do
context "when routing with start year before 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
context "and optional is false" do
diff --git a/spec/models/form/sales/pages/discount_spec.rb b/spec/models/form/sales/pages/discount_spec.rb
index 4585b7f19..c9fb16095 100644
--- a/spec/models/form/sales/pages/discount_spec.rb
+++ b/spec/models/form/sales/pages/discount_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Pages::Discount, type: :model do
let(:subsection) { instance_double(Form::Subsection) }
before do
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct subsection" do
diff --git a/spec/models/form/sales/pages/discounted_sale_value_check_spec.rb b/spec/models/form/sales/pages/discounted_sale_value_check_spec.rb
index 38a5f69ae..3b51ec744 100644
--- a/spec/models/form/sales/pages/discounted_sale_value_check_spec.rb
+++ b/spec/models/form/sales/pages/discounted_sale_value_check_spec.rb
@@ -6,7 +6,8 @@ RSpec.describe Form::Sales::Pages::DiscountedSaleValueCheck, type: :model do
let(:page_id) { "discounted_sale_value_check" }
let(:page_definition) { nil }
let(:index) { 1 }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
+ let(:subsection) { instance_double(Form::Subsection, form:) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
@@ -22,14 +23,14 @@ RSpec.describe Form::Sales::Pages::DiscountedSaleValueCheck, type: :model do
it "has the correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.discounted_sale_value.title_text",
+ "translation" => "forms.2024.sales.soft_validations.discounted_sale_value_check.title_text",
"arguments" => [{ "arguments_for_key" => "value_with_discount", "i18n_template" => "value_with_discount", "key" => "field_formatted_as_currency" }],
})
end
it "has the correct informative_text" do
expect(page.informative_text).to eq({
- "translation" => "soft_validations.discounted_sale_value.informative_text",
+ "translation" => "forms.2024.sales.soft_validations.discounted_sale_value_check.informative_text",
"arguments" => [{ "arguments_for_key" => "mortgage_deposit_and_grant_total", "i18n_template" => "mortgage_deposit_and_grant_total", "key" => "field_formatted_as_currency" }],
})
end
diff --git a/spec/models/form/sales/pages/handover_date_check_spec.rb b/spec/models/form/sales/pages/handover_date_check_spec.rb
index f245675d5..ae465da16 100644
--- a/spec/models/form/sales/pages/handover_date_check_spec.rb
+++ b/spec/models/form/sales/pages/handover_date_check_spec.rb
@@ -5,7 +5,8 @@ RSpec.describe Form::Sales::Pages::HandoverDateCheck, type: :model do
let(:page_id) { "" }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
+ let(:subsection) { instance_double(Form::Subsection, form:) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
@@ -21,7 +22,7 @@ RSpec.describe Form::Sales::Pages::HandoverDateCheck, type: :model do
it "has the correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.hodate.must_be_less_than_3_years_from_saledate",
+ "translation" => "forms.2024.sales.soft_validations.hodate_check.title_text",
"arguments" => [],
})
end
diff --git a/spec/models/form/sales/pages/la_nominations_spec.rb b/spec/models/form/sales/pages/la_nominations_spec.rb
index b69f88f1f..036e26092 100644
--- a/spec/models/form/sales/pages/la_nominations_spec.rb
+++ b/spec/models/form/sales/pages/la_nominations_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Pages::LaNominations, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
let(:start_year_after_2024) { false }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: start_year_after_2024) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: start_year_after_2024) }
let(:subsection) { instance_double(Form::Subsection, form:) }
before do
diff --git a/spec/models/form/sales/pages/last_accommodation_la_spec.rb b/spec/models/form/sales/pages/last_accommodation_la_spec.rb
index b73cf07f0..9cdd64957 100644
--- a/spec/models/form/sales/pages/last_accommodation_la_spec.rb
+++ b/spec/models/form/sales/pages/last_accommodation_la_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Sales::Pages::LastAccommodationLa, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
let(:start_year_after_2024) { false }
- let(:form) { instance_double(Form, depends_on_met: true, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: start_year_after_2024) }
+ let(:form) { instance_double(Form, depends_on_met: true, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: start_year_after_2024) }
let(:subsection) { instance_double(Form::Subsection, form:, depends_on: nil, enabled?: true) }
let(:log) { build(:sales_log, :completed) }
diff --git a/spec/models/form/sales/pages/last_accommodation_spec.rb b/spec/models/form/sales/pages/last_accommodation_spec.rb
index 8c3dbdbbf..fbc581b4b 100644
--- a/spec/models/form/sales/pages/last_accommodation_spec.rb
+++ b/spec/models/form/sales/pages/last_accommodation_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Pages::LastAccommodation, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
let(:start_year_after_2024) { false }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: start_year_after_2024) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: start_year_after_2024) }
let(:subsection) { instance_double(Form::Subsection, form:, depends_on: nil) }
it "has correct subsection" do
diff --git a/spec/models/form/sales/pages/managing_organisation_spec.rb b/spec/models/form/sales/pages/managing_organisation_spec.rb
index ea90add64..30383a1f5 100644
--- a/spec/models/form/sales/pages/managing_organisation_spec.rb
+++ b/spec/models/form/sales/pages/managing_organisation_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Sales::Pages::ManagingOrganisation, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
let(:subsection) { instance_double(Form::Subsection, form:) }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
@@ -103,7 +103,7 @@ RSpec.describe Form::Sales::Pages::ManagingOrganisation, type: :model do
describe "#routed_to? with 2024 logs" do
let(:log) { create(:sales_log) }
let(:organisation) { create(:organisation) }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_after_2024?: true) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_2024_or_later?: true) }
context "when user nil" do
it "is not shown" do
diff --git a/spec/models/form/sales/pages/monthly_charges_value_check_spec.rb b/spec/models/form/sales/pages/monthly_charges_value_check_spec.rb
index cb187ecfd..ce72bbda8 100644
--- a/spec/models/form/sales/pages/monthly_charges_value_check_spec.rb
+++ b/spec/models/form/sales/pages/monthly_charges_value_check_spec.rb
@@ -5,7 +5,8 @@ RSpec.describe Form::Sales::Pages::MonthlyChargesValueCheck, type: :model do
let(:page_id) { "monthly_charges_value_check" }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
+ let(:subsection) { instance_double(Form::Subsection, form:) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
@@ -33,13 +34,13 @@ RSpec.describe Form::Sales::Pages::MonthlyChargesValueCheck, type: :model do
it "has correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.monthly_charges_over_soft_max.title_text",
+ "translation" => "forms.2024.sales.soft_validations.monthly_charges_value_check.title_text",
"arguments" => [{ "arguments_for_key" => "mscharge", "i18n_template" => "mscharge", "key" => "field_formatted_as_currency" }],
})
end
it "has correct informative_text" do
- expect(page.informative_text).to eq({ "arguments" => [], "translation" => "soft_validations.monthly_charges_over_soft_max.hint_text" })
+ expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.monthly_charges_value_check.informative_text" })
end
it "has correct interruption_screen_question_ids" do
diff --git a/spec/models/form/sales/pages/no_address_found_spec.rb b/spec/models/form/sales/pages/no_address_found_spec.rb
index 1a40abba4..b6dbd677e 100644
--- a/spec/models/form/sales/pages/no_address_found_spec.rb
+++ b/spec/models/form/sales/pages/no_address_found_spec.rb
@@ -5,8 +5,9 @@ RSpec.describe Form::Sales::Pages::NoAddressFound, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
let(:log) { create(:sales_log) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
+ let(:subsection) { instance_double(Form::Subsection, form:) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
@@ -31,11 +32,11 @@ RSpec.describe Form::Sales::Pages::NoAddressFound, type: :model do
end
it "has the correct title_text" do
- expect(page.title_text).to eq({ "arguments" => [], "translation" => "soft_validations.no_address_found.title_text" })
+ expect(page.title_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.address_search_value_check.title_text" })
end
it "has the correct informative_text" do
- expect(page.informative_text).to eq({ "arguments" => [], "translation" => "soft_validations.no_address_found.informative_text" })
+ expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.address_search_value_check.informative_text" })
end
it "has the correct interruption_screen_question_ids" do
diff --git a/spec/models/form/sales/pages/percentage_discount_value_check_spec.rb b/spec/models/form/sales/pages/percentage_discount_value_check_spec.rb
index 5fc3e05ad..0b8cf0152 100644
--- a/spec/models/form/sales/pages/percentage_discount_value_check_spec.rb
+++ b/spec/models/form/sales/pages/percentage_discount_value_check_spec.rb
@@ -5,7 +5,8 @@ RSpec.describe Form::Sales::Pages::PercentageDiscountValueCheck, type: :model do
let(:page_id) { "percentage_discount_value_check" }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
+ let(:subsection) { instance_double(Form::Subsection, form:) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
@@ -21,14 +22,14 @@ RSpec.describe Form::Sales::Pages::PercentageDiscountValueCheck, type: :model do
it "has the correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.percentage_discount_value.title_text",
+ "translation" => "forms.2024.sales.soft_validations.percentage_discount_value_check.title_text",
"arguments" => [{ "key" => "discount", "label" => true, "i18n_template" => "discount" }],
})
end
it "has the correct informative_text" do
expect(page.informative_text).to eq({
- "translation" => "soft_validations.percentage_discount_value.hint_text",
+ "translation" => "forms.2024.sales.soft_validations.percentage_discount_value_check.informative_text",
"arguments" => [],
})
end
diff --git a/spec/models/form/sales/pages/person_relationship_to_buyer1_spec.rb b/spec/models/form/sales/pages/person_relationship_to_buyer1_spec.rb
index 126f2f0b5..aeb196337 100644
--- a/spec/models/form/sales/pages/person_relationship_to_buyer1_spec.rb
+++ b/spec/models/form/sales/pages/person_relationship_to_buyer1_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Sales::Pages::PersonRelationshipToBuyer1, type: :model do
subject(:page) { described_class.new(page_id, page_definition, subsection, person_index:) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false)) }
let(:person_index) { 1 }
let(:page_id) { "person_1_relationship_to_buyer_1" }
diff --git a/spec/models/form/sales/pages/postcode_spec.rb b/spec/models/form/sales/pages/postcode_spec.rb
deleted file mode 100644
index 8f9c7273c..000000000
--- a/spec/models/form/sales/pages/postcode_spec.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-require "rails_helper"
-
-RSpec.describe Form::Sales::Pages::Postcode, type: :model do
- subject(:page) { described_class.new(page_id, page_definition, subsection) }
-
- let(:page_id) { nil }
- let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
-
- it "has correct subsection" do
- expect(page.subsection).to eq(subsection)
- end
-
- it "has correct questions" do
- expect(page.questions.map(&:id)).to eq(%w[pcodenk postcode_full])
- end
-
- it "has the correct id" do
- expect(page.id).to eq("property_postcode")
- end
-
- it "has the correct description" do
- expect(page.description).to be_nil
- end
-
- it "has correct depends_on" do
- expect(page.depends_on).to be_nil
- end
-end
diff --git a/spec/models/form/sales/pages/privacy_notice_spec.rb b/spec/models/form/sales/pages/privacy_notice_spec.rb
index 7510e60d9..80be7ae66 100644
--- a/spec/models/form/sales/pages/privacy_notice_spec.rb
+++ b/spec/models/form/sales/pages/privacy_notice_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Sales::Pages::PrivacyNotice, type: :model do
let(:page_id) { "privacy_notice" }
let(:page_definition) { nil }
let(:subsection) { instance_double(Form::Subsection, id: "setup") }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false) }
before do
allow(subsection).to receive(:form).and_return(form)
@@ -40,7 +40,7 @@ RSpec.describe Form::Sales::Pages::PrivacyNotice, type: :model do
end
context "when the form start year is after 2024" do
- let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_after_2024?: true) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_2024_or_later?: true) }
it "has the expected copy_key" do
expect(page.copy_key).to eq("sales.setup.privacynotice.joint_purchase")
@@ -64,7 +64,7 @@ RSpec.describe Form::Sales::Pages::PrivacyNotice, type: :model do
end
context "when the form start year is after 2024" do
- let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_after_2024?: true) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_2024_or_later?: true) }
it "has the expected copy_key" do
expect(page.copy_key).to eq("sales.setup.privacynotice.not_joint_purchase")
diff --git a/spec/models/form/sales/pages/property_local_authority_spec.rb b/spec/models/form/sales/pages/property_local_authority_spec.rb
index 016d0534d..88d049bce 100644
--- a/spec/models/form/sales/pages/property_local_authority_spec.rb
+++ b/spec/models/form/sales/pages/property_local_authority_spec.rb
@@ -18,19 +18,6 @@ RSpec.describe Form::Sales::Pages::PropertyLocalAuthority, type: :model do
end
describe "has correct questions" do
- context "when 2022" do
- let(:start_date) { Time.utc(2022, 2, 8) }
-
- it "has correct questions" do
- expect(page.questions.map(&:id)).to eq(
- %w[
- la_known
- la
- ],
- )
- end
- end
-
context "when 2023" do
let(:start_date) { Time.utc(2023, 2, 8) }
@@ -57,7 +44,7 @@ RSpec.describe Form::Sales::Pages::PropertyLocalAuthority, type: :model do
context "with form before 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "is routed to when la is not inferred" do
@@ -73,7 +60,7 @@ RSpec.describe Form::Sales::Pages::PropertyLocalAuthority, type: :model do
context "with form after 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "is routed to when la is not inferred and address search has been given" do
diff --git a/spec/models/form/sales/pages/property_wheelchair_accessible_spec.rb b/spec/models/form/sales/pages/property_wheelchair_accessible_spec.rb
index 9d60c5f3c..01dcb7ce7 100644
--- a/spec/models/form/sales/pages/property_wheelchair_accessible_spec.rb
+++ b/spec/models/form/sales/pages/property_wheelchair_accessible_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Pages::PropertyWheelchairAccessible, type: :model do
let(:subsection) { instance_double(Form::Subsection) }
before do
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct subsection" do
diff --git a/spec/models/form/sales/pages/purchase_price_spec.rb b/spec/models/form/sales/pages/purchase_price_spec.rb
index e5bfb176a..ad857ee9f 100644
--- a/spec/models/form/sales/pages/purchase_price_spec.rb
+++ b/spec/models/form/sales/pages/purchase_price_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Pages::PurchasePrice, type: :model do
let(:subsection) { instance_double(Form::Subsection) }
before do
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct subsection" do
diff --git a/spec/models/form/sales/pages/shared_ownership_deposit_value_check_spec.rb b/spec/models/form/sales/pages/shared_ownership_deposit_value_check_spec.rb
index 3a1c22f24..bca971fe5 100644
--- a/spec/models/form/sales/pages/shared_ownership_deposit_value_check_spec.rb
+++ b/spec/models/form/sales/pages/shared_ownership_deposit_value_check_spec.rb
@@ -5,7 +5,8 @@ RSpec.describe Form::Sales::Pages::SharedOwnershipDepositValueCheck, type: :mode
let(:page_id) { "shared_ownership_deposit_value_check" }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
+ let(:subsection) { instance_double(Form::Subsection, form:) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
@@ -29,7 +30,7 @@ RSpec.describe Form::Sales::Pages::SharedOwnershipDepositValueCheck, type: :mode
it "has the correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.shared_ownership_deposit.title_text",
+ "translation" => "forms.2024.sales.soft_validations.shared_ownership_deposit_value_check.title_text",
"arguments" => [
{ "i18n_template" => "mortgage_deposit_and_discount_error_fields", "key" => "mortgage_deposit_and_discount_error_fields" },
{ "arguments_for_key" => "mortgage_deposit_and_discount_total", "i18n_template" => "mortgage_deposit_and_discount_total", "key" => "field_formatted_as_currency" },
@@ -37,10 +38,6 @@ RSpec.describe Form::Sales::Pages::SharedOwnershipDepositValueCheck, type: :mode
})
end
- it "has the correct informative_text" do
- expect(page.informative_text).to eq({})
- end
-
it "has the correct interruption_screen_question_ids" do
expect(page.interruption_screen_question_ids).to eq(%w[mortgage mortgageused cashdis type deposit value equity])
end
diff --git a/spec/models/form/sales/pages/shared_ownership_type_spec.rb b/spec/models/form/sales/pages/shared_ownership_type_spec.rb
index d12c49b57..e6ae7d55d 100644
--- a/spec/models/form/sales/pages/shared_ownership_type_spec.rb
+++ b/spec/models/form/sales/pages/shared_ownership_type_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Sales::Pages::SharedOwnershipType, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: current_collection_start_date, start_year_after_2024?: true)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: current_collection_start_date, start_year_2024_or_later?: true)) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/sales/pages/staircase_owned_value_check_spec.rb b/spec/models/form/sales/pages/staircase_owned_value_check_spec.rb
index 95e59ea4e..5fa65fd8d 100644
--- a/spec/models/form/sales/pages/staircase_owned_value_check_spec.rb
+++ b/spec/models/form/sales/pages/staircase_owned_value_check_spec.rb
@@ -5,7 +5,8 @@ RSpec.describe Form::Sales::Pages::StaircaseOwnedValueCheck, type: :model do
let(:page_id) { "an_id" }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
+ let(:subsection) { instance_double(Form::Subsection, form:) }
let(:joint_purchase) { false }
it "has correct subsection" do
@@ -33,7 +34,7 @@ RSpec.describe Form::Sales::Pages::StaircaseOwnedValueCheck, type: :model do
it "has the correct informative_text" do
expect(page.informative_text).to eq({
- "translation" => "soft_validations.staircase_owned.hint_text",
+ "translation" => "forms.2024.sales.soft_validations.stairowned_value_check.not_joint_purchase.informative_text",
"arguments" => [],
})
end
@@ -45,7 +46,7 @@ RSpec.describe Form::Sales::Pages::StaircaseOwnedValueCheck, type: :model do
context "when not a joint purchase" do
it "has the correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.staircase_owned.title_text.one",
+ "translation" => "forms.2024.sales.soft_validations.stairowned_value_check.not_joint_purchase.title_text",
"arguments" => [
{
"key" => "stairowned",
@@ -62,7 +63,7 @@ RSpec.describe Form::Sales::Pages::StaircaseOwnedValueCheck, type: :model do
it "has the correct title_text" do
expect(page.title_text).to eq({
- "translation" => "soft_validations.staircase_owned.title_text.two",
+ "translation" => "forms.2024.sales.soft_validations.stairowned_value_check.joint_purchase.title_text",
"arguments" => [
{
"key" => "stairowned",
diff --git a/spec/models/form/sales/pages/uprn_spec.rb b/spec/models/form/sales/pages/uprn_spec.rb
index 17ef3179b..03e1197bc 100644
--- a/spec/models/form/sales/pages/uprn_spec.rb
+++ b/spec/models/form/sales/pages/uprn_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Sales::Pages::Uprn, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(subsection).to receive(:form).and_return(form)
end
@@ -57,7 +57,7 @@ RSpec.describe Form::Sales::Pages::Uprn, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "points to address search page" do
diff --git a/spec/models/form/sales/questions/buyer1_ethnic_background_arab_spec.rb b/spec/models/form/sales/questions/buyer1_ethnic_background_arab_spec.rb
index 593a525d2..c5f243745 100644
--- a/spec/models/form/sales/questions/buyer1_ethnic_background_arab_spec.rb
+++ b/spec/models/form/sales/questions/buyer1_ethnic_background_arab_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::Buyer1EthnicBackgroundArab, type: :model
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/sales/questions/buyer1_ethnic_background_asian_spec.rb b/spec/models/form/sales/questions/buyer1_ethnic_background_asian_spec.rb
index f49d64437..6cf9306b2 100644
--- a/spec/models/form/sales/questions/buyer1_ethnic_background_asian_spec.rb
+++ b/spec/models/form/sales/questions/buyer1_ethnic_background_asian_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::Buyer1EthnicBackgroundAsian, type: :model
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/sales/questions/buyer1_ethnic_background_black_spec.rb b/spec/models/form/sales/questions/buyer1_ethnic_background_black_spec.rb
index 6afe4eaf5..cb040ffbd 100644
--- a/spec/models/form/sales/questions/buyer1_ethnic_background_black_spec.rb
+++ b/spec/models/form/sales/questions/buyer1_ethnic_background_black_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::Buyer1EthnicBackgroundBlack, type: :model
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/sales/questions/buyer1_ethnic_background_mixed_spec.rb b/spec/models/form/sales/questions/buyer1_ethnic_background_mixed_spec.rb
index d6e51de58..aced8cb58 100644
--- a/spec/models/form/sales/questions/buyer1_ethnic_background_mixed_spec.rb
+++ b/spec/models/form/sales/questions/buyer1_ethnic_background_mixed_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::Buyer1EthnicBackgroundMixed, type: :model
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/sales/questions/buyer1_ethnic_background_white_spec.rb b/spec/models/form/sales/questions/buyer1_ethnic_background_white_spec.rb
index d08ece820..6aa547e8b 100644
--- a/spec/models/form/sales/questions/buyer1_ethnic_background_white_spec.rb
+++ b/spec/models/form/sales/questions/buyer1_ethnic_background_white_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Sales::Questions::Buyer1EthnicBackgroundWhite, type: :model
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -44,7 +44,7 @@ RSpec.describe Form::Sales::Questions::Buyer1EthnicBackgroundWhite, type: :model
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/sales/questions/buyer1_ethnic_group_spec.rb b/spec/models/form/sales/questions/buyer1_ethnic_group_spec.rb
index 0bdc6d9c0..8a859100d 100644
--- a/spec/models/form/sales/questions/buyer1_ethnic_group_spec.rb
+++ b/spec/models/form/sales/questions/buyer1_ethnic_group_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::Buyer1EthnicGroup, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/sales/questions/buyer1_live_in_property_spec.rb b/spec/models/form/sales/questions/buyer1_live_in_property_spec.rb
index eccb172f7..038e0ce5d 100644
--- a/spec/models/form/sales/questions/buyer1_live_in_property_spec.rb
+++ b/spec/models/form/sales/questions/buyer1_live_in_property_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::Buyer1LiveInProperty, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/sales/questions/buyer1_working_situation_spec.rb b/spec/models/form/sales/questions/buyer1_working_situation_spec.rb
index c99e64527..e25eb2aaf 100644
--- a/spec/models/form/sales/questions/buyer1_working_situation_spec.rb
+++ b/spec/models/form/sales/questions/buyer1_working_situation_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::Buyer1WorkingSituation, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/sales/questions/buyer2_ethnic_background_white_spec.rb b/spec/models/form/sales/questions/buyer2_ethnic_background_white_spec.rb
index 8d81e8897..6cab95147 100644
--- a/spec/models/form/sales/questions/buyer2_ethnic_background_white_spec.rb
+++ b/spec/models/form/sales/questions/buyer2_ethnic_background_white_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Sales::Questions::Buyer2EthnicBackgroundWhite, type: :model
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -44,7 +44,7 @@ RSpec.describe Form::Sales::Questions::Buyer2EthnicBackgroundWhite, type: :model
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/sales/questions/buyer2_relationship_to_buyer1_spec.rb b/spec/models/form/sales/questions/buyer2_relationship_to_buyer1_spec.rb
index 1d478faa9..99185a592 100644
--- a/spec/models/form/sales/questions/buyer2_relationship_to_buyer1_spec.rb
+++ b/spec/models/form/sales/questions/buyer2_relationship_to_buyer1_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::Buyer2RelationshipToBuyer1, type: :model
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/sales/questions/buyer_interview_spec.rb b/spec/models/form/sales/questions/buyer_interview_spec.rb
index e2b39c50f..0db43407f 100644
--- a/spec/models/form/sales/questions/buyer_interview_spec.rb
+++ b/spec/models/form/sales/questions/buyer_interview_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::BuyerInterview, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: true) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: true) }
let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form:, id: "setup")) }
it "has correct page" do
@@ -36,7 +36,7 @@ RSpec.describe Form::Sales::Questions::BuyerInterview, type: :model do
context "when the form start year is before 2024" do
let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form:, id: "household_characteristics")) }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 3, 1), start_year_after_2024?: false) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 3, 1), start_year_2024_or_later?: false) }
it "has the expected copy_key" do
expect(question.copy_key).to eq("sales.household_characteristics.noint.joint_purchase")
@@ -44,7 +44,7 @@ RSpec.describe Form::Sales::Questions::BuyerInterview, type: :model do
end
context "when the form start year is after 2024" do
- let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_after_2024?: true) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_2024_or_later?: true) }
it "has the expected copy_key" do
expect(question.copy_key).to eq("sales.setup.noint.joint_purchase")
@@ -57,7 +57,7 @@ RSpec.describe Form::Sales::Questions::BuyerInterview, type: :model do
context "when the form start year is before 2024" do
let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form:, id: "household_characteristics")) }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false) }
it "has the expected copy_key" do
expect(question.copy_key).to eq("sales.household_characteristics.noint.not_joint_purchase")
@@ -65,7 +65,7 @@ RSpec.describe Form::Sales::Questions::BuyerInterview, type: :model do
end
context "when the form start year is after 2024" do
- let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_after_2024?: true) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_2024_or_later?: true) }
it "has the expected copy_key" do
expect(question.copy_key).to eq("sales.setup.noint.not_joint_purchase")
diff --git a/spec/models/form/sales/questions/buyer_live_spec.rb b/spec/models/form/sales/questions/buyer_live_spec.rb
index 12dfc8be6..4356db5dd 100644
--- a/spec/models/form/sales/questions/buyer_live_spec.rb
+++ b/spec/models/form/sales/questions/buyer_live_spec.rb
@@ -12,7 +12,7 @@ RSpec.describe Form::Sales::Questions::BuyerLive, type: :model do
let(:form) { instance_double(Form, start_date: current_collection_start_date) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/sales/questions/buyer_previous_spec.rb b/spec/models/form/sales/questions/buyer_previous_spec.rb
index 8c37c2ff2..88204ad1a 100644
--- a/spec/models/form/sales/questions/buyer_previous_spec.rb
+++ b/spec/models/form/sales/questions/buyer_previous_spec.rb
@@ -48,7 +48,7 @@ RSpec.describe Form::Sales::Questions::BuyerPrevious, type: :model do
context "when form year is before 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "is not marked as derived" do
@@ -58,7 +58,7 @@ RSpec.describe Form::Sales::Questions::BuyerPrevious, type: :model do
context "when form year is >= 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "is marked as derived" do
diff --git a/spec/models/form/sales/questions/deposit_value_check_spec.rb b/spec/models/form/sales/questions/deposit_value_check_spec.rb
index 2e861110a..077c2e6a6 100644
--- a/spec/models/form/sales/questions/deposit_value_check_spec.rb
+++ b/spec/models/form/sales/questions/deposit_value_check_spec.rb
@@ -1,7 +1,7 @@
require "rails_helper"
RSpec.describe Form::Sales::Questions::DepositValueCheck, type: :model do
- subject(:question) { described_class.new(question_id, question_definition, page) }
+ subject(:question) { described_class.new(question_id, question_definition, page, joint_purchase: true) }
let(:question_id) { nil }
let(:question_definition) { nil }
diff --git a/spec/models/form/sales/questions/discount_spec.rb b/spec/models/form/sales/questions/discount_spec.rb
index 5037e2b4e..09c2fa076 100644
--- a/spec/models/form/sales/questions/discount_spec.rb
+++ b/spec/models/form/sales/questions/discount_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Sales::Questions::Discount, type: :model do
before do
allow(page).to receive(:subsection).and_return(subsection)
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct page" do
@@ -47,7 +47,7 @@ RSpec.describe Form::Sales::Questions::Discount, type: :model do
context "with form start year after 2024" do
before do
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: true, start_date: Time.zone.local(2024, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: true, start_date: Time.zone.local(2024, 4, 1)))
end
it "has correct max" do
diff --git a/spec/models/form/sales/questions/living_before_purchase_years_spec.rb b/spec/models/form/sales/questions/living_before_purchase_years_spec.rb
index c9893dece..ddf5abd8f 100644
--- a/spec/models/form/sales/questions/living_before_purchase_years_spec.rb
+++ b/spec/models/form/sales/questions/living_before_purchase_years_spec.rb
@@ -1,7 +1,7 @@
require "rails_helper"
RSpec.describe Form::Sales::Questions::LivingBeforePurchaseYears, type: :model do
- subject(:question) { described_class.new(question_id, question_definition, page, ownershipsch: 1) }
+ subject(:question) { described_class.new(question_id, question_definition, page, ownershipsch: 1, joint_purchase: true) }
let(:question_id) { nil }
let(:question_definition) { nil }
diff --git a/spec/models/form/sales/questions/mortgage_lender_spec.rb b/spec/models/form/sales/questions/mortgage_lender_spec.rb
index a7abd4c16..b4ce1bf86 100644
--- a/spec/models/form/sales/questions/mortgage_lender_spec.rb
+++ b/spec/models/form/sales/questions/mortgage_lender_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Sales::Questions::MortgageLender, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?)
+ allow(form).to receive(:start_year_2024_or_later?)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -46,7 +46,7 @@ RSpec.describe Form::Sales::Questions::MortgageLender, type: :model do
context "when form year is before 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has the correct answer_options" do
@@ -145,7 +145,7 @@ RSpec.describe Form::Sales::Questions::MortgageLender, type: :model do
context "when form year is >= 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/sales/questions/mortgageused_spec.rb b/spec/models/form/sales/questions/mortgageused_spec.rb
index 7c37cbd78..e85238a4d 100644
--- a/spec/models/form/sales/questions/mortgageused_spec.rb
+++ b/spec/models/form/sales/questions/mortgageused_spec.rb
@@ -35,7 +35,7 @@ RSpec.describe Form::Sales::Questions::Mortgageused, type: :model do
context "and the saledate is before 24/25" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return false
+ allow(form).to receive(:start_year_2024_or_later?).and_return false
end
it "does not show the don't know option" do
@@ -45,7 +45,7 @@ RSpec.describe Form::Sales::Questions::Mortgageused, type: :model do
context "and the saledate is 24/25 or after" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return true
+ allow(form).to receive(:start_year_2024_or_later?).and_return true
end
it "shows the don't know option" do
diff --git a/spec/models/form/sales/questions/nationality_all_group_spec.rb b/spec/models/form/sales/questions/nationality_all_group_spec.rb
index a88bf1867..4c2b2a39e 100644
--- a/spec/models/form/sales/questions/nationality_all_group_spec.rb
+++ b/spec/models/form/sales/questions/nationality_all_group_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::NationalityAllGroup, type: :model do
let(:buyer_index) { 1 }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
it "has correct page" do
expect(question.page).to be page
diff --git a/spec/models/form/sales/questions/number_joint_buyers_spec.rb b/spec/models/form/sales/questions/number_joint_buyers_spec.rb
index 9529b3aac..bf53d7d88 100644
--- a/spec/models/form/sales/questions/number_joint_buyers_spec.rb
+++ b/spec/models/form/sales/questions/number_joint_buyers_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Sales::Questions::NumberJointBuyers, type: :model do
before do
allow(page).to receive(:subsection).and_return(subsection)
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct page" do
diff --git a/spec/models/form/sales/questions/ownership_scheme_spec.rb b/spec/models/form/sales/questions/ownership_scheme_spec.rb
index 99ec32684..222ec180d 100644
--- a/spec/models/form/sales/questions/ownership_scheme_spec.rb
+++ b/spec/models/form/sales/questions/ownership_scheme_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Sales::Questions::OwnershipScheme, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -41,7 +41,7 @@ RSpec.describe Form::Sales::Questions::OwnershipScheme, type: :model do
context "with collection year on or after 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/sales/questions/person_age_spec.rb b/spec/models/form/sales/questions/person_age_spec.rb
index 5faa046bb..772ee20e0 100644
--- a/spec/models/form/sales/questions/person_age_spec.rb
+++ b/spec/models/form/sales/questions/person_age_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::PersonAge, type: :model do
let(:question_id) { "age3" }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
let(:person_index) { 2 }
it "has correct page" do
diff --git a/spec/models/form/sales/questions/person_relationship_to_buyer1_spec.rb b/spec/models/form/sales/questions/person_relationship_to_buyer1_spec.rb
index 32fb055cd..0bc00c179 100644
--- a/spec/models/form/sales/questions/person_relationship_to_buyer1_spec.rb
+++ b/spec/models/form/sales/questions/person_relationship_to_buyer1_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::PersonRelationshipToBuyer1, type: :model
let(:question_id) { "relat2" }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
let(:person_index) { 2 }
it "has correct page" do
diff --git a/spec/models/form/sales/questions/postcode_known_spec.rb b/spec/models/form/sales/questions/postcode_known_spec.rb
deleted file mode 100644
index 794c981d4..000000000
--- a/spec/models/form/sales/questions/postcode_known_spec.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-require "rails_helper"
-
-RSpec.describe Form::Sales::Questions::PostcodeKnown, type: :model do
- subject(:question) { described_class.new(question_id, question_definition, page) }
-
- let(:question_id) { nil }
- let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
-
- it "has correct page" do
- expect(question.page).to eq(page)
- end
-
- it "has the correct id" do
- expect(question.id).to eq("pcodenk")
- end
-
- it "has the correct type" do
- expect(question.type).to eq("radio")
- end
-
- it "is not marked as derived" do
- expect(question.derived?(nil)).to be false
- end
-
- it "has the correct answer_options" do
- expect(question.answer_options).to eq({
- "0" => { "value" => "Yes" },
- "1" => { "value" => "No" },
- })
- end
-
- it "has correct conditional for" do
- expect(question.conditional_for).to eq({
- "postcode_full" => [0],
- })
- end
-
- it "has the correct hidden_in_check_answers" do
- expect(question.hidden_in_check_answers).to eq({
- "depends_on" => [
- { "pcodenk" => 0 },
- { "pcodenk" => 1 },
- ],
- })
- end
-end
diff --git a/spec/models/form/sales/questions/postcode_spec.rb b/spec/models/form/sales/questions/postcode_spec.rb
deleted file mode 100644
index 480d6af60..000000000
--- a/spec/models/form/sales/questions/postcode_spec.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-require "rails_helper"
-
-RSpec.describe Form::Sales::Questions::Postcode, type: :model do
- subject(:question) { described_class.new(question_id, question_definition, page) }
-
- let(:question_id) { nil }
- let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
-
- it "has correct page" do
- expect(question.page).to eq(page)
- end
-
- it "has the correct id" do
- expect(question.id).to eq("postcode_full")
- end
-
- it "has the correct type" do
- expect(question.type).to eq("text")
- end
-
- it "is not marked as derived" do
- expect(question.derived?(nil)).to be false
- end
-
- it "has the correct width" do
- expect(question.width).to eq(5)
- end
-
- it "has the correct inferred_answers" do
- expect(question.inferred_answers).to eq({
- "la" => {
- "is_la_inferred" => true,
- },
- })
- end
-
- it "has the correct inferred_check_answers_value" do
- expect(question.inferred_check_answers_value).to eq([{
- "condition" => {
- "pcodenk" => 1,
- },
- "value" => "Not known",
- }])
- end
-end
diff --git a/spec/models/form/sales/questions/privacy_notice_spec.rb b/spec/models/form/sales/questions/privacy_notice_spec.rb
index 48de6056f..5f764c7af 100644
--- a/spec/models/form/sales/questions/privacy_notice_spec.rb
+++ b/spec/models/form/sales/questions/privacy_notice_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Sales::Questions::PrivacyNotice, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?)
+ allow(form).to receive(:start_year_2024_or_later?)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -35,7 +35,7 @@ RSpec.describe Form::Sales::Questions::PrivacyNotice, type: :model do
let(:subsection) { instance_double(Form::Subsection, id: "household_characteristics") }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
context "and there is a single buyer" do
@@ -83,7 +83,7 @@ RSpec.describe Form::Sales::Questions::PrivacyNotice, type: :model do
context "when the form year is >= 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
context "and there is a single buyer" do
@@ -94,7 +94,7 @@ RSpec.describe Form::Sales::Questions::PrivacyNotice, type: :model do
end
it "uses the expected top guidance partial" do
- expect(question.top_guidance_partial).to eq("privacy_notice_buyer_2024")
+ expect(question.top_guidance_partial).to eq("privacy_notice_buyer")
end
it "returns correct unanswered_error_message" do
@@ -116,7 +116,7 @@ RSpec.describe Form::Sales::Questions::PrivacyNotice, type: :model do
end
it "uses the expected top guidance partial" do
- expect(question.top_guidance_partial).to eq("privacy_notice_buyer_2024_joint_purchase")
+ expect(question.top_guidance_partial).to eq("privacy_notice_buyer_joint_purchase")
end
it "returns correct unanswered_error_message" do
diff --git a/spec/models/form/sales/questions/property_wheelchair_accessible_spec.rb b/spec/models/form/sales/questions/property_wheelchair_accessible_spec.rb
index 6b89deff2..a08a6d0f8 100644
--- a/spec/models/form/sales/questions/property_wheelchair_accessible_spec.rb
+++ b/spec/models/form/sales/questions/property_wheelchair_accessible_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Sales::Questions::PropertyWheelchairAccessible, type: :mode
before do
allow(page).to receive(:subsection).and_return(subsection)
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct page" do
diff --git a/spec/models/form/sales/questions/shared_ownership_type_spec.rb b/spec/models/form/sales/questions/shared_ownership_type_spec.rb
index 19cae6e89..aa75b381a 100644
--- a/spec/models/form/sales/questions/shared_ownership_type_spec.rb
+++ b/spec/models/form/sales/questions/shared_ownership_type_spec.rb
@@ -13,7 +13,7 @@ RSpec.describe Form::Sales::Questions::SharedOwnershipType, type: :model do
let(:page) { instance_double(Form::Page, subsection:) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct page" do
@@ -36,7 +36,7 @@ RSpec.describe Form::Sales::Questions::SharedOwnershipType, type: :model do
let(:start_date) { Time.zone.local(2023, 4, 2) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has the correct answer_options" do
@@ -59,11 +59,11 @@ RSpec.describe Form::Sales::Questions::SharedOwnershipType, type: :model do
context "when form start date is on or after 2024/25" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "shows shows correct top_guidance_partial" do
- expect(question.top_guidance_partial).to eq("shared_ownership_type_definitions_2024")
+ expect(question.top_guidance_partial).to eq("shared_ownership_type_definitions")
end
end
end
diff --git a/spec/models/form/sales/questions/staircase_owned_value_check_spec.rb b/spec/models/form/sales/questions/staircase_owned_value_check_spec.rb
index 4298e40b8..cbff9cec1 100644
--- a/spec/models/form/sales/questions/staircase_owned_value_check_spec.rb
+++ b/spec/models/form/sales/questions/staircase_owned_value_check_spec.rb
@@ -1,7 +1,7 @@
require "rails_helper"
RSpec.describe Form::Sales::Questions::StaircaseOwnedValueCheck, type: :model do
- subject(:question) { described_class.new(question_id, question_definition, page) }
+ subject(:question) { described_class.new(question_id, question_definition, page, joint_purchase: true) }
let(:question_id) { nil }
let(:question_definition) { nil }
diff --git a/spec/models/form/sales/questions/uprn_confirmation_spec.rb b/spec/models/form/sales/questions/uprn_confirmation_spec.rb
index ddb047937..0e54155b6 100644
--- a/spec/models/form/sales/questions/uprn_confirmation_spec.rb
+++ b/spec/models/form/sales/questions/uprn_confirmation_spec.rb
@@ -1,11 +1,13 @@
require "rails_helper"
RSpec.describe Form::Sales::Questions::UprnConfirmation, type: :model do
+ include FormattingHelper
+
subject(:question) { described_class.new(question_id, question_definition, page) }
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 4), type: "sales"), id: "property_information")) }
it "has correct page" do
expect(question.page).to eq(page)
@@ -24,7 +26,7 @@ RSpec.describe Form::Sales::Questions::UprnConfirmation, type: :model do
end
it "has the correct unanswered_error_message" do
- expect(question.unanswered_error_message).to eq("You must answer is this the right address?")
+ expect(question.unanswered_error_message).to eq("You must answer #{format_ending(I18n.t('forms.2023.sales.property_information.uprn_confirmed.check_answer_label'))}")
end
describe "notification_banner" do
diff --git a/spec/models/form/sales/questions/uprn_known_spec.rb b/spec/models/form/sales/questions/uprn_known_spec.rb
index d3a91a3ef..e551ca430 100644
--- a/spec/models/form/sales/questions/uprn_known_spec.rb
+++ b/spec/models/form/sales/questions/uprn_known_spec.rb
@@ -1,6 +1,8 @@
require "rails_helper"
RSpec.describe Form::Sales::Questions::UprnKnown, type: :model do
+ include FormattingHelper
+
subject(:question) { described_class.new(question_id, question_definition, page) }
let(:question_id) { nil }
@@ -35,7 +37,7 @@ RSpec.describe Form::Sales::Questions::UprnKnown, type: :model do
end
it "has the correct unanswered_error_message" do
- expect(question.unanswered_error_message).to eq("You must answer UPRN known?")
+ expect(question.unanswered_error_message).to eq("You must answer #{format_ending(I18n.t('forms.2023.sales.property_information.uprn.uprn_known.check_answer_label'))}")
end
it "has the correct hidden_in_check_answers" do
diff --git a/spec/models/form/sales/subsections/household_characteristics_spec.rb b/spec/models/form/sales/subsections/household_characteristics_spec.rb
index 7c6546d79..3eb5042d8 100644
--- a/spec/models/form/sales/subsections/household_characteristics_spec.rb
+++ b/spec/models/form/sales/subsections/household_characteristics_spec.rb
@@ -19,7 +19,7 @@ RSpec.describe Form::Sales::Subsections::HouseholdCharacteristics, type: :model
context "with 2022/23 form" do
before do
allow(form).to receive(:start_date).and_return(Time.zone.local(2022, 4, 1))
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct pages" do
@@ -120,7 +120,7 @@ RSpec.describe Form::Sales::Subsections::HouseholdCharacteristics, type: :model
context "with 2023/24 form" do
before do
allow(form).to receive(:start_date).and_return(Time.zone.local(2023, 4, 1))
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct pages" do
@@ -228,7 +228,7 @@ RSpec.describe Form::Sales::Subsections::HouseholdCharacteristics, type: :model
context "with 2024/25 form" do
before do
allow(form).to receive(:start_date).and_return(Time.zone.local(2024, 4, 1))
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct pages" do
diff --git a/spec/models/form/sales/subsections/outright_sale_spec.rb b/spec/models/form/sales/subsections/outright_sale_spec.rb
index 0d28330f2..52941d0a9 100644
--- a/spec/models/form/sales/subsections/outright_sale_spec.rb
+++ b/spec/models/form/sales/subsections/outright_sale_spec.rb
@@ -22,7 +22,7 @@ RSpec.describe Form::Sales::Subsections::OutrightSale, type: :model do
context "when 2022" do
before do
allow(form).to receive(:start_date).and_return(Time.zone.local(2022, 2, 8))
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct pages" do
@@ -51,7 +51,7 @@ RSpec.describe Form::Sales::Subsections::OutrightSale, type: :model do
before do
allow(form).to receive(:start_date).and_return(Time.zone.local(2023, 2, 8))
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct pages" do
@@ -80,7 +80,7 @@ RSpec.describe Form::Sales::Subsections::OutrightSale, type: :model do
context "when 2024" do
before do
allow(form).to receive(:start_date).and_return(Time.zone.local(2024, 2, 8))
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct pages" do
diff --git a/spec/models/form/sales/subsections/property_information_spec.rb b/spec/models/form/sales/subsections/property_information_spec.rb
index e0bf51e11..d29ee85fe 100644
--- a/spec/models/form/sales/subsections/property_information_spec.rb
+++ b/spec/models/form/sales/subsections/property_information_spec.rb
@@ -14,31 +14,7 @@ RSpec.describe Form::Sales::Subsections::PropertyInformation, type: :model do
let(:form) { instance_double(Form, start_date:) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
- end
-
- context "when 2022" do
- let(:start_date) { Time.utc(2022, 2, 8) }
-
- it "has correct pages" do
- expect(property_information.pages.compact.map(&:id)).to eq(
- %w[
- property_number_of_bedrooms
- about_price_bedrooms_value_check
- property_unit_type
- monthly_charges_property_type_value_check
- percentage_discount_proptype_value_check
- property_building_type
- property_postcode
- property_local_authority
- local_authority_buyer_1_income_max_value_check
- local_authority_buyer_2_income_max_value_check
- local_authority_combined_income_max_value_check
- about_price_la_value_check
- property_wheelchair_accessible
- ],
- )
- end
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
context "when 2023" do
@@ -71,7 +47,7 @@ RSpec.describe Form::Sales::Subsections::PropertyInformation, type: :model do
let(:start_date) { Time.utc(2024, 2, 8) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct pages" do
diff --git a/spec/models/form/sales/subsections/setup_spec.rb b/spec/models/form/sales/subsections/setup_spec.rb
index 2d6612663..70d52977f 100644
--- a/spec/models/form/sales/subsections/setup_spec.rb
+++ b/spec/models/form/sales/subsections/setup_spec.rb
@@ -22,7 +22,7 @@ RSpec.describe Form::Sales::Subsections::Setup, type: :model do
context "when start year is before 2024" do
before do
- allow(section.form).to receive(:start_year_after_2024?).and_return(false)
+ allow(section.form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct pages" do
@@ -48,7 +48,7 @@ RSpec.describe Form::Sales::Subsections::Setup, type: :model do
context "when start year is >= 2024" do
before do
- allow(section.form).to receive(:start_year_after_2024?).and_return(true)
+ allow(section.form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct pages" do
diff --git a/spec/models/form/sales/subsections/shared_ownership_scheme_spec.rb b/spec/models/form/sales/subsections/shared_ownership_scheme_spec.rb
index 922281fd0..8c5674d0b 100644
--- a/spec/models/form/sales/subsections/shared_ownership_scheme_spec.rb
+++ b/spec/models/form/sales/subsections/shared_ownership_scheme_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Subsections::SharedOwnershipScheme, type: :model do
let(:section) { instance_double(Form::Sales::Sections::SaleInformation) }
before do
- allow(section).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(section).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct section" do
diff --git a/spec/models/validations/date_validations_spec.rb b/spec/models/validations/date_validations_spec.rb
index 59be2537e..f6c81a088 100644
--- a/spec/models/validations/date_validations_spec.rb
+++ b/spec/models/validations/date_validations_spec.rb
@@ -26,7 +26,7 @@ RSpec.describe Validations::DateValidations do
record.voiddate = Time.zone.local(2022, 2, 1)
date_validator.validate_startdate(record)
expect(record.errors["startdate"])
- .to include(match I18n.t("validations.setup.startdate.after_void_date"))
+ .to include(match I18n.t("validations.lettings.date.startdate.after_void_date"))
end
it "validates that the tenancy start date is after the major repair date if it has a major repair date" do
@@ -34,7 +34,7 @@ RSpec.describe Validations::DateValidations do
record.mrcdate = Time.zone.local(2022, 2, 1)
date_validator.validate_startdate(record)
expect(record.errors["startdate"])
- .to include(match I18n.t("validations.setup.startdate.after_major_repair_date"))
+ .to include(match I18n.t("validations.lettings.date.startdate.after_major_repair_date"))
end
it "produces no error when the tenancy start date is before the end date of the chosen scheme if it has an end date" do
@@ -58,7 +58,7 @@ RSpec.describe Validations::DateValidations do
record.mrcdate = Time.zone.local(2022, 2, 1)
date_validator.validate_property_major_repairs(record)
expect(record.errors["mrcdate"])
- .to include(match I18n.t("validations.property.mrcdate.before_tenancy_start"))
+ .to include(match I18n.t("validations.lettings.date.mrcdate.before_tenancy_start"))
end
it "must be before the tenancy start date" do
@@ -74,9 +74,9 @@ RSpec.describe Validations::DateValidations do
date_validator.validate_property_major_repairs(record)
date_validator.validate_startdate(record)
expect(record.errors["mrcdate"])
- .to include(match I18n.t("validations.property.mrcdate.ten_years_before_tenancy_start"))
+ .to include(match I18n.t("validations.lettings.date.mrcdate.ten_years_before_tenancy_start"))
expect(record.errors["startdate"])
- .to include(match I18n.t("validations.setup.startdate.ten_years_after_mrc_date"))
+ .to include(match I18n.t("validations.lettings.date.startdate.ten_years_after_mrc_date"))
end
it "must be within 10 years of the tenancy start date" do
@@ -93,7 +93,7 @@ RSpec.describe Validations::DateValidations do
record.mrcdate = Time.zone.local(2022, 1, 1)
date_validator.validate_property_major_repairs(record)
expect(record.errors["mrcdate"])
- .to include(match I18n.t("validations.property.mrcdate.not_first_let"))
+ .to include(match I18n.t("validations.lettings.date.mrcdate.not_first_let"))
end
it "validates that no major repair date is provided for a conversion" do
@@ -101,7 +101,7 @@ RSpec.describe Validations::DateValidations do
record.mrcdate = Time.zone.local(2022, 1, 1)
date_validator.validate_property_major_repairs(record)
expect(record.errors["mrcdate"])
- .to include(match I18n.t("validations.property.mrcdate.not_first_let"))
+ .to include(match I18n.t("validations.lettings.date.mrcdate.not_first_let"))
end
it "validates that no major repair date is provided for a leased property" do
@@ -109,7 +109,7 @@ RSpec.describe Validations::DateValidations do
record.mrcdate = Time.zone.local(2022, 1, 1)
date_validator.validate_property_major_repairs(record)
expect(record.errors["mrcdate"])
- .to include(match I18n.t("validations.property.mrcdate.not_first_let"))
+ .to include(match I18n.t("validations.lettings.date.mrcdate.not_first_let"))
end
end
@@ -129,7 +129,7 @@ RSpec.describe Validations::DateValidations do
record.voiddate = Time.zone.local(2022, 2, 1)
date_validator.validate_property_void_date(record)
expect(record.errors["voiddate"])
- .to include(match I18n.t("validations.property.void_date.before_tenancy_start"))
+ .to include(match I18n.t("validations.lettings.date.void_date.before_tenancy_start"))
end
it "must be before the tenancy start date" do
@@ -145,9 +145,9 @@ RSpec.describe Validations::DateValidations do
date_validator.validate_property_void_date(record)
date_validator.validate_startdate(record)
expect(record.errors["voiddate"])
- .to include(match I18n.t("validations.property.void_date.ten_years_before_tenancy_start"))
+ .to include(match I18n.t("validations.lettings.date.void_date.ten_years_before_tenancy_start"))
expect(record.errors["startdate"])
- .to include(match I18n.t("validations.setup.startdate.ten_years_after_void_date"))
+ .to include(match I18n.t("validations.lettings.date.startdate.ten_years_after_void_date"))
end
it "must be within 10 years of the tenancy start date" do
@@ -164,9 +164,9 @@ RSpec.describe Validations::DateValidations do
record.voiddate = Time.zone.local(2022, 2, 1)
date_validator.validate_property_void_date(record)
expect(record.errors["voiddate"])
- .to include(match I18n.t("validations.property.void_date.after_mrcdate"))
+ .to include(match I18n.t("validations.lettings.date.void_date.after_mrcdate"))
expect(record.errors["mrcdate"])
- .to include(match I18n.t("validations.property.mrcdate.before_void_date"))
+ .to include(match I18n.t("validations.lettings.date.mrcdate.before_void_date"))
end
it "must be before major repairs date" do
diff --git a/spec/models/validations/property_validations_spec.rb b/spec/models/validations/property_validations_spec.rb
index 3f6f9877c..8cf484f91 100644
--- a/spec/models/validations/property_validations_spec.rb
+++ b/spec/models/validations/property_validations_spec.rb
@@ -50,7 +50,7 @@ RSpec.describe Validations::PropertyValidations do
context "and the log is from before 24/25" do
it "adds an error" do
- allow(log.form).to receive(:start_year_after_2024?).and_return false
+ allow(log.form).to receive(:start_year_2024_or_later?).and_return false
property_validator.validate_shared_housing_rooms(log)
@@ -76,7 +76,7 @@ RSpec.describe Validations::PropertyValidations do
context "and the log is from before 24/25" do
it "adds an error" do
- allow(log.form).to receive(:start_year_after_2024?).and_return false
+ allow(log.form).to receive(:start_year_2024_or_later?).and_return false
property_validator.validate_shared_housing_rooms(log)
diff --git a/spec/models/validations/setup_validations_spec.rb b/spec/models/validations/setup_validations_spec.rb
index f1e306a89..0c99d3628 100644
--- a/spec/models/validations/setup_validations_spec.rb
+++ b/spec/models/validations/setup_validations_spec.rb
@@ -149,7 +149,7 @@ RSpec.describe Validations::SetupValidations do
it "adds an error to startdate" do
record.startdate = Time.zone.local(2024, 3, 31)
setup_validator.validate_startdate_setup(record)
- expect(record.errors["startdate"]).to include(match I18n.t("validations.setup.startdate.later_than_14_days_after"))
+ expect(record.errors["startdate"]).to include(match I18n.t("validations.lettings.setup.startdate.not_within.next_two_weeks"))
end
context "and the attempted startdate is in a future collection year" do
@@ -158,7 +158,7 @@ RSpec.describe Validations::SetupValidations do
setup_validator.validate_startdate_setup(record)
expect(record.errors["startdate"].length).to be >= 2
expect(record.errors["startdate"][0]).to eq("Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024.")
- expect(record.errors["startdate"][1]).to eq(I18n.t("validations.setup.startdate.later_than_14_days_after"))
+ expect(record.errors["startdate"][1]).to eq(I18n.t("validations.lettings.setup.startdate.not_within.next_two_weeks"))
end
end
end
@@ -401,7 +401,7 @@ RSpec.describe Validations::SetupValidations do
record.irproduct_other = nil
setup_validator.validate_irproduct_other(record)
expect(record.errors["irproduct_other"])
- .to include(match I18n.t("validations.setup.intermediate_rent_product_name.blank"))
+ .to include(match I18n.t("validations.lettings.setup.intermediate_rent_product_name.blank"))
end
it "adds an error when the intermediate rent product name is blank but the rent type was given as other intermediate rent product" do
@@ -409,7 +409,7 @@ RSpec.describe Validations::SetupValidations do
record.irproduct_other = ""
setup_validator.validate_irproduct_other(record)
expect(record.errors["irproduct_other"])
- .to include(match I18n.t("validations.setup.intermediate_rent_product_name.blank"))
+ .to include(match I18n.t("validations.lettings.setup.intermediate_rent_product_name.blank"))
end
it "Does not add an error when the intermediate rent product name is provided and the rent type was given as other intermediate rent product" do
@@ -572,7 +572,7 @@ RSpec.describe Validations::SetupValidations do
it "adds an error to scheme_id" do
record.scheme = scheme
setup_validator.validate_scheme(record)
- expect(record.errors["scheme_id"]).to include(I18n.t("validations.setup.scheme.incomplete"))
+ expect(record.errors["scheme_id"]).to include(I18n.t("validations.lettings.setup.scheme.incomplete"))
end
end
end
@@ -748,9 +748,9 @@ RSpec.describe Validations::SetupValidations do
record.managing_organisation = other_organisation
setup_validator.validate_organisation(record)
- expect(record.errors["assigned_to"]).to include(I18n.t("validations.setup.assigned_to.invalid"))
- expect(record.errors["owning_organisation_id"]).to include(I18n.t("validations.setup.owning_organisation.invalid"))
- expect(record.errors["managing_organisation_id"]).to include(I18n.t("validations.setup.managing_organisation.invalid"))
+ expect(record.errors["assigned_to"]).to include(I18n.t("validations.lettings.setup.assigned_to.invalid"))
+ expect(record.errors["owning_organisation_id"]).to include(I18n.t("validations.lettings.setup.owning_organisation.invalid"))
+ expect(record.errors["managing_organisation_id"]).to include(I18n.t("validations.lettings.setup.managing_organisation.invalid"))
end
it "does not validate if either managing or owning organisation is the same as current user organisation" do
@@ -902,7 +902,7 @@ RSpec.describe Validations::SetupValidations do
record.scheme = scheme
setup_validator.validate_scheme_has_confirmed_locations_validation(record)
expect(record.errors["scheme_id"])
- .to include(match I18n.t("validations.scheme.no_completed_locations"))
+ .to include(match I18n.t("validations.lettings.setup.scheme.no_completed_locations"))
end
end
diff --git a/spec/models/validations/tenancy_validations_spec.rb b/spec/models/validations/tenancy_validations_spec.rb
index a41752616..751506c07 100644
--- a/spec/models/validations/tenancy_validations_spec.rb
+++ b/spec/models/validations/tenancy_validations_spec.rb
@@ -76,12 +76,12 @@ RSpec.describe Validations::TenancyValidations do
{
name: "assured shorthold",
code: 4,
- expected_error: ->(min_tenancy_length) { I18n.t("validations.tenancy.length.invalid_fixed", min_tenancy_length:) },
+ expected_error: ->(min_tenancy_length) { I18n.t("validations.lettings.tenancy.tenancylength.invalid_fixed_tenancylength", min_tenancy_length:) },
},
{
name: "secure fixed term",
code: 6,
- expected_error: ->(min_tenancy_length) { I18n.t("validations.tenancy.length.invalid_fixed", min_tenancy_length:) },
+ expected_error: ->(min_tenancy_length) { I18n.t("validations.lettings.tenancy.tenancylength.invalid_fixed_tenancylength", min_tenancy_length:) },
},
]
@@ -211,7 +211,7 @@ RSpec.describe Validations::TenancyValidations do
periodic_tenancy_case = {
name: "periodic",
code: 8,
- expected_error: ->(min_tenancy_length) { I18n.t("validations.tenancy.length.invalid_periodic", min_tenancy_length:) },
+ expected_error: ->(min_tenancy_length) { I18n.t("validations.lettings.tenancy.tenancylength.invalid_periodic_tenancylength", min_tenancy_length:) },
}
error_fields = %w[tenancylength tenancy]
include_examples "adds expected errors based on the tenancy length", periodic_tenancy_case, error_fields, 1
@@ -237,9 +237,8 @@ RSpec.describe Validations::TenancyValidations do
it "adds errors to tenancylength and tenancy" do
tenancy_validator.validate_tenancy_length_blank_when_not_required(record)
- expected_error = I18n.t("validations.tenancy.length.fixed_term_not_required")
- expect(record.errors["tenancylength"]).to include(expected_error)
- expect(record.errors["tenancy"]).to include(expected_error)
+ expect(record.errors["tenancylength"]).to include(I18n.t("validations.lettings.tenancy.tenancylength.fixed_term_not_required"))
+ expect(record.errors["tenancy"]).to include(I18n.t("validations.lettings.tenancy.tenancy.fixed_term_not_required"))
end
end
@@ -321,8 +320,8 @@ RSpec.describe Validations::TenancyValidations do
describe "joint tenancy validation" do
context "when the data inputter has said that there is only one member in the household" do
let(:record) { FactoryBot.build(:lettings_log, :setup_completed, hhmemb: 1) }
- let(:expected_error) { I18n.t("validations.tenancy.not_joint") }
- let(:hhmemb_expected_error) { I18n.t("validations.tenancy.joint_more_than_one_member") }
+ let(:expected_error) { I18n.t("validations.lettings.tenancy.joint.sole_tenancy") }
+ let(:hhmemb_expected_error) { I18n.t("validations.lettings.tenancy.joint.multiple_members_required") }
it "displays an error if the data inputter says the letting is a joint tenancy" do
record.joint = 1
diff --git a/spec/requests/duplicate_logs_controller_spec.rb b/spec/requests/duplicate_logs_controller_spec.rb
index c06d30baf..700964fcf 100644
--- a/spec/requests/duplicate_logs_controller_spec.rb
+++ b/spec/requests/duplicate_logs_controller_spec.rb
@@ -66,7 +66,6 @@ RSpec.describe DuplicateLogsController, type: :request do
it "displays check your answers for each log with correct questions" do
expect(page).to have_content("Q5 - Tenancy start date", count: 3)
expect(page).to have_content("Q7 - Tenant code", count: 3)
- expect(page).to have_content("Q12 - Postcode", count: 3)
expect(page).to have_content("Q32 - Lead tenant’s age", count: 3)
expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 3)
expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 3)
@@ -84,7 +83,6 @@ RSpec.describe DuplicateLogsController, type: :request do
expect(page).to have_content("Q5 - Tenancy start date", count: 3)
expect(page).to have_content("Q7 - Tenant code", count: 3)
- expect(page).to have_content("Q12 - Postcode", count: 1)
expect(page).to have_content("Postcode (from UPRN)", count: 2)
expect(page).to have_content("Q32 - Lead tenant’s age", count: 3)
expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 3)
@@ -114,7 +112,6 @@ RSpec.describe DuplicateLogsController, type: :request do
it "displays check your answers for each log with correct questions" do
expect(page).to have_content("Q5 - Tenancy start date", count: 1)
expect(page).to have_content("Q7 - Tenant code", count: 1)
- expect(page).to have_content("Q12 - Postcode", count: 1)
expect(page).to have_content("Q32 - Lead tenant’s age", count: 1)
expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 1)
expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 1)
@@ -141,7 +138,6 @@ RSpec.describe DuplicateLogsController, type: :request do
it "displays check your answers for each log with correct questions" do
expect(page).to have_content("Q5 - Tenancy start date", count: 1)
expect(page).to have_content("Q7 - Tenant code", count: 1)
- expect(page).to have_content("Q12 - Postcode", count: 1)
expect(page).to have_content("Q32 - Lead tenant’s age", count: 1)
expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 1)
expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 1)
@@ -295,7 +291,6 @@ RSpec.describe DuplicateLogsController, type: :request do
it "displays check your answers for each log with correct questions" do
expect(page).to have_content("Q5 - Tenancy start date", count: 3)
expect(page).to have_content("Q7 - Tenant code", count: 3)
- expect(page).to have_content("Q12 - Postcode", count: 3)
expect(page).to have_content("Q32 - Lead tenant’s age", count: 3)
expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 3)
expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 3)
@@ -324,7 +319,6 @@ RSpec.describe DuplicateLogsController, type: :request do
it "displays check your answers for each log with correct questions" do
expect(page).to have_content("Q5 - Tenancy start date", count: 1)
expect(page).to have_content("Q7 - Tenant code", count: 1)
- expect(page).to have_content("Q12 - Postcode", count: 1)
expect(page).to have_content("Q32 - Lead tenant’s age", count: 1)
expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 1)
expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 1)
@@ -351,7 +345,6 @@ RSpec.describe DuplicateLogsController, type: :request do
it "displays check your answers for each log with correct questions" do
expect(page).to have_content("Q5 - Tenancy start date", count: 1)
expect(page).to have_content("Q7 - Tenant code", count: 1)
- expect(page).to have_content("Q12 - Postcode", count: 1)
expect(page).to have_content("Q32 - Lead tenant’s age", count: 1)
expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 1)
expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 1)
diff --git a/spec/requests/form_controller_spec.rb b/spec/requests/form_controller_spec.rb
index 94f6595c7..13d711c20 100644
--- a/spec/requests/form_controller_spec.rb
+++ b/spec/requests/form_controller_spec.rb
@@ -412,7 +412,7 @@ RSpec.describe FormController, type: :request do
context "with a form page that has custom guidance" do
it "displays the correct partial" do
get "/lettings-logs/#{lettings_log.id}/net-income", headers: headers, params: {}
- expect(response.body).to match("What counts as income?")
+ expect(response.body).to match(I18n.t("forms.2021.lettings.guidance.what_counts_as_income.title"))
end
end
diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb
index 223cc9e00..5a300c56c 100644
--- a/spec/requests/organisations_controller_spec.rb
+++ b/spec/requests/organisations_controller_spec.rb
@@ -497,7 +497,7 @@ RSpec.describe OrganisationsController, type: :request do
it "displays a link to merge organisations" do
expect(page).to have_content("To report a merge or update your organisation details, ")
- expect(page).to have_link("contact the helpdesk", href: "https://dluhcdigital.atlassian.net/servicedesk/customer/portal/6/group/11")
+ expect(page).to have_link("contact the helpdesk", href: "https://mhclgdigital.atlassian.net/servicedesk/customer/portal/6/group/11")
end
it "does not display merge history if there is none" do
diff --git a/spec/services/bulk_upload/lettings/year2023/row_parser_spec.rb b/spec/services/bulk_upload/lettings/year2023/row_parser_spec.rb
index 314db674d..591ffdd53 100644
--- a/spec/services/bulk_upload/lettings/year2023/row_parser_spec.rb
+++ b/spec/services/bulk_upload/lettings/year2023/row_parser_spec.rb
@@ -263,7 +263,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "adds an error to all (and only) the fields used to determine duplicates" do
parser.valid?
- error_message = "This is a duplicate log."
+ error_message = I18n.t("validations.lettings.2023.bulk_upload.duplicate")
[
:field_1, # owning_organisation
@@ -300,7 +300,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "adds an error to all the fields used to determine duplicates" do
parser.valid?
- error_message = "This is a duplicate log."
+ error_message = I18n.t("validations.lettings.2023.bulk_upload.duplicate")
[
:field_1, # owning_organisation
@@ -338,7 +338,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "adds an error to all the fields used to determine duplicates" do
parser.valid?
- error_message = "This is a duplicate log."
+ error_message = I18n.t("validations.lettings.2023.bulk_upload.duplicate")
[
:field_1, # owning_organisation
@@ -385,7 +385,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "adds an error to all the fields used to determine duplicates" do
parser.valid?
- error_message = "This is a duplicate log."
+ error_message = I18n.t("validations.lettings.2023.bulk_upload.duplicate")
[
:field_1, # owning_organisation
@@ -444,7 +444,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "does not add an error to all the fields used to determine duplicates" do
parser_too.valid?
- error_message = "This is a duplicate log."
+ error_message = I18n.t("validations.lettings.2023.bulk_upload.duplicate")
[
:field_1, # owning_organisation
@@ -479,7 +479,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "adds an error to all the fields used to determine duplicates" do
parser.valid?
- error_message = "This is a duplicate log."
+ error_message = I18n.t("validations.lettings.2023.bulk_upload.duplicate")
[
:field_1, # owning_organisation
@@ -526,7 +526,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "adds an error to all the fields used to determine duplicates" do
parser.valid?
- error_message = "This is a duplicate log."
+ error_message = I18n.t("validations.lettings.2023.bulk_upload.duplicate")
[
:field_1, # owning_organisation
@@ -585,7 +585,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "does not add an error to all the fields used to determine duplicates" do
parser_too.valid?
- error_message = "This is a duplicate log."
+ error_message = I18n.t("validations.lettings.2023.bulk_upload.duplicate")
[
:field_1, # owning_organisation
@@ -686,7 +686,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "cannot be nulled" do
parser.valid?
- expect(parser.errors[:field_45]).to eq(["You must show the MHCLG privacy notice to the tenant before you can submit this log."])
+ expect(parser.errors[:field_45]).to eq([I18n.t("validations.lettings.2023.bulk_upload.declaration.missing")])
end
end
end
@@ -697,8 +697,8 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "fetches the question's check_answer_label if it exists" do
parser.valid?
- expect(parser.errors[:field_19]).to eql(["You must answer address line 1."])
- expect(parser.errors[:field_21]).to eql(["You must answer town or city."])
+ expect(parser.errors[:field_19]).to eql([I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "address line 1.")])
+ expect(parser.errors[:field_21]).to eql([I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "town or city.")])
end
end
end
@@ -846,7 +846,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
parser.valid?
expect(parser.errors[:field_5]).to be_present
- expect(parser.errors[:field_11]).to eq(["You must answer intermediate rent type."])
+ expect(parser.errors[:field_11]).to eq([I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "intermediate rent type.")])
end
end
@@ -857,7 +857,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
parser.valid?
expect(parser.errors[:field_5]).to be_present
- expect(parser.errors[:field_11]).to eq(["You must answer intermediate rent type."])
+ expect(parser.errors[:field_11]).to eq([I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "intermediate rent type.")])
end
end
@@ -868,7 +868,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
parser.valid?
expect(parser.errors[:field_5]).to be_present
- expect(parser.errors[:field_10]).to eq(["You must answer is this a London Affordable Rent letting."])
+ expect(parser.errors[:field_10]).to eq([I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "is this a London Affordable Rent letting.")])
end
end
@@ -879,7 +879,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
parser.valid?
expect(parser.errors[:field_5]).to be_present
- expect(parser.errors[:field_10]).to eq(["You must answer is this a London Affordable Rent letting."])
+ expect(parser.errors[:field_10]).to eq([I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "is this a London Affordable Rent letting.")])
end
end
@@ -888,7 +888,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "adds error on field_12" do
parser.valid?
- expect(parser.errors[:field_12]).to eq(["You must answer product name."])
+ expect(parser.errors[:field_12]).to eq([I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "product name.")])
end
end
@@ -910,8 +910,8 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "is not permitted" do
parser.valid?
- expect(parser.errors[:field_4]).to include("This letting type is supported housing, but the needs type is general needs. Change either the needs type or the letting type.")
- expect(parser.errors[:field_5]).to include("This needs type is general needs, but the letting type is supported housing. Change either the needs type or the letting type.")
+ expect(parser.errors[:field_4]).to include(I18n.t("validations.lettings.2023.bulk_upload.needstype.lettype_not_general_needs"))
+ expect(parser.errors[:field_5]).to include(I18n.t("validations.lettings.2023.bulk_upload.lettype.needstype_general_needs"))
end
end
end
@@ -925,8 +925,8 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "is not permitted" do
parser.valid?
- expect(parser.errors[:field_4]).to include("This letting type is general needs, but the needs type is supported housing. Change either the needs type or the letting type.")
- expect(parser.errors[:field_5]).to include("This needs type is supported housing, but the letting type is general needs. Change either the needs type or the letting type.")
+ expect(parser.errors[:field_4]).to include(I18n.t("validations.lettings.2023.bulk_upload.needstype.lettype_not_supported_housing"))
+ expect(parser.errors[:field_5]).to include(I18n.t("validations.lettings.2023.bulk_upload.lettype.needstype_supported_housing"))
end
end
@@ -951,7 +951,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
parser.valid?
expect(parser.errors[:field_15]).to be_blank
- expect(parser.errors[:field_16]).to eq(["You must answer scheme code."])
+ expect(parser.errors[:field_16]).to eq([I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "scheme code.")])
expect(parser.errors[:field_17]).to be_blank
end
end
@@ -979,7 +979,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
parser.valid?
expect(parser.errors[:field_15]).to be_blank
- expect(parser.errors.where(:field_16, category: :setup).map(&:message)).to eq(["This scheme code does not belong to the owning organisation or managing organisation."])
+ expect(parser.errors.where(:field_16, category: :setup).map(&:message)).to eq([I18n.t("validations.lettings.2023.bulk_upload.scheme.does_not_belong_to_org", scheme_or_management_group: "scheme")])
expect(parser.errors[:field_17]).to be_blank
end
end
@@ -992,7 +992,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
expect(parser.errors[:field_15]).to be_blank
expect(parser.errors[:field_16]).to be_blank
- expect(parser.errors.where(:field_17, category: :setup).map(&:message)).to eq(["You must answer location code."])
+ expect(parser.errors.where(:field_17, category: :setup).map(&:message)).to eq([I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "location code.")])
expect(parser.errors[:field_17].count).to eq(1)
end
end
@@ -1005,7 +1005,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
expect(parser.errors[:field_16]).to be_blank
expect(parser.errors[:field_17]).to be_blank
- expect(parser.errors.where(:field_15, category: :setup).map(&:message)).to eq(["You must answer management group code."])
+ expect(parser.errors.where(:field_15, category: :setup).map(&:message)).to eq([I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "management group code.")])
expect(parser.errors[:field_15].count).to eq(1)
end
end
@@ -1018,7 +1018,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
expect(parser.errors[:field_15]).to be_blank
expect(parser.errors[:field_16]).to be_blank
- expect(parser.errors.where(:field_17, category: :setup).map(&:message)).to eq(["Location code must relate to a location that is owned by the owning organisation or managing organisation."])
+ expect(parser.errors.where(:field_17, category: :setup).map(&:message)).to eq([I18n.t("validations.lettings.2023.bulk_upload.scheme.must_relate_to_org", capitalised_location_or_scheme: "Location", location_or_scheme: "location")])
end
end
@@ -1054,7 +1054,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
expect(parser.errors[:field_15]).to be_blank
expect(parser.errors[:field_16]).to be_blank
- expect(parser.errors.where(:field_17, category: :setup).map(&:message)).to eq(["Location code must relate to a location that is owned by the owning organisation or managing organisation."])
+ expect(parser.errors.where(:field_17, category: :setup).map(&:message)).to eq([I18n.t("validations.lettings.2023.bulk_upload.scheme.must_relate_to_org", capitalised_location_or_scheme: "Location", location_or_scheme: "location")])
end
end
@@ -1067,7 +1067,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
parser.valid?
expect(parser.errors[:field_15]).to be_blank
- expect(parser.errors.where(:field_16, category: :setup).map(&:message)).to eq(["This scheme code does not belong to the owning organisation or managing organisation."])
+ expect(parser.errors.where(:field_16, category: :setup).map(&:message)).to eq([I18n.t("validations.lettings.2023.bulk_upload.scheme.does_not_belong_to_org", scheme_or_management_group: "scheme")])
expect(parser.errors[:field_17]).to be_blank
end
end
@@ -1093,7 +1093,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
parser.valid?
expect(parser.errors[:field_15]).to be_blank
- expect(parser.errors[:field_16]).to include("You must answer scheme name.")
+ expect(parser.errors[:field_16]).to include(I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "scheme name."))
expect(parser.errors[:field_17]).to be_blank
end
end
@@ -1122,7 +1122,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "returns a setup error" do
parser.valid?
- expect(parser.errors.where(:field_15, category: :setup).map(&:message)).to eq(["This management group code does not belong to the owning organisation or managing organisation."])
+ expect(parser.errors.where(:field_15, category: :setup).map(&:message)).to eq([I18n.t("validations.lettings.2023.bulk_upload.scheme.does_not_belong_to_org", scheme_or_management_group: "management group")])
expect(parser.errors[:field_16]).to be_blank
expect(parser.errors[:field_17]).to be_blank
end
@@ -1135,7 +1135,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
parser.valid?
expect(parser.errors[:field_15]).to be_blank
- expect(parser.errors.where(:field_16, category: :setup).map(&:message)).to eq(["You must answer scheme code."])
+ expect(parser.errors.where(:field_16, category: :setup).map(&:message)).to eq([I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "scheme code.")])
expect(parser.errors[:field_17]).to be_blank
end
end
@@ -1147,7 +1147,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
parser.valid?
expect(parser.errors[:field_15]).to be_blank
- expect(parser.errors.where(:field_16, category: :setup).map(&:message)).to eq(["Scheme code must relate to a scheme that is owned by the owning organisation or managing organisation."])
+ expect(parser.errors.where(:field_16, category: :setup).map(&:message)).to eq([I18n.t("validations.lettings.2023.bulk_upload.scheme.must_relate_to_org", capitalised_location_or_scheme: "Scheme", location_or_scheme: "scheme")])
expect(parser.errors[:field_17]).to be_blank
end
end
@@ -1173,7 +1173,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
parser.valid?
expect(parser.errors[:field_15]).to be_blank
- expect(parser.errors.where(:field_16, category: :setup).map(&:message)).to eq(["Scheme code must relate to a scheme that is owned by the owning organisation or managing organisation."])
+ expect(parser.errors.where(:field_16, category: :setup).map(&:message)).to eq([I18n.t("validations.lettings.2023.bulk_upload.scheme.must_relate_to_org", capitalised_location_or_scheme: "Scheme", location_or_scheme: "scheme")])
expect(parser.errors[:field_17]).to be_blank
end
end
@@ -1186,7 +1186,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "returns a setup error" do
parser.valid?
- expect(parser.errors.where(:field_15, category: :setup).map(&:message)).to eq(["This management group code does not belong to the owning organisation or managing organisation."])
+ expect(parser.errors.where(:field_15, category: :setup).map(&:message)).to eq([I18n.t("validations.lettings.2023.bulk_upload.scheme.does_not_belong_to_org", scheme_or_management_group: "management group")])
expect(parser.errors[:field_16]).to be_blank
expect(parser.errors[:field_17]).to be_blank
end
@@ -1212,7 +1212,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "clears the scheme answer" do
parser.valid?
- expect(parser.errors[:field_15]).to include("You must answer scheme name.")
+ expect(parser.errors[:field_15]).to include(I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "scheme name."))
expect(parser.errors[:field_16]).to be_blank
expect(parser.errors[:field_17]).to be_blank
end
@@ -1255,7 +1255,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "returns an error" do
parser.valid?
- expect(parser.errors[:field_102]).to include("Enter a valid value for what is the tenant’s main reason for the household leaving their last settled home?")
+ expect(parser.errors[:field_102]).to include(I18n.t("validations.lettings.2023.bulk_upload.invalid_option", question: "what is the tenant’s main reason for the household leaving their last settled home?"))
end
end
end
@@ -1490,7 +1490,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "returns an error" do
parser.valid?
- expect(parser.errors[:field_9]).to include("Tenancy start year must be 2 or 4 digits.")
+ expect(parser.errors[:field_9]).to include(I18n.t("validations.lettings.2023.bulk_upload.startdate.year_not_two_or_four_digits"))
end
end
@@ -1537,7 +1537,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "is not permitted as setup error" do
parser.valid?
- expect(parser.errors.where(:field_1, category: :setup).map(&:message)).to eql(["You must answer owning organisation."])
+ expect(parser.errors.where(:field_1, category: :setup).map(&:message)).to eql([I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "owning organisation.")])
end
it "blocks log creation" do
@@ -1553,7 +1553,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
parser.valid?
setup_errors = parser.errors.select { |e| e.options[:category] == :setup }
- expect(setup_errors.find { |e| e.attribute == :field_1 }.message).to eql("The owning organisation code is incorrect.")
+ expect(setup_errors.find { |e| e.attribute == :field_1 }.message).to eql(I18n.t("validations.lettings.2023.bulk_upload.owning_organisation.not_found"))
end
it "blocks log creation" do
@@ -1571,7 +1571,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
parser.valid?
setup_errors = parser.errors.select { |e| e.options[:category] == :setup }
- expect(setup_errors.find { |e| e.attribute == :field_1 }.message).to eql("The owning organisation code provided is for an organisation that does not own stock.")
+ expect(setup_errors.find { |e| e.attribute == :field_1 }.message).to eql(I18n.t("validations.lettings.2023.bulk_upload.owning_organisation.not_stock_owner"))
end
it "blocks log creation" do
@@ -1589,7 +1589,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
parser.valid?
setup_errors = parser.errors.select { |e| e.options[:category] == :setup }
- expect(setup_errors.find { |e| e.attribute == :field_1 }.message).to eql("You do not have permission to add logs for this owning organisation.")
+ expect(setup_errors.find { |e| e.attribute == :field_1 }.message).to eql(I18n.t("validations.lettings.2023.bulk_upload.owning_organisation.not_permitted"))
end
it "blocks log creation" do
@@ -1652,7 +1652,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
parser.valid?
setup_errors = parser.errors.select { |e| e.options[:category] == :setup }
- expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql("The managing organisation code is incorrect.")
+ expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql(I18n.t("validations.lettings.2023.bulk_upload.managing_organisation.not_answered"))
end
it "blocks log creation" do
@@ -1668,7 +1668,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
parser.valid?
setup_errors = parser.errors.select { |e| e.options[:category] == :setup }
- expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql("The managing organisation code is incorrect.")
+ expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql(I18n.t("validations.lettings.2023.bulk_upload.managing_organisation.not_found"))
end
it "blocks log creation" do
@@ -1686,7 +1686,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
parser.valid?
setup_errors = parser.errors.select { |e| e.options[:category] == :setup }
- expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql("This managing organisation does not have a relationship with the owning organisation.")
+ expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql(I18n.t("validations.lettings.2023.bulk_upload.managing_organisation.no_relationship"))
end
it "blocks log creation" do
@@ -1702,7 +1702,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "is reported as a setup error" do
parser.valid?
- expect(parser.errors.where(:field_4, category: :setup).map(&:message)).to eql(["You must answer needs type."])
+ expect(parser.errors.where(:field_4, category: :setup).map(&:message)).to eql([I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "needs type.")])
end
end
end
@@ -1713,7 +1713,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "has setup errors on the field" do
parser.valid?
- expect(parser.errors.where(:field_6, category: :setup).map(&:message)).to eql(["You must answer property renewal."])
+ expect(parser.errors.where(:field_6, category: :setup).map(&:message)).to eql([I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "property renewal.")])
end
end
@@ -1722,7 +1722,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "adds a setup error" do
parser.valid?
- expect(parser.errors.where(:field_6, category: :setup).map(&:message)).to include("Enter a valid value for is this letting a renewal?")
+ expect(parser.errors.where(:field_6, category: :setup).map(&:message)).to include(I18n.t("validations.lettings.2023.bulk_upload.invalid_option", question: "is this letting a renewal?"))
end
end
end
@@ -1743,9 +1743,9 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "adds appropriate errors" do
parser.valid?
- expect(parser.errors[:field_18]).to eql(["You must answer UPRN."])
- expect(parser.errors[:field_19]).to eql(["You must answer address line 1."])
- expect(parser.errors[:field_21]).to eql(["You must answer town or city."])
+ expect(parser.errors[:field_18]).to eql([I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "UPRN.")])
+ expect(parser.errors[:field_19]).to eql([I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "address line 1.")])
+ expect(parser.errors[:field_21]).to eql([I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "town or city.")])
end
end
@@ -1821,7 +1821,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "populates with correct error message" do
parser.valid?
- expect(parser.errors[:field_30]).to eql(["You must answer type of building."])
+ expect(parser.errors[:field_30]).to eql([I18n.t("validations.lettings.2023.bulk_upload.not_answered", question: "type of building.")])
end
end
end
@@ -1851,8 +1851,8 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "populates with correct error message" do
parser.valid?
- expect(parser.errors.where(:field_46, category: :soft_validation).first.message).to eql("You told us this person is aged 22 years and retired.")
- expect(parser.errors.where(:field_50, category: :soft_validation).first.message).to eql("You told us this person is aged 22 years and retired.")
+ expect(parser.errors.where(:field_46, category: :soft_validation).first.message).to eql("You told us this person is aged 22 years and retired. The minimum expected retirement age in England is 66.")
+ expect(parser.errors.where(:field_50, category: :soft_validation).first.message).to eql("You told us this person is aged 22 years and retired. The minimum expected retirement age in England is 66.")
end
end
@@ -2170,7 +2170,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "adds an error" do
parser.valid?
- expect(parser.errors[:field_116]).to include("Enter a valid value for was the letting made under the Choice-Based Lettings (CBL)?")
+ expect(parser.errors[:field_116]).to include(I18n.t("validations.lettings.2023.bulk_upload.invalid_option", question: "was the letting made under the Choice-Based Lettings (CBL)?"))
end
end
end
@@ -2197,7 +2197,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "adds an error" do
parser.valid?
- expect(parser.errors[:field_118]).to include("Enter a valid value for was the letting made under the Common Housing Register (CHR)?")
+ expect(parser.errors[:field_118]).to include(I18n.t("validations.lettings.2023.bulk_upload.invalid_option", question: "was the letting made under the Common Housing Register (CHR)?"))
end
end
end
@@ -2224,7 +2224,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "adds an error" do
parser.valid?
- expect(parser.errors[:field_117]).to include("Enter a valid value for was the letting made under the Common Allocation Policy (CAP)?")
+ expect(parser.errors[:field_117]).to include(I18n.t("validations.lettings.2023.bulk_upload.invalid_option", question: "was the letting made under the Common Allocation Policy (CAP)?"))
end
end
end
@@ -2736,8 +2736,8 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "sets error on housingneeds a and b" do
parser.valid?
- expect(parser.errors[:field_83]).to include("Only one disabled access need: fully wheelchair-accessible housing, wheelchair access to essential rooms or level access housing, can be selected.")
- expect(parser.errors[:field_84]).to include("Only one disabled access need: fully wheelchair-accessible housing, wheelchair access to essential rooms or level access housing, can be selected.")
+ expect(parser.errors[:field_83]).to include(I18n.t("validations.lettings.2023.bulk_upload.housingneeds_type.only_one_option_permitted"))
+ expect(parser.errors[:field_84]).to include(I18n.t("validations.lettings.2023.bulk_upload.housingneeds_type.only_one_option_permitted"))
expect(parser.errors[:field_85]).to be_blank
end
end
@@ -2747,8 +2747,8 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "sets error on housingneeds a and c" do
parser.valid?
- expect(parser.errors[:field_83]).to include("Only one disabled access need: fully wheelchair-accessible housing, wheelchair access to essential rooms or level access housing, can be selected.")
- expect(parser.errors[:field_85]).to include("Only one disabled access need: fully wheelchair-accessible housing, wheelchair access to essential rooms or level access housing, can be selected.")
+ expect(parser.errors[:field_83]).to include(I18n.t("validations.lettings.2023.bulk_upload.housingneeds_type.only_one_option_permitted"))
+ expect(parser.errors[:field_85]).to include(I18n.t("validations.lettings.2023.bulk_upload.housingneeds_type.only_one_option_permitted"))
expect(parser.errors[:field_84]).to be_blank
end
end
@@ -2758,8 +2758,8 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "sets error on housingneeds b and c" do
parser.valid?
- expect(parser.errors[:field_84]).to include("Only one disabled access need: fully wheelchair-accessible housing, wheelchair access to essential rooms or level access housing, can be selected.")
- expect(parser.errors[:field_85]).to include("Only one disabled access need: fully wheelchair-accessible housing, wheelchair access to essential rooms or level access housing, can be selected.")
+ expect(parser.errors[:field_84]).to include(I18n.t("validations.lettings.2023.bulk_upload.housingneeds_type.only_one_option_permitted"))
+ expect(parser.errors[:field_85]).to include(I18n.t("validations.lettings.2023.bulk_upload.housingneeds_type.only_one_option_permitted"))
expect(parser.errors[:field_83]).to be_blank
end
end
@@ -2769,8 +2769,8 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "sets error on housingneeds a and g" do
parser.valid?
- expect(parser.errors[:field_87]).to include("No disabled access needs can’t be selected if you have selected fully wheelchair-accessible housing, wheelchair access to essential rooms, level access housing or other disabled access needs.")
- expect(parser.errors[:field_83]).to include("No disabled access needs can’t be selected if you have selected fully wheelchair-accessible housing, wheelchair access to essential rooms, level access housing or other disabled access needs.")
+ expect(parser.errors[:field_87]).to include(I18n.t("validations.lettings.2023.bulk_upload.housingneeds.no_disabled_needs_conjunction"))
+ expect(parser.errors[:field_83]).to include(I18n.t("validations.lettings.2023.bulk_upload.housingneeds.no_disabled_needs_conjunction"))
expect(parser.errors[:field_84]).to be_blank
expect(parser.errors[:field_85]).to be_blank
end
@@ -2793,8 +2793,8 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "sets error on housingneeds a and h" do
parser.valid?
- expect(parser.errors[:field_88]).to include("Don’t know disabled access needs can’t be selected if you have selected fully wheelchair-accessible housing, wheelchair access to essential rooms, level access housing or other disabled access needs.")
- expect(parser.errors[:field_83]).to include("Don’t know disabled access needs can’t be selected if you have selected fully wheelchair-accessible housing, wheelchair access to essential rooms, level access housing or other disabled access needs.")
+ expect(parser.errors[:field_88]).to include(I18n.t("validations.lettings.2023.bulk_upload.housingneeds.dont_know_disabled_needs_conjunction"))
+ expect(parser.errors[:field_83]).to include(I18n.t("validations.lettings.2023.bulk_upload.housingneeds.dont_know_disabled_needs_conjunction"))
expect(parser.errors[:field_84]).to be_blank
expect(parser.errors[:field_85]).to be_blank
end
diff --git a/spec/services/bulk_upload/lettings/year2024/row_parser_spec.rb b/spec/services/bulk_upload/lettings/year2024/row_parser_spec.rb
index d82effa0b..e9047b2ae 100644
--- a/spec/services/bulk_upload/lettings/year2024/row_parser_spec.rb
+++ b/spec/services/bulk_upload/lettings/year2024/row_parser_spec.rb
@@ -283,7 +283,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "adds an error to all (and only) the fields used to determine duplicates" do
parser.valid?
- error_message = "This is a duplicate log."
+ error_message = I18n.t("validations.lettings.2024.bulk_upload.duplicate")
[
:field_1, # owning_organisation
@@ -339,7 +339,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "adds an error to all the fields used to determine duplicates" do
parser.valid?
- error_message = "This is a duplicate log."
+ error_message = I18n.t("validations.lettings.2024.bulk_upload.duplicate")
[
:field_1, # owning_organisation
@@ -381,7 +381,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "adds an error to all the fields used to determine duplicates" do
parser.valid?
- error_message = "This is a duplicate log."
+ error_message = I18n.t("validations.lettings.2024.bulk_upload.duplicate")
[
:field_1, # owning_organisation
@@ -432,7 +432,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "adds an error to all the fields used to determine duplicates" do
parser.valid?
- error_message = "This is a duplicate log."
+ error_message = I18n.t("validations.lettings.2024.bulk_upload.duplicate")
[
:field_1, # owning_organisation
@@ -492,7 +492,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "does not add an error to all the fields used to determine duplicates" do
parser_too.valid?
- error_message = "This is a duplicate log."
+ error_message = I18n.t("validations.lettings.2024.bulk_upload.duplicate")
[
:field_1, # owning_organisation
@@ -527,7 +527,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "adds an error to all the fields used to determine duplicates" do
parser.valid?
- error_message = "This is a duplicate log."
+ error_message = I18n.t("validations.lettings.2024.bulk_upload.duplicate")
[
:field_1, # owning_organisation
@@ -574,7 +574,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "adds an error to all the fields used to determine duplicates" do
parser.valid?
- error_message = "This is a duplicate log."
+ error_message = I18n.t("validations.lettings.2024.bulk_upload.duplicate")
[
:field_1, # owning_organisation
@@ -634,7 +634,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "does not add an error to all the fields used to determine duplicates" do
parser_too.valid?
- error_message = "This is a duplicate log."
+ error_message = I18n.t("validations.lettings.2024.bulk_upload.duplicate")
[
:field_1, # owning_organisation
@@ -770,7 +770,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "fetches the question's check_answer_label if it exists" do
parser.valid?
- expect(parser.errors[:field_43]).to eql(["You must answer lead tenant’s gender identity."])
+ expect(parser.errors[:field_43]).to eql([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "lead tenant’s gender identity.")])
end
end
@@ -779,7 +779,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "only has one error added to the field" do
parser.valid?
- expect(parser.errors[:field_112]).to eql(["You must answer was the letting made under the Choice-Based Lettings (CBL)?"])
+ expect(parser.errors[:field_112]).to eql([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "was the letting made under the Choice-Based Lettings (CBL)?")])
end
end
@@ -789,7 +789,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "does not add an additional error" do
parser.valid?
expect(parser.errors[:field_116].length).to eq(1)
- expect(parser.errors[:field_116]).to include(match "Enter a valid value for")
+ expect(parser.errors[:field_116]).to include(match I18n.t("validations.lettings.2024.bulk_upload.invalid_option", question: ""))
end
end
end
@@ -833,7 +833,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "is not permitted" do
parser.valid?
expect(parser.errors[:field_3]).to be_present
- expect(parser.errors[:field_3]).to include("You must answer what is the CORE username of the account this letting log should be assigned to?")
+ expect(parser.errors[:field_3]).to include(I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "what is the CORE username of the account this letting log should be assigned to?"))
end
it "blocks log creation" do
@@ -915,8 +915,8 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "cannot be nulled" do
parser.valid?
- expect(parser.errors[:field_5]).to eq(["You must answer scheme code."])
- expect(parser.errors[:field_6]).to eq(["You must answer location code."])
+ expect(parser.errors[:field_5]).to eq([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "scheme code.")])
+ expect(parser.errors[:field_6]).to eq([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "location code.")])
end
end
@@ -942,7 +942,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
let(:attributes) { { bulk_upload:, field_1: owning_org.old_visible_id, field_2: owning_org.old_visible_id, field_4: "2", field_11: "2", field_5: "S123", field_6: location.id } }
it "returns a setup error" do
- expect(parser.errors.where(:field_5, category: :setup).map(&:message)).to eq(["This scheme code does not belong to the owning organisation or managing organisation."])
+ expect(parser.errors.where(:field_5, category: :setup).map(&:message)).to eq([I18n.t("validations.lettings.2024.bulk_upload.scheme.must_relate_to_org")])
expect(parser.errors[:field_6]).to be_blank
end
end
@@ -952,7 +952,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "returns a setup error" do
expect(parser.errors[:field_5]).to be_blank
- expect(parser.errors.where(:field_6, category: :setup).map(&:message)).to eq(["You must answer location code."])
+ expect(parser.errors.where(:field_6, category: :setup).map(&:message)).to eq([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "location code.")])
expect(parser.errors[:field_6].count).to eq(1)
end
end
@@ -962,7 +962,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "returns a setup error" do
expect(parser.errors[:field_5]).to be_blank
- expect(parser.errors.where(:field_6, category: :setup).map(&:message)).to eq(["Location code must relate to a location that is owned by the owning organisation or managing organisation."])
+ expect(parser.errors.where(:field_6, category: :setup).map(&:message)).to eq([I18n.t("validations.lettings.2024.bulk_upload.location.must_relate_to_org")])
end
end
@@ -991,7 +991,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "returns a setup error" do
expect(parser.errors[:field_5]).to be_blank
- expect(parser.errors.where(:field_6, category: :setup).map(&:message)).to eq(["Location code must relate to a location that is owned by the owning organisation or managing organisation."])
+ expect(parser.errors.where(:field_6, category: :setup).map(&:message)).to eq([I18n.t("validations.lettings.2024.bulk_upload.location.must_relate_to_org")])
end
end
@@ -1001,7 +1001,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
let(:attributes) { { bulk_upload:, field_4: "2", field_11: "2", field_5: "S#{other_scheme.id}", field_6: other_location.id, field_1: owning_org.old_visible_id, field_2: owning_org.old_visible_id } }
it "returns a setup error" do
- expect(parser.errors.where(:field_5, category: :setup).map(&:message)).to eq(["This scheme code does not belong to the owning organisation or managing organisation."])
+ expect(parser.errors.where(:field_5, category: :setup).map(&:message)).to eq([I18n.t("validations.lettings.2024.bulk_upload.scheme.must_relate_to_org")])
expect(parser.errors[:field_6]).to be_blank
end
end
@@ -1081,7 +1081,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "is not permitted" do
parser.valid?
- expect(parser.errors[:field_98]).to include('The reason for leaving must be "End of social or private sector tenancy - no fault", "End of social or private sector tenancy - evicted due to anti-social behaviour (ASB)", "End of social or private sector tenancy - evicted due to rent arrears" or "End of social or private sector tenancy - evicted for any other reason".')
+ expect(parser.errors[:field_98]).to include(I18n.t("validations.lettings.2024.bulk_upload.reason.renewal_reason_needed"))
end
end
end
@@ -1091,7 +1091,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "returns an error" do
parser.valid?
- expect(parser.errors[:field_98]).to include("Enter a valid value for what is the tenant’s main reason for the household leaving their last settled home?")
+ expect(parser.errors[:field_98]).to include(I18n.t("validations.lettings.2024.bulk_upload.invalid_option", question: "what is the tenant’s main reason for the household leaving their last settled home?"))
end
end
end
@@ -1317,7 +1317,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "returns an error" do
parser.valid?
- expect(parser.errors[:field_10]).to include("Tenancy start year must be 2 or 4 digits.")
+ expect(parser.errors[:field_10]).to include(I18n.t("validations.lettings.2024.bulk_upload.startdate.year_not_two_or_four_digits"))
end
end
@@ -1368,7 +1368,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "is not permitted as setup error" do
parser.valid?
- expect(parser.errors.where(:field_1, category: :setup).map(&:message)).to eql(["You must answer owning organisation."])
+ expect(parser.errors.where(:field_1, category: :setup).map(&:message)).to eql([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "owning organisation.")])
end
it "blocks log creation" do
@@ -1385,7 +1385,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
setup_errors = parser.errors.select { |e| e.options[:category] == :setup }
- expect(setup_errors.find { |e| e.attribute == :field_1 }.message).to eql("The owning organisation code is incorrect.")
+ expect(setup_errors.find { |e| e.attribute == :field_1 }.message).to eql(I18n.t("validations.lettings.2024.bulk_upload.owning_organisation.not_found"))
end
it "blocks log creation" do
@@ -1404,7 +1404,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
setup_errors = parser.errors.select { |e| e.options[:category] == :setup }
- expect(setup_errors.find { |e| e.attribute == :field_1 }.message).to eql("The owning organisation code provided is for an organisation that does not own stock.")
+ expect(setup_errors.find { |e| e.attribute == :field_1 }.message).to eql(I18n.t("validations.lettings.2024.bulk_upload.owning_organisation.not_stock_owner"))
end
it "blocks log creation" do
@@ -1423,7 +1423,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
setup_errors = parser.errors.select { |e| e.options[:category] == :setup }
- expect(setup_errors.find { |e| e.attribute == :field_1 }.message).to eql("You do not have permission to add logs for this owning organisation.")
+ expect(setup_errors.find { |e| e.attribute == :field_1 }.message).to eql(I18n.t("validations.lettings.2024.bulk_upload.owning_organisation.not_permitted.not_support"))
end
it "blocks log creation" do
@@ -1492,7 +1492,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
parser = described_class.new(attributes)
parser.valid?
expect(parser).to be_block_log_creation
- expect(parser.errors[:field_1]).to include("You do not have permission to add logs for this owning organisation.")
+ expect(parser.errors[:field_1]).to include(I18n.t("validations.lettings.2024.bulk_upload.owning_organisation.not_permitted.not_support"))
end
end
@@ -1510,7 +1510,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "does not block log creation and does not add an error to field_1" do
parser = described_class.new(attributes)
parser.valid?
- expect(parser.errors[:field_1]).not_to include("You do not have permission to add logs for this owning organisation.")
+ expect(parser.errors[:field_1]).not_to include(I18n.t("validations.lettings.2024.bulk_upload.owning_organisation.not_permitted"))
end
end
end
@@ -1524,7 +1524,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
setup_errors = parser.errors.select { |e| e.options[:category] == :setup }
- expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql("You must answer managing organisation.")
+ expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql(I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "managing organisation."))
end
it "blocks log creation" do
@@ -1541,7 +1541,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
setup_errors = parser.errors.select { |e| e.options[:category] == :setup }
- expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql("The managing organisation code is incorrect.")
+ expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql(I18n.t("validations.lettings.2024.bulk_upload.managing_organisation.not_found"))
end
it "blocks log creation" do
@@ -1560,7 +1560,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
setup_errors = parser.errors.select { |e| e.options[:category] == :setup }
- expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql("This managing organisation does not have a relationship with the owning organisation.")
+ expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql(I18n.t("validations.lettings.2024.bulk_upload.managing_organisation.no_relationship"))
end
it "blocks log creation" do
@@ -1576,7 +1576,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "is reported as a setup error" do
parser.valid?
- expect(parser.errors.where(:field_4, category: :setup).map(&:message)).to eql(["You must answer needs type."])
+ expect(parser.errors.where(:field_4, category: :setup).map(&:message)).to eql([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "needs type.")])
end
end
end
@@ -1587,7 +1587,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "has setup errors on the field" do
parser.valid?
- expect(parser.errors.where(:field_7, category: :setup).map(&:message)).to eql(["You must answer property renewal."])
+ expect(parser.errors.where(:field_7, category: :setup).map(&:message)).to eql([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "property renewal.")])
end
end
@@ -1596,7 +1596,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "adds a setup error" do
parser.valid?
- expect(parser.errors.where(:field_7, category: :setup).map(&:message)).to include("Enter a valid value for is this letting a renewal?")
+ expect(parser.errors.where(:field_7, category: :setup).map(&:message)).to include(I18n.t("validations.lettings.2024.bulk_upload.invalid_option", question: "is this letting a renewal?"))
end
end
end
@@ -1627,10 +1627,10 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "adds errors to missing key address fields" do
parser.valid?
- expect(parser.errors[:field_17]).to eql(["You must answer address line 1."])
- expect(parser.errors[:field_19]).to eql(["You must answer town or city."])
- expect(parser.errors[:field_21]).to eql(["You must answer part 1 of postcode."])
- expect(parser.errors[:field_22]).to eql(["You must answer part 2 of postcode."])
+ expect(parser.errors[:field_17]).to eql([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "address line 1.")])
+ expect(parser.errors[:field_19]).to eql([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "town or city.")])
+ expect(parser.errors[:field_21]).to eql([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "part 1 of postcode.")])
+ expect(parser.errors[:field_22]).to eql([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "part 2 of postcode.")])
end
end
@@ -1658,11 +1658,11 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "adds appropriate errors to UPRN and key address fields" do
parser.valid?
- expect(parser.errors[:field_16]).to eql(["You must answer UPRN."])
- expect(parser.errors[:field_17]).to eql(["You must answer address line 1."])
- expect(parser.errors[:field_19]).to eql(["You must answer town or city."])
- expect(parser.errors[:field_21]).to eql(["You must answer part 1 of postcode."])
- expect(parser.errors[:field_22]).to eql(["You must answer part 2 of postcode."])
+ expect(parser.errors[:field_16]).to eql([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "UPRN.")])
+ expect(parser.errors[:field_17]).to eql([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "address line 1.")])
+ expect(parser.errors[:field_19]).to eql([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "town or city.")])
+ expect(parser.errors[:field_21]).to eql([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "part 1 of postcode.")])
+ expect(parser.errors[:field_22]).to eql([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "part 2 of postcode.")])
end
end
@@ -1671,8 +1671,8 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "adds errors to UPRN and the missing key address field" do
parser.valid?
- expect(parser.errors[:field_16]).to eql(["You must answer UPRN."])
- expect(parser.errors[:field_17]).to eql(["You must answer address line 1."])
+ expect(parser.errors[:field_16]).to eql([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "UPRN.")])
+ expect(parser.errors[:field_17]).to eql([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "address line 1.")])
expect(parser.errors[:field_19]).to be_empty
expect(parser.errors[:field_21]).to be_empty
expect(parser.errors[:field_22]).to be_empty
@@ -1706,7 +1706,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
parser.valid?
expect(parser.errors[:field_16]).to be_empty
%i[field_17 field_18 field_19 field_20 field_21 field_22].each do |field|
- expect(parser.errors[field]).to eql(["We could not find this address. Check the address data in your CSV file is correct and complete, or select the correct address using the CORE site."])
+ expect(parser.errors[field]).to eql([I18n.t("validations.lettings.2024.bulk_upload.address.not_found")])
end
end
end
@@ -1721,7 +1721,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
parser.valid?
expect(parser.errors[:field_16]).to be_empty
%i[field_17 field_18 field_19 field_20 field_21 field_22].each do |field|
- expect(parser.errors[field]).to eql(["We could not find this address. Check the address data in your CSV file is correct and complete, or select the correct address using the CORE site."])
+ expect(parser.errors[field]).to eql([I18n.t("validations.lettings.2024.bulk_upload.address.not_found")])
end
end
end
@@ -1765,7 +1765,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "populates with correct error message" do
parser.valid?
- expect(parser.errors[:field_27]).to eql(["You must answer type of building."])
+ expect(parser.errors[:field_27]).to eql([I18n.t("validations.lettings.2024.bulk_upload.not_answered", question: "type of building.")])
end
end
end
@@ -1864,7 +1864,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "adds an error to field_45" do
parser.valid?
- expect(parser.errors["field_45"]).to include("Select a valid nationality.")
+ expect(parser.errors["field_45"]).to include(I18n.t("validations.lettings.2024.bulk_upload.nationality.invalid"))
end
end
end
@@ -1881,8 +1881,8 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "populates with correct error message" do
parser.valid?
- expect(parser.errors.where(:field_42, category: :soft_validation).first.message).to eql("You told us this person is aged 22 years and retired.")
- expect(parser.errors.where(:field_46, category: :soft_validation).first.message).to eql("You told us this person is aged 22 years and retired.")
+ expect(parser.errors.where(:field_42, category: :soft_validation).first.message).to eql("You told us this person is aged 22 years and retired. The minimum expected retirement age in England is 66.")
+ expect(parser.errors.where(:field_46, category: :soft_validation).first.message).to eql("You told us this person is aged 22 years and retired. The minimum expected retirement age in England is 66.")
end
end
@@ -2185,7 +2185,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "adds an error" do
parser.valid?
- expect(parser.errors[:field_112]).to include("Enter a valid value for was the letting made under the Choice-Based Lettings (CBL)?")
+ expect(parser.errors[:field_112]).to include(I18n.t("validations.lettings.2024.bulk_upload.invalid_option", question: "was the letting made under the Choice-Based Lettings (CBL)?"))
end
end
end
@@ -2212,7 +2212,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "adds an error" do
parser.valid?
- expect(parser.errors[:field_114]).to include("Enter a valid value for was the letting made under the Common Housing Register (CHR)?")
+ expect(parser.errors[:field_114]).to include(I18n.t("validations.lettings.2024.bulk_upload.invalid_option", question: "was the letting made under the Common Housing Register (CHR)?"))
end
end
end
@@ -2239,7 +2239,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "adds an error" do
parser.valid?
- expect(parser.errors[:field_113]).to include("Enter a valid value for was the letting made under the Common Allocation Policy (CAP)?")
+ expect(parser.errors[:field_113]).to include(I18n.t("validations.lettings.2024.bulk_upload.invalid_option", question: "was the letting made under the Common Allocation Policy (CAP)?"))
end
end
end
@@ -2266,7 +2266,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "adds an error" do
parser.valid?
- expect(parser.errors[:field_115]).to include("Enter a valid value for was the letting made under the Accessible Register?")
+ expect(parser.errors[:field_115]).to include(I18n.t("validations.lettings.2024.bulk_upload.invalid_option", question: "was the letting made under the Accessible Register?"))
end
end
end
@@ -2603,10 +2603,10 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "adds an error to all missing charges" do
parser.valid?
- expect(parser.errors[:field_125]).to eql(["Please enter the basic rent. If there is no basic rent, please enter '0'."])
- expect(parser.errors[:field_126]).to eql(["Please enter the service charge. If there is no service charge, please enter '0'."])
- expect(parser.errors[:field_127]).to eql(["Please enter the personal service charge. If there is no personal service charge, please enter '0'."])
- expect(parser.errors[:field_128]).to eql(["Please enter the basic rent. If there is no basic rent, please enter '0'.", "Please enter the service charge. If there is no service charge, please enter '0'.", "Please enter the personal service charge. If there is no personal service charge, please enter '0'."])
+ expect(parser.errors[:field_125]).to eql([I18n.t("validations.lettings.2024.bulk_upload.charges.missing_charges", sentence_fragment: "basic rent")])
+ expect(parser.errors[:field_126]).to eql([I18n.t("validations.lettings.2024.bulk_upload.charges.missing_charges", sentence_fragment: "service charge")])
+ expect(parser.errors[:field_127]).to eql([I18n.t("validations.lettings.2024.bulk_upload.charges.missing_charges", sentence_fragment: "personal service charge")])
+ expect(parser.errors[:field_128]).to eql([I18n.t("validations.lettings.2024.bulk_upload.charges.missing_charges", sentence_fragment: "basic rent"), I18n.t("validations.lettings.2024.bulk_upload.charges.missing_charges", sentence_fragment: "service charge"), I18n.t("validations.lettings.2024.bulk_upload.charges.missing_charges", sentence_fragment: "personal service charge")])
end
end
end
@@ -2627,10 +2627,10 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "adds an error to all charges" do
parser.valid?
- expect(parser.errors[:field_125]).to eql(["Please enter the support charge. If there is no support charge, please enter '0'."])
- expect(parser.errors[:field_126]).to eql(["Please enter the support charge. If there is no support charge, please enter '0'."])
- expect(parser.errors[:field_127]).to eql(["Please enter the support charge. If there is no support charge, please enter '0'."])
- expect(parser.errors[:field_128]).to eql(["Please enter the support charge. If there is no support charge, please enter '0'."])
+ expect(parser.errors[:field_125]).to eql([I18n.t("validations.lettings.2024.bulk_upload.charges.missing_charges", sentence_fragment: "support charge")])
+ expect(parser.errors[:field_126]).to eql([I18n.t("validations.lettings.2024.bulk_upload.charges.missing_charges", sentence_fragment: "support charge")])
+ expect(parser.errors[:field_127]).to eql([I18n.t("validations.lettings.2024.bulk_upload.charges.missing_charges", sentence_fragment: "support charge")])
+ expect(parser.errors[:field_128]).to eql([I18n.t("validations.lettings.2024.bulk_upload.charges.missing_charges", sentence_fragment: "support charge")])
end
end
end
@@ -2857,8 +2857,8 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "sets error on housingneeds a and b" do
parser.valid?
- expect(parser.errors[:field_79]).to include("Only one disabled access need: fully wheelchair-accessible housing, wheelchair access to essential rooms or level access housing, can be selected.")
- expect(parser.errors[:field_80]).to include("Only one disabled access need: fully wheelchair-accessible housing, wheelchair access to essential rooms or level access housing, can be selected.")
+ expect(parser.errors[:field_79]).to include(I18n.t("validations.lettings.2024.bulk_upload.housingneeds_type.only_one_option_permitted"))
+ expect(parser.errors[:field_80]).to include(I18n.t("validations.lettings.2024.bulk_upload.housingneeds_type.only_one_option_permitted"))
expect(parser.errors[:field_81]).to be_blank
end
end
@@ -2868,8 +2868,8 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "sets error on housingneeds a and c" do
parser.valid?
- expect(parser.errors[:field_79]).to include("Only one disabled access need: fully wheelchair-accessible housing, wheelchair access to essential rooms or level access housing, can be selected.")
- expect(parser.errors[:field_81]).to include("Only one disabled access need: fully wheelchair-accessible housing, wheelchair access to essential rooms or level access housing, can be selected.")
+ expect(parser.errors[:field_79]).to include(I18n.t("validations.lettings.2024.bulk_upload.housingneeds_type.only_one_option_permitted"))
+ expect(parser.errors[:field_81]).to include(I18n.t("validations.lettings.2024.bulk_upload.housingneeds_type.only_one_option_permitted"))
expect(parser.errors[:field_80]).to be_blank
end
end
@@ -2879,8 +2879,8 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "sets error on housingneeds b and c" do
parser.valid?
- expect(parser.errors[:field_80]).to include("Only one disabled access need: fully wheelchair-accessible housing, wheelchair access to essential rooms or level access housing, can be selected.")
- expect(parser.errors[:field_81]).to include("Only one disabled access need: fully wheelchair-accessible housing, wheelchair access to essential rooms or level access housing, can be selected.")
+ expect(parser.errors[:field_80]).to include(I18n.t("validations.lettings.2024.bulk_upload.housingneeds_type.only_one_option_permitted"))
+ expect(parser.errors[:field_81]).to include(I18n.t("validations.lettings.2024.bulk_upload.housingneeds_type.only_one_option_permitted"))
expect(parser.errors[:field_79]).to be_blank
end
end
@@ -2890,8 +2890,8 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "sets error on housingneeds a and g" do
parser.valid?
- expect(parser.errors[:field_83]).to include("No disabled access needs can’t be selected if you have selected fully wheelchair-accessible housing, wheelchair access to essential rooms, level access housing or other disabled access needs.")
- expect(parser.errors[:field_79]).to include("No disabled access needs can’t be selected if you have selected fully wheelchair-accessible housing, wheelchair access to essential rooms, level access housing or other disabled access needs.")
+ expect(parser.errors[:field_83]).to include(I18n.t("validations.lettings.2024.bulk_upload.housingneeds.no_disabled_needs_conjunction"))
+ expect(parser.errors[:field_79]).to include(I18n.t("validations.lettings.2024.bulk_upload.housingneeds.no_disabled_needs_conjunction"))
expect(parser.errors[:field_80]).to be_blank
expect(parser.errors[:field_81]).to be_blank
end
@@ -2914,8 +2914,8 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "sets error on housingneeds a and h" do
parser.valid?
- expect(parser.errors[:field_84]).to include("Don’t know disabled access needs can’t be selected if you have selected fully wheelchair-accessible housing, wheelchair access to essential rooms, level access housing or other disabled access needs.")
- expect(parser.errors[:field_79]).to include("Don’t know disabled access needs can’t be selected if you have selected fully wheelchair-accessible housing, wheelchair access to essential rooms, level access housing or other disabled access needs.")
+ expect(parser.errors[:field_84]).to include(I18n.t("validations.lettings.2024.bulk_upload.housingneeds.dont_know_disabled_needs_conjunction"))
+ expect(parser.errors[:field_79]).to include(I18n.t("validations.lettings.2024.bulk_upload.housingneeds.dont_know_disabled_needs_conjunction"))
expect(parser.errors[:field_80]).to be_blank
expect(parser.errors[:field_81]).to be_blank
end
diff --git a/spec/services/bulk_upload/sales/validator_spec.rb b/spec/services/bulk_upload/sales/validator_spec.rb
index d196126c9..c275ce681 100644
--- a/spec/services/bulk_upload/sales/validator_spec.rb
+++ b/spec/services/bulk_upload/sales/validator_spec.rb
@@ -15,7 +15,7 @@ RSpec.describe BulkUpload::Sales::Validator do
context "when file is empty" do
it "is not valid" do
expect(validator).not_to be_valid
- expect(validator.errors["base"]).to eql(["Template is blank - The template must be filled in for us to create the logs and check if data is correct."])
+ expect(validator.errors["base"]).to eql([I18n.t("validations.sales.2024.bulk_upload.blank_file")])
end
end
@@ -27,7 +27,7 @@ RSpec.describe BulkUpload::Sales::Validator do
it "is not valid" do
expect(validator).not_to be_valid
- expect(validator.errors["base"]).to eql(["Template is blank - The template must be filled in for us to create the logs and check if data is correct."])
+ expect(validator.errors["base"]).to eql([I18n.t("validations.sales.2024.bulk_upload.blank_file")])
end
end
@@ -54,7 +54,7 @@ RSpec.describe BulkUpload::Sales::Validator do
it "is not valid" do
expect(validator).not_to be_valid
- expect(validator.errors["base"]).to eql(["Incorrect sale dates, please ensure you have used the correct template."])
+ expect(validator.errors["base"]).to eql([I18n.t("validations.sales.2024.bulk_upload.wrong_template.wrong_template")])
end
end
diff --git a/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb b/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb
index 70bd923e6..2994a418e 100644
--- a/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb
+++ b/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb
@@ -406,7 +406,7 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do
let(:attributes) { setup_section_params.merge(field_1: nil) }
it "is not permitted as setup error" do
- expect(parser.errors.where(:field_1, category: :setup).map(&:message)).to eql(["You must answer owning organisation."])
+ expect(parser.errors.where(:field_1, category: :setup).map(&:message)).to eql([I18n.t("validations.sales.2023.bulk_upload.not_answered", question: "owning organisation.")])
end
it "blocks log creation" do
@@ -418,7 +418,7 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do
let(:attributes) { { bulk_upload:, field_1: "donotexist" } }
it "is not permitted as a setup error" do
- expect(parser.errors.where(:field_1, category: :setup).map(&:message)).to eql(["You must answer owning organisation."])
+ expect(parser.errors.where(:field_1, category: :setup).map(&:message)).to eql([I18n.t("validations.sales.2023.bulk_upload.not_answered", question: "owning organisation.")])
end
it "blocks log creation" do
@@ -432,7 +432,7 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do
let(:attributes) { { bulk_upload:, field_1: unaffiliated_org.old_visible_id } }
it "is not permitted as setup error" do
- expect(parser.errors.where(:field_1, category: :setup).map(&:message)).to eql(["You do not have permission to add logs for this owning organisation."])
+ expect(parser.errors.where(:field_1, category: :setup).map(&:message)).to eql([I18n.t("validations.sales.2023.bulk_upload.owning_organisation.not_permitted")])
end
it "blocks log creation" do
@@ -608,7 +608,7 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do
it "returns a setup error" do
parser.valid?
- expect(parser.errors.where(:field_5, category: :setup).map(&:message)).to include("Sale completion year must be 2 or 4 digits.")
+ expect(parser.errors.where(:field_5, category: :setup).map(&:message)).to include(I18n.t("validations.sales.2023.bulk_upload.saledate.year_not_two_or_four_digits"))
end
end
@@ -672,7 +672,7 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do
it "adds an error to all (and only) the fields used to determine duplicates" do
parser.valid?
- error_message = "This is a duplicate log."
+ error_message = I18n.t("validations.sales.2023.bulk_upload.duplicate")
[
:field_1, # Owning org
@@ -932,7 +932,7 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do
it "does not set ##{age}" do
parser.valid?
- expect(parser.errors[field.to_sym]).to include(/You must answer/)
+ expect(parser.errors[field.to_sym]).to include(/#{I18n.t("validations.sales.2023.bulk_upload.not_answered", question: "")}/)
end
end
end
@@ -980,7 +980,7 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do
let(:attributes) { valid_attributes.merge({ field_35: "9" }) }
it "a custom validation is applied" do
- validation_message = "Buyer 1 cannot be a child under 16."
+ validation_message = I18n.t("validations.sales.2023.bulk_upload.ecstat1.child_under_16")
expect(parser.errors[:field_35]).to include validation_message
end
end
@@ -1052,7 +1052,7 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do
let(:attributes) { setup_section_params.merge(field_105: "4") }
it "returns correct errors" do
- expect(parser.errors[:field_105]).to include("Enter a valid value for was a mortgage used for the purchase of this property? - Shared ownership.")
+ expect(parser.errors[:field_105]).to include(I18n.t("validations.sales.2023.bulk_upload.invalid_option", question: "was a mortgage used for the purchase of this property? - Shared ownership."))
parser.log.blank_invalid_non_setup_fields!
parser.log.save!
expect(parser.log.mortgageused).to be_nil
@@ -1420,7 +1420,7 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do
parser.valid?
setup_errors = parser.errors.select { |e| e.options[:category] == :setup }
- expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql("This user belongs to an organisation that does not have a relationship with the owning organisation.")
+ expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql(I18n.t("validations.sales.2023.bulk_upload.assigned_to.managing_organisation_not_related"))
end
it "blocks log creation" do
@@ -1442,7 +1442,7 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do
parser.valid?
setup_errors = parser.errors.select { |e| e.options[:category] == :setup }
- expect(setup_errors.find { |e| e.attribute == :field_1 }.message).to eql("The owning organisation code provided is for an organisation that does not own stock.")
+ expect(setup_errors.find { |e| e.attribute == :field_1 }.message).to eql(I18n.t("validations.sales.2023.bulk_upload.owning_organisation.not_stock_owner"))
end
it "blocks log creation" do
diff --git a/spec/services/bulk_upload/sales/year2024/row_parser_spec.rb b/spec/services/bulk_upload/sales/year2024/row_parser_spec.rb
index d1d4aeb53..4844ce490 100644
--- a/spec/services/bulk_upload/sales/year2024/row_parser_spec.rb
+++ b/spec/services/bulk_upload/sales/year2024/row_parser_spec.rb
@@ -301,7 +301,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "fetches the question's check_answer_label if it exists" do
parser.valid?
- expect(parser.errors[:field_32]).to eql(["You must answer buyer 1’s gender identity."])
+ expect(parser.errors[:field_32]).to eql([I18n.t("validations.not_answered", question: "buyer 1’s gender identity.")])
end
end
@@ -310,7 +310,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "only has one error added to the field" do
parser.valid?
- expect(parser.errors[:field_23]).to eql(["You must answer address line 1."])
+ expect(parser.errors[:field_23]).to eql([I18n.t("validations.sales.2024.bulk_upload.not_answered", question: "address line 1.")])
end
end
@@ -320,7 +320,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "does not add an additional error" do
parser.valid?
expect(parser.errors[:field_35].length).to eq(1)
- expect(parser.errors[:field_35]).to include(match "Enter a valid value for")
+ expect(parser.errors[:field_35]).to include(match I18n.t("validations.sales.2024.bulk_upload.invalid_option", question: ""))
end
end
end
@@ -463,7 +463,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "is not permitted as setup error" do
parser.valid?
- expect(parser.errors.where(:field_1, category: :setup).map(&:message)).to eql(["You must answer owning organisation."])
+ expect(parser.errors.where(:field_1, category: :setup).map(&:message)).to eql([I18n.t("validations.sales.2024.bulk_upload.not_answered", question: "owning organisation.")])
end
it "blocks log creation" do
@@ -477,7 +477,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "is not permitted as a setup error" do
parser.valid?
- expect(parser.errors.where(:field_1, category: :setup).map(&:message)).to eql(["The owning organisation code is incorrect."])
+ expect(parser.errors.where(:field_1, category: :setup).map(&:message)).to eql([I18n.t("validations.sales.2024.bulk_upload.owning_organisation.not_found")])
end
it "blocks log creation" do
@@ -493,7 +493,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "is not permitted as setup error" do
parser.valid?
- expect(parser.errors.where(:field_1, category: :setup).map(&:message)).to eql(["You do not have permission to add logs for this owning organisation."])
+ expect(parser.errors.where(:field_1, category: :setup).map(&:message)).to eql([I18n.t("validations.sales.2024.bulk_upload.owning_organisation.not_permitted.not_support")])
end
it "blocks log creation" do
@@ -580,7 +580,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
parser = described_class.new(attributes)
parser.valid?
expect(parser).to be_block_log_creation
- expect(parser.errors[:field_1]).to include("You do not have permission to add logs for this owning organisation.")
+ expect(parser.errors[:field_1]).to include(I18n.t("validations.sales.2024.bulk_upload.owning_organisation.not_permitted.not_support"))
end
end
@@ -598,7 +598,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "does not block log creation and does not add an error to field_1" do
parser = described_class.new(attributes)
parser.valid?
- expect(parser.errors[:field_1]).not_to include("You do not have permission to add logs for this owning organisation.")
+ expect(parser.errors[:field_1]).not_to include(I18n.t("validations.sales.2024.bulk_upload.owning_organisation.not_permitted.not_support"))
end
end
end
@@ -631,7 +631,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "is not permitted" do
parser.valid?
expect(parser.errors[:field_3]).to be_present
- expect(parser.errors[:field_3]).to include("You must answer what is the CORE username of the account this sales log should be assigned to?")
+ expect(parser.errors[:field_3]).to include(I18n.t("validations.sales.2024.bulk_upload.not_answered", question: "what is the CORE username of the account this sales log should be assigned to?"))
end
it "blocks log creation" do
@@ -736,7 +736,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "returns a setup error" do
parser.valid?
- expect(parser.errors.where(:field_6, category: :setup).map(&:message)).to include("Sale completion year must be 2 or 4 digits.")
+ expect(parser.errors.where(:field_6, category: :setup).map(&:message)).to include(I18n.t("validations.sales.2024.bulk_upload.saledate.year_not_two_or_four_digits"))
end
end
@@ -802,7 +802,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "adds an error to all (and only) the fields used to determine duplicates" do
parser.valid?
- error_message = "This is a duplicate log."
+ error_message = I18n.t("validations.sales.2024.bulk_upload.duplicate")
[
:field_1, # Owning org
@@ -891,7 +891,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "returns correct error" do
parser.valid?
- expect(parser.errors.where(:field_116).map(&:message)).to include("Percentage discount must be between 0% and 70%.")
+ expect(parser.errors.where(:field_116).map(&:message)).to include(I18n.t("validations.sales.2024.bulk_upload.numeric.within_range", field: "Percentage discount", min: "0%", max: "70%"))
end
end
@@ -909,7 +909,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "returns correct error" do
parser.valid?
- expect(parser.errors.where(:field_116).map(&:message)).to include("Percentage discount must be between 0% and 70%.")
+ expect(parser.errors.where(:field_116).map(&:message)).to include(I18n.t("validations.sales.2024.bulk_upload.numeric.within_range", field: "Percentage discount", min: "0%", max: "70%"))
end
end
end
@@ -942,7 +942,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "returns setup error" do
parser.valid?
- expect(parser.errors.where(:field_13).map(&:message)).to include("Enter a valid value for is the buyer a company?")
+ expect(parser.errors.where(:field_13).map(&:message)).to include(I18n.t("validations.invalid_option", question: "is the buyer a company?"))
expect(parser.errors.where(:field_13, category: :setup)).to be_present
end
end
@@ -954,7 +954,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "returns setup error" do
parser.valid?
- expect(parser.errors.where(:field_14).map(&:message)).to eql(["Enter a valid value for will the buyers live in the property?"])
+ expect(parser.errors.where(:field_14).map(&:message)).to eql([I18n.t("validations.invalid_option", question: "will the buyers live in the property?")])
expect(parser.errors.where(:field_14, category: :setup)).to be_present
end
end
@@ -1011,10 +1011,10 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "adds errors to missing key address fields" do
parser.valid?
- expect(parser.errors[:field_23]).to eql(["You must answer address line 1."])
- expect(parser.errors[:field_25]).to eql(["You must answer town or city."])
- expect(parser.errors[:field_27]).to eql(["You must answer part 1 of postcode."])
- expect(parser.errors[:field_28]).to eql(["You must answer part 2 of postcode."])
+ expect(parser.errors[:field_23]).to eql([I18n.t("validations.sales.2024.bulk_upload.not_answered", question: "address line 1.")])
+ expect(parser.errors[:field_25]).to eql([I18n.t("validations.sales.2024.bulk_upload.not_answered", question: "town or city.")])
+ expect(parser.errors[:field_27]).to eql([I18n.t("validations.sales.2024.bulk_upload.not_answered", question: "part 1 of postcode.")])
+ expect(parser.errors[:field_28]).to eql([I18n.t("validations.sales.2024.bulk_upload.not_answered", question: "part 2 of postcode.")])
end
end
@@ -1042,11 +1042,11 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "adds appropriate errors to UPRN and key address fields" do
parser.valid?
- expect(parser.errors[:field_22]).to eql(["You must answer UPRN."])
- expect(parser.errors[:field_23]).to eql(["You must answer address line 1."])
- expect(parser.errors[:field_25]).to eql(["You must answer town or city."])
- expect(parser.errors[:field_27]).to eql(["You must answer part 1 of postcode."])
- expect(parser.errors[:field_28]).to eql(["You must answer part 2 of postcode."])
+ expect(parser.errors[:field_22]).to eql([I18n.t("validations.sales.2024.bulk_upload.not_answered", question: "UPRN.")])
+ expect(parser.errors[:field_23]).to eql([I18n.t("validations.sales.2024.bulk_upload.not_answered", question: "address line 1.")])
+ expect(parser.errors[:field_25]).to eql([I18n.t("validations.sales.2024.bulk_upload.not_answered", question: "town or city.")])
+ expect(parser.errors[:field_27]).to eql([I18n.t("validations.sales.2024.bulk_upload.not_answered", question: "part 1 of postcode.")])
+ expect(parser.errors[:field_28]).to eql([I18n.t("validations.sales.2024.bulk_upload.not_answered", question: "part 2 of postcode.")])
end
end
@@ -1055,8 +1055,8 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "adds errors to UPRN and the missing key address field" do
parser.valid?
- expect(parser.errors[:field_22]).to eql(["You must answer UPRN."])
- expect(parser.errors[:field_23]).to eql(["You must answer address line 1."])
+ expect(parser.errors[:field_22]).to eql([I18n.t("validations.sales.2024.bulk_upload.not_answered", question: "UPRN.")])
+ expect(parser.errors[:field_23]).to eql([I18n.t("validations.sales.2024.bulk_upload.not_answered", question: "address line 1.")])
expect(parser.errors[:field_25]).to be_empty
expect(parser.errors[:field_27]).to be_empty
expect(parser.errors[:field_28]).to be_empty
@@ -1090,7 +1090,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
parser.valid?
expect(parser.errors[:field_22]).to be_empty
%i[field_23 field_24 field_25 field_26 field_27 field_28].each do |field|
- expect(parser.errors[field]).to eql(["We could not find this address. Check the address data in your CSV file is correct and complete, or select the correct address using the CORE site."])
+ expect(parser.errors[field]).to eql([I18n.t("validations.sales.2024.bulk_upload.address.not_found")])
end
end
end
@@ -1105,7 +1105,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
parser.valid?
expect(parser.errors[:field_22]).to be_empty
%i[field_23 field_24 field_25 field_26 field_27 field_28].each do |field|
- expect(parser.errors[field]).to eql(["We could not find this address. Check the address data in your CSV file is correct and complete, or select the correct address using the CORE site."])
+ expect(parser.errors[field]).to eql([I18n.t("validations.sales.2024.bulk_upload.address.not_found")])
end
end
end
@@ -1218,8 +1218,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "a custom validation is applied" do
parser.valid?
- validation_message = "Buyer 2 cannot have a working situation of child under 16."
- expect(parser.errors[:field_42]).to include validation_message
+ expect(parser.errors[:field_42]).to include I18n.t("validations.sales.2024.bulk_upload.ecstat2.buyer_cannot_be_child")
end
end
@@ -1240,9 +1239,8 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "a custom validation is applied" do
parser.valid?
- validation_message = "Buyer 2's age cannot be 16 or over if their working situation is child under 16."
- expect(parser.errors[:field_42]).to include validation_message
- expect(parser.errors[:field_38]).to include validation_message
+ expect(parser.errors[:field_42]).to include I18n.t("validations.sales.2024.bulk_upload.ecstat2.buyer_cannot_be_over_16_and_child")
+ expect(parser.errors[:field_38]).to include I18n.t("validations.sales.2024.bulk_upload.age2.buyer_cannot_be_over_16_and_child")
end
end
@@ -1264,8 +1262,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "a custom validation is applied" do
parser.valid?
- validation_message = "Buyer 1 cannot have a working situation of child under 16."
- expect(parser.errors[:field_35]).to include validation_message
+ expect(parser.errors[:field_35]).to include I18n.t("validations.sales.2024.bulk_upload.ecstat1.buyer_cannot_be_child")
end
end
@@ -1286,9 +1283,8 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "a custom validation is applied" do
parser.valid?
- validation_message = "Buyer 1's age cannot be 16 or over if their working situation is child under 16."
- expect(parser.errors[:field_35]).to include validation_message
- expect(parser.errors[:field_31]).to include validation_message
+ expect(parser.errors[:field_35]).to include I18n.t("validations.sales.2024.bulk_upload.ecstat1.buyer_cannot_be_over_16_and_child")
+ expect(parser.errors[:field_31]).to include I18n.t("validations.sales.2024.bulk_upload.age1.buyer_cannot_be_over_16_and_child")
end
end
end
@@ -1333,7 +1329,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "returns correct errors" do
parser.valid?
- expect(parser.errors[:field_103]).to include("Enter a valid value for was a mortgage used for the purchase of this property? - Shared ownership.")
+ expect(parser.errors[:field_103]).to include(I18n.t("validations.sales.2024.bulk_upload.invalid_option", question: "was a mortgage used for the purchase of this property? - Shared ownership."))
parser.log.blank_invalid_non_setup_fields!
parser.log.save!
@@ -1370,7 +1366,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "returns correct errors" do
parser.valid?
- expect(parser.errors[:field_103]).to include("Enter a valid value for was a mortgage used for the purchase of this property?")
+ expect(parser.errors[:field_103]).to include(I18n.t("validations.invalid_option", question: "was a mortgage used for the purchase of this property?"))
parser.log.blank_invalid_non_setup_fields!
parser.log.save!
@@ -1383,7 +1379,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "returns correct errors" do
parser.valid?
- expect(parser.errors[:field_103]).to include("Enter a valid value for was a mortgage used for the purchase of this property?")
+ expect(parser.errors[:field_103]).to include(I18n.t("validations.invalid_option", question: "was a mortgage used for the purchase of this property?"))
parser.log.blank_invalid_non_setup_fields!
parser.log.save!
@@ -1440,7 +1436,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
it "does not allow 3 (don't know) as an option for discounted ownership" do
parser.valid?
- expect(parser.errors[:field_117]).to include("Enter a valid value for was a mortgage used for the purchase of this property?")
+ expect(parser.errors[:field_117]).to include(I18n.t("validations.invalid_option", question: "was a mortgage used for the purchase of this property?"))
parser.log.blank_invalid_non_setup_fields!
parser.log.save!
@@ -1696,7 +1692,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
parser.valid?
expect(parser.log.nationality_all).to be(nil)
expect(parser.log.nationality_all_group).to be(nil)
- expect(parser.errors["field_34"]).to include("Select a valid nationality.")
+ expect(parser.errors["field_34"]).to include(I18n.t("validations.sales.2024.bulk_upload.nationality.invalid"))
end
end
end
@@ -1781,7 +1777,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
parser.valid?
expect(parser.log.nationality_all_buyer2).to be(nil)
expect(parser.log.nationality_all_buyer2_group).to be(nil)
- expect(parser.errors["field_41"]).to include("Select a valid nationality.")
+ expect(parser.errors["field_41"]).to include(I18n.t("validations.sales.2024.bulk_upload.nationality.invalid"))
end
end
end
@@ -1983,7 +1979,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
parser.valid?
setup_errors = parser.errors.select { |e| e.options[:category] == :setup }
- expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql("You must answer reported by.")
+ expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql(I18n.t("validations.not_answered", question: "reported by."))
end
it "blocks log creation" do
@@ -1999,7 +1995,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
parser.valid?
setup_errors = parser.errors.select { |e| e.options[:category] == :setup }
- expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql("You must answer reported by.")
+ expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql(I18n.t("validations.not_answered", question: "reported by."))
end
it "blocks log creation" do
@@ -2017,7 +2013,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
parser.valid?
setup_errors = parser.errors.select { |e| e.options[:category] == :setup }
- expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql("This organisation does not have a relationship with the owning organisation.")
+ expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql(I18n.t("validations.sales.2024.bulk_upload.assigned_to.managing_organisation_not_related"))
end
it "blocks log creation" do
@@ -2039,7 +2035,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do
parser.valid?
setup_errors = parser.errors.select { |e| e.options[:category] == :setup }
- expect(setup_errors.find { |e| e.attribute == :field_1 }.message).to eql("The owning organisation code provided is for an organisation that does not own stock.")
+ expect(setup_errors.find { |e| e.attribute == :field_1 }.message).to eql(I18n.t("validations.sales.2024.bulk_upload.owning_organisation.not_stock_owner"))
end
it "blocks log creation" do
diff --git a/spec/services/documentation_generator_spec.rb b/spec/services/documentation_generator_spec.rb
index 47bc813f7..6f4714d01 100644
--- a/spec/services/documentation_generator_spec.rb
+++ b/spec/services/documentation_generator_spec.rb
@@ -89,7 +89,7 @@ describe DocumentationGenerator do
end
describe ":describe_soft_validations" do
- let(:all_validation_methods) { ["rent_in_soft_min_range?"] }
+ let(:all_validation_methods) { ["rent_soft_validation_triggered?"] }
let(:response) do
{ "choices" => [{ "message" => { "tool_calls" => [{ "function" => { "arguments" =>
"{\n \"description\": \"Validates the format.\",\n \"validation_type\": \"format\",\n \"other_validated_models\": \"User\"}" } }] } }] }
@@ -100,7 +100,7 @@ describe DocumentationGenerator do
it "creates new validation documentation records" do
expect { described_class.new.describe_soft_validations(client, all_validation_methods, all_helper_methods, log_type) }.to change(LogValidation, :count)
- expect(LogValidation.where(validation_name: "rent_in_soft_min_range?").count).to be_positive
+ expect(LogValidation.where(validation_name: "rent_soft_validation_triggered?").count).to be_positive
any_validation = LogValidation.first
expect(any_validation.description).to eq("Validates the format.")
expect(any_validation.field).not_to be_empty
diff --git a/spec/services/merge/merge_organisations_service_spec.rb b/spec/services/merge/merge_organisations_service_spec.rb
index 6eea8635f..7163a142f 100644
--- a/spec/services/merge/merge_organisations_service_spec.rb
+++ b/spec/services/merge/merge_organisations_service_spec.rb
@@ -1317,9 +1317,9 @@ RSpec.describe Merge::MergeOrganisationsService do
merging_organisation.reload
expect(new_absorbing_organisation.owned_lettings_logs.count).to eq(2)
expect(new_absorbing_organisation.managed_lettings_logs.count).to eq(1)
- expect(new_absorbing_organisation.owned_lettings_logs.find(owned_lettings_log.id).scheme).to eq(new_absorbing_organisation.owned_schemes.first)
- expect(new_absorbing_organisation.owned_lettings_logs.find(owned_lettings_log.id).location).to eq(new_absorbing_organisation.owned_schemes.first.locations.first)
- expect(new_absorbing_organisation.owned_lettings_logs.find(owned_lettings_log_no_location.id).scheme).to eq(new_absorbing_organisation.owned_schemes.first)
+ expect(new_absorbing_organisation.owned_lettings_logs.find(owned_lettings_log.id).scheme).to eq(new_absorbing_organisation.owned_schemes.find_by(service_name: scheme.service_name))
+ expect(new_absorbing_organisation.owned_lettings_logs.find(owned_lettings_log.id).location).to eq(new_absorbing_organisation.owned_schemes.find_by(service_name: scheme.service_name).locations.first)
+ expect(new_absorbing_organisation.owned_lettings_logs.find(owned_lettings_log_no_location.id).scheme).to eq(new_absorbing_organisation.owned_schemes.find_by(service_name: scheme.service_name))
expect(new_absorbing_organisation.owned_lettings_logs.find(owned_lettings_log_no_location.id).location).to eq(nil)
end
diff --git a/spec/views/form/page_view_spec.rb b/spec/views/form/page_view_spec.rb
index 16c4c0672..a95c98e93 100644
--- a/spec/views/form/page_view_spec.rb
+++ b/spec/views/form/page_view_spec.rb
@@ -100,7 +100,7 @@ RSpec.describe "form/page" do
end
context "with a question containing extra guidance" do
- let(:expected_guidance) { /What counts as income?/ }
+ let(:expected_guidance) { /#{I18n.t("forms.2021.lettings.guidance.what_counts_as_income.content")}/ }
context "with radio type" do
let(:question_attributes) { { type: "radio", answer_options: { "1": "A", "2": "B" } } }
diff --git a/spec/views/merge_requests/show.html.erb_spec.rb b/spec/views/merge_requests/show.html.erb_spec.rb
index d03239d2a..c1dd47bfd 100644
--- a/spec/views/merge_requests/show.html.erb_spec.rb
+++ b/spec/views/merge_requests/show.html.erb_spec.rb
@@ -30,7 +30,7 @@ RSpec.describe "merge_requests/show.html.erb", type: :view do
it "displays the helpdesk ticket details" do
expect(rendered).to have_selector("dt", text: "Helpdesk ticket")
if merge_request.helpdesk_ticket.present?
- expect(rendered).to have_link(merge_request.helpdesk_ticket, href: "https://dluhcdigital.atlassian.net/browse/#{merge_request.helpdesk_ticket}")
+ expect(rendered).to have_link(merge_request.helpdesk_ticket, href: "https://mhclgdigital.atlassian.net/browse/#{merge_request.helpdesk_ticket}")
else
expect(rendered).to have_selector("dd", text: "You didn't answer this question")
end