Browse Source

CLDC-2803 Show frequency in rent range soft validation pages (#1993)

* feat: unrelated html fix

* feat: add period to rent range soft vals for 22/23 and 23/24

* feat: update tests

* feat: move period after brent in soft validation page
pull/2009/head
natdeanlewissoftwire 1 year ago committed by GitHub
parent
commit
ef33b35faf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/models/form/lettings/pages/max_rent_value_check.rb
  2. 2
      app/models/form/lettings/pages/min_rent_value_check.rb
  3. 2
      app/views/logs/download_csv.html.erb
  4. 4
      config/forms/2022_2023.json
  5. 2
      spec/models/form/lettings/pages/max_rent_value_check_spec.rb
  6. 2
      spec/models/form/lettings/pages/min_rent_value_check_spec.rb

2
app/models/form/lettings/pages/max_rent_value_check.rb

@ -19,6 +19,6 @@ class Form::Lettings::Pages::MaxRentValueCheck < ::Form::Page
end end
def interruption_screen_question_ids def interruption_screen_question_ids
%w[brent startdate uprn postcode_full la beds rent_type needstype] %w[brent period startdate uprn postcode_full la beds rent_type needstype]
end end
end end

2
app/models/form/lettings/pages/min_rent_value_check.rb

@ -19,6 +19,6 @@ class Form::Lettings::Pages::MinRentValueCheck < ::Form::Page
end end
def interruption_screen_question_ids def interruption_screen_question_ids
%w[brent startdate uprn postcode_full la beds rent_type needstype] %w[brent period startdate uprn postcode_full la beds rent_type needstype]
end end
end end

2
app/views/logs/download_csv.html.erb

@ -6,7 +6,7 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-l">Download CSV</h2> <h1 class="govuk-heading-l">Download CSV</h1>
<p class="govuk-body">We'll send a secure download link to your email address <strong><%= @current_user.email %></strong>.</p> <p class="govuk-body">We'll send a secure download link to your email address <strong><%= @current_user.email %></strong>.</p>
<p class="govuk-body">You've selected <%= count %> logs.</p> <p class="govuk-body">You've selected <%= count %> logs.</p>

4
config/forms/2022_2023.json

@ -8320,7 +8320,7 @@
} }
} }
}, },
"interruption_screen_question_ids": ["brent", "startdate", "la", "beds", "rent_type", "needstype"] "interruption_screen_question_ids": ["brent", "period", "startdate", "la", "beds", "rent_type", "needstype"]
}, },
"max_rent_value_check": { "max_rent_value_check": {
"depends_on": [ "depends_on": [
@ -8365,7 +8365,7 @@
} }
} }
}, },
"interruption_screen_question_ids": ["brent", "startdate", "la", "beds", "rent_type", "needstype"] "interruption_screen_question_ids": ["brent", "period", "startdate", "la", "beds", "rent_type", "needstype"]
}, },
"scharge_value_check": { "scharge_value_check": {
"depends_on": [ "depends_on": [

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

@ -32,6 +32,6 @@ RSpec.describe Form::Lettings::Pages::MaxRentValueCheck, type: :model do
end end
it "has the correct interruption_screen_question_ids" do it "has the correct interruption_screen_question_ids" do
expect(page.interruption_screen_question_ids).to eq(%w[brent startdate uprn postcode_full la beds rent_type needstype]) expect(page.interruption_screen_question_ids).to eq(%w[brent period startdate uprn postcode_full la beds rent_type needstype])
end end
end end

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

@ -41,6 +41,6 @@ RSpec.describe Form::Lettings::Pages::MinRentValueCheck, type: :model do
end end
it "has the correct interruption_screen_question_ids" do it "has the correct interruption_screen_question_ids" do
expect(page.interruption_screen_question_ids).to eq(%w[brent startdate uprn postcode_full la beds rent_type needstype]) expect(page.interruption_screen_question_ids).to eq(%w[brent period startdate uprn postcode_full la beds rent_type needstype])
end end
end end

Loading…
Cancel
Save