Browse Source

CLDC-3336: Add hint text to Q77 for renewals (#2340)

pull/2347/head
Robert Sullivan 9 months ago committed by GitHub
parent
commit
cdfca1c023
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      app/models/form/lettings/questions/previous_tenure.rb
  2. 3
      app/models/form/lettings/questions/previous_tenure_renewal.rb
  3. 3
      spec/models/form/lettings/questions/previous_tenure_renewal_spec.rb
  4. 2
      spec/models/form/lettings/questions/previous_tenure_spec.rb

2
app/models/form/lettings/questions/previous_tenure.rb

@ -6,7 +6,7 @@ class Form::Lettings::Questions::PreviousTenure < ::Form::Question
@header = "Where was the household immediately before this letting?"
@type = "radio"
@check_answers_card_number = 0
@hint_text = "This is where the household was the night before they moved."
@hint_text = "This is where the household was the night before they moved into this new let."
@answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end

3
app/models/form/lettings/questions/previous_tenure_renewal.rb

@ -6,7 +6,8 @@ class Form::Lettings::Questions::PreviousTenureRenewal < ::Form::Question
@header = "Where was the household immediately before this letting?"
@type = "radio"
@check_answers_card_number = 0
@hint_text = ""
@hint_text = "You told us this letting is a renewal. We have removed some options because of this.<br><br>
This is where the household was the night before they moved into this new let."
@answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end

3
spec/models/form/lettings/questions/previous_tenure_renewal_spec.rb

@ -30,7 +30,8 @@ RSpec.describe Form::Lettings::Questions::PreviousTenureRenewal, type: :model do
end
it "has the correct hint" do
expect(question.hint_text).to eq("")
expect(question.hint_text).to eq("You told us this letting is a renewal. We have removed some options because of this.<br><br>
This is where the household was the night before they moved into this new let.")
end
it "has the correct answer_options" do

2
spec/models/form/lettings/questions/previous_tenure_spec.rb

@ -30,7 +30,7 @@ RSpec.describe Form::Lettings::Questions::PreviousTenure, type: :model do
end
it "has the correct hint" do
expect(question.hint_text).to eq("This is where the household was the night before they moved.")
expect(question.hint_text).to eq("This is where the household was the night before they moved into this new let.")
end
it "has the correct answer_options" do

Loading…
Cancel
Save