Browse Source

Add guidance for motrgage

pull/1164/head
Kat 3 years ago
parent
commit
7fd9b9ba88
  1. 2
      app/models/form/sales/questions/mortgage_lender.rb
  2. 7
      app/views/form/guidance/_mortgage_lender.html.erb
  3. 9
      spec/models/form/sales/questions/mortgage_lender_spec.rb

2
app/models/form/sales/questions/mortgage_lender.rb

@ -8,6 +8,8 @@ class Form::Sales::Questions::MortgageLender < ::Form::Question
@hint_text = ""
@page = page
@answer_options = ANSWER_OPTIONS
@guidance_position = GuidancePosition::BOTTOM
@guidance_partial = "mortgage_lender"
end
ANSWER_OPTIONS = {

7
app/views/form/guidance/_mortgage_lender.html.erb

@ -0,0 +1,7 @@
<%= govuk_details(summary_text: "Can’t find the mortgage lender you’re looking for?") do %>
<ul class="govuk-list govuk-list--bullet">
<li>Double check the spelling and try again</li>
<li>Type the first few letters to see the suggestions</li>
<li>Type Other and continue - we’ll ask you to type in your answer in the next question</li>
</ul>
<% end %>

9
spec/models/form/sales/questions/mortgage_lender_spec.rb

@ -31,6 +31,15 @@ RSpec.describe Form::Sales::Questions::MortgageLender, type: :model do
expect(question.derived?).to be false
end
it "is has correct guidance_position" do
expect(question.top_guidance?).to be false
expect(question.bottom_guidance?).to be true
end
it "is has correct guidance_partial" do
expect(question.guidance_partial).to eq("mortgage_lender")
end
it "has the correct answer_options" do
expect(question.answer_options).to eq({
"" => "Select an option",

Loading…
Cancel
Save