Browse Source

CLDC-2467 Add hint text to period question (#1780)

* add hint text

* test
revert-CLDC-2310
kosiakkatrina 1 year ago committed by GitHub
parent
commit
57e53b690e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/models/form/lettings/questions/period.rb
  2. 2
      config/forms/2022_2023.json
  3. 11
      spec/models/form/lettings/questions/period_spec.rb

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

@ -6,7 +6,7 @@ class Form::Lettings::Questions::Period < ::Form::Question
@header = "How often does the household pay rent and other charges?" @header = "How often does the household pay rent and other charges?"
@type = "radio" @type = "radio"
@check_answers_card_number = 0 @check_answers_card_number = 0
@hint_text = "" @hint_text = "Select how often the household is charged. This may be different to how often they pay."
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 92 @question_number = 92
end end

2
config/forms/2022_2023.json

@ -7443,7 +7443,7 @@
"period": { "period": {
"check_answer_label": "Frequency of household rent and charges", "check_answer_label": "Frequency of household rent and charges",
"header": "How often does the household pay rent and other charges?", "header": "How often does the household pay rent and other charges?",
"hint_text": "", "hint_text": "Select how often the household is charged. This may be different to how often they pay.",
"type": "radio", "type": "radio",
"answer_options": { "answer_options": {
"2": { "2": {

11
spec/models/form/lettings/questions/period_spec.rb

@ -0,0 +1,11 @@
require "rails_helper"
RSpec.describe Form::Lettings::Questions::Period, type: :model do
subject(:question) { described_class.new(nil, nil, page) }
let(:page) { instance_double(Form::Page) }
it "has the correct hint" do
expect(question.hint_text).to eq("Select how often the household is charged. This may be different to how often they pay.")
end
end
Loading…
Cancel
Save