Browse Source

CLDC-2364 Display guidance text on net income question (#1668)

* Make sure that the guidance text is displayed on net income question

* add test

* Add missing guidance to earnings
pull/1677/head v0.3.24
kosiakkatrina 2 years ago committed by GitHub
parent
commit
ee14bca6cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      app/models/form/lettings/questions/earnings.rb
  2. 1
      app/models/form/lettings/questions/net_income_known.rb
  3. 7
      spec/models/form/lettings/questions/net_income_known_spec.rb

1
app/models/form/lettings/questions/earnings.rb

@ -9,6 +9,7 @@ class Form::Lettings::Questions::Earnings < ::Form::Question
@check_answers_card_number = 0
@min = 0
@guidance_partial = "what_counts_as_income"
@guidance_position = GuidancePosition::TOP
@hint_text = ""
@step = 0.01
@prefix = "£"

1
app/models/form/lettings/questions/net_income_known.rb

@ -7,6 +7,7 @@ class Form::Lettings::Questions::NetIncomeKnown < ::Form::Question
@type = "radio"
@check_answers_card_number = 0
@guidance_partial = "what_counts_as_income"
@guidance_position = GuidancePosition::TOP
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@question_number = 86

7
spec/models/form/lettings/questions/net_income_known_spec.rb

@ -14,4 +14,11 @@ RSpec.describe Form::Lettings::Questions::NetIncomeKnown do
expect(question.type).to eql("radio")
end
end
describe "#partial guidance" do
it "is at the top" do
expect(question.top_guidance?).to eq(true)
expect(question.bottom_guidance?).to eq(false)
end
end
end

Loading…
Cancel
Save