From 17efc9beacc9d7d64e1422eb49b286eef2906c34 Mon Sep 17 00:00:00 2001 From: Kat Date: Tue, 2 May 2023 11:56:02 +0100 Subject: [PATCH] Update validation message: old persons shared ownership --- .../pages/old_persons_shared_ownership_value_check.rb | 7 +++++-- config/locales/en.yml | 4 +++- .../pages/old_persons_shared_ownership_value_check_spec.rb | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/models/form/sales/pages/old_persons_shared_ownership_value_check.rb b/app/models/form/sales/pages/old_persons_shared_ownership_value_check.rb index 30e40f90a..537a6679f 100644 --- a/app/models/form/sales/pages/old_persons_shared_ownership_value_check.rb +++ b/app/models/form/sales/pages/old_persons_shared_ownership_value_check.rb @@ -7,10 +7,13 @@ class Form::Sales::Pages::OldPersonsSharedOwnershipValueCheck < ::Form::Page }, ] @title_text = { - "translation" => "soft_validations.old_persons_shared_ownership", + "translation" => "soft_validations.old_persons_shared_ownership.title_text", + "arguments" => [], + } + @informative_text = { + "translation" => "soft_validations.old_persons_shared_ownership.hint_text", "arguments" => [], } - @informative_text = {} end def questions diff --git a/config/locales/en.yml b/config/locales/en.yml index a5218afa9..3a72c85c0 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -557,7 +557,9 @@ en: hint_text: "This is higher than we would expect." shared_ownership_deposit: title_text: "Mortgage, deposit and cash discount total should equal %{expected_shared_ownership_deposit_value}" - old_persons_shared_ownership: "At least one buyer should be aged over 64 for Older persons’ shared ownership scheme" + old_persons_shared_ownership: + title_text: "You told us the buyer is using the Older Persons Shared Ownership scheme." + hint_text: "At least one buyer must be aged 65 years and over to use this scheme." 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%" diff --git a/spec/models/form/sales/pages/old_persons_shared_ownership_value_check_spec.rb b/spec/models/form/sales/pages/old_persons_shared_ownership_value_check_spec.rb index 2bb961264..d9c4beed9 100644 --- a/spec/models/form/sales/pages/old_persons_shared_ownership_value_check_spec.rb +++ b/spec/models/form/sales/pages/old_persons_shared_ownership_value_check_spec.rb @@ -33,13 +33,13 @@ RSpec.describe Form::Sales::Pages::OldPersonsSharedOwnershipValueCheck, type: :m it "has the correct title_text" do expect(page.title_text).to eq({ - "translation" => "soft_validations.old_persons_shared_ownership", + "translation" => "soft_validations.old_persons_shared_ownership.title_text", "arguments" => [], }) end it "has the correct informative_text" do - expect(page.informative_text).to eq({}) + expect(page.informative_text).to eq({ "arguments" => [], "translation" => "soft_validations.old_persons_shared_ownership.hint_text" }) end it "has the correct interruption_screen_question_ids" do