Browse Source

Move void date quidance to the top (#2164)

pull/2175/head
kosiakkatrina 11 months ago committed by GitHub
parent
commit
d032c7ffc1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      app/models/form/lettings/pages/void_date.rb
  2. 2
      app/models/form/lettings/questions/voiddate.rb
  3. 2
      spec/models/form/lettings/pages/void_date_spec.rb
  4. 4
      spec/models/form/lettings/questions/voiddate_spec.rb

1
app/models/form/lettings/pages/void_date.rb

@ -2,6 +2,7 @@ class Form::Lettings::Pages::VoidDate < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "void_date"
@header = "Void date"
@depends_on = [{ "is_renewal?" => false }]
end

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

@ -7,6 +7,6 @@ class Form::Lettings::Questions::Voiddate < ::Form::Question
@type = "date"
@check_answers_card_number = 0
@question_number = 23
@bottom_guidance_partial = "void_date"
@top_guidance_partial = "void_date"
end
end

2
spec/models/form/lettings/pages/void_date_spec.rb

@ -20,7 +20,7 @@ RSpec.describe Form::Lettings::Pages::VoidDate, type: :model do
end
it "has the correct header" do
expect(page.header).to be_nil
expect(page.header).to eq("Void date")
end
it "has the correct description" do

4
spec/models/form/lettings/questions/voiddate_spec.rb

@ -31,8 +31,8 @@ RSpec.describe Form::Lettings::Questions::Voiddate, type: :model do
expect(question.question_number).to eq(23)
end
it "has the correct bottom_guidance_partial" do
expect(question.bottom_guidance_partial).to eq("void_date")
it "has the correct top_guidance_partial" do
expect(question.top_guidance_partial).to eq("void_date")
end
it "has the correct type" do

Loading…
Cancel
Save