From b429e6b70c91b2ec718686ffa171d674d539b7ac Mon Sep 17 00:00:00 2001 From: Kat Date: Tue, 3 Jan 2023 09:38:30 +0000 Subject: [PATCH 1/2] Switch the order of sales log sections --- app/models/form_handler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/form_handler.rb b/app/models/form_handler.rb index 3f63b99cd..1afa1d15f 100644 --- a/app/models/form_handler.rb +++ b/app/models/form_handler.rb @@ -22,8 +22,8 @@ class FormHandler sales_sections = [ Form::Sales::Sections::PropertyInformation, Form::Sales::Sections::Household, - Form::Sales::Sections::SaleInformation, Form::Sales::Sections::Finances, + Form::Sales::Sections::SaleInformation, ] current_form = Form.new(nil, current_collection_start_year, sales_sections, "sales") previous_form = Form.new(nil, current_collection_start_year - 1, sales_sections, "sales") From ee3d66c154747946a5fe260304d4c070046bb0ab Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Tue, 3 Jan 2023 11:10:05 +0000 Subject: [PATCH 2/2] Cldc 1540 fixes (#1130) * Update order of pages and remove wrong id's * Add spacing to the hint text --- app/models/form/sales/questions/discount.rb | 4 ++-- .../form/sales/subsections/discounted_ownership_scheme.rb | 4 ++-- spec/models/form/sales/questions/discount_spec.rb | 4 ++-- .../sales/subsections/discounted_ownership_scheme_spec.rb | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/models/form/sales/questions/discount.rb b/app/models/form/sales/questions/discount.rb index 4172ba4f2..d7b9fa33b 100644 --- a/app/models/form/sales/questions/discount.rb +++ b/app/models/form/sales/questions/discount.rb @@ -10,8 +10,8 @@ class Form::Sales::Questions::Discount < ::Form::Question @max = 100 @width = 5 @suffix = "%" - @hint_text = "For Right to Buy (RTB), Preserved Right to Buy (PRTB), and Voluntary Right to Buy (VRTB) - If discount capped, enter capped % + @hint_text = "For Right to Buy (RTB), Preserved Right to Buy (PRTB), and Voluntary Right to Buy (VRTB)

+ If discount capped, enter capped %

If the property is being sold to an existing tenant under the RTB, PRTB, or VRTB schemes, enter the % discount from the full market value that is being given." end end diff --git a/app/models/form/sales/subsections/discounted_ownership_scheme.rb b/app/models/form/sales/subsections/discounted_ownership_scheme.rb index b432e0700..6a9b2777f 100644 --- a/app/models/form/sales/subsections/discounted_ownership_scheme.rb +++ b/app/models/form/sales/subsections/discounted_ownership_scheme.rb @@ -9,9 +9,9 @@ class Form::Sales::Subsections::DiscountedOwnershipScheme < ::Form::Subsection def pages @pages ||= [ + Form::Sales::Pages::AboutPriceRtb.new(nil, nil, self), + Form::Sales::Pages::AboutPriceNotRtb.new(nil, nil, self), Form::Sales::Pages::AboutDeposit.new("about_deposit_discounted_ownership", nil, self), - Form::Sales::Pages::AboutPriceRtb.new("about_deposit_discounted_ownership", nil, self), - Form::Sales::Pages::AboutPriceNotRtb.new("about_deposit_discounted_ownership", nil, self), ] end diff --git a/spec/models/form/sales/questions/discount_spec.rb b/spec/models/form/sales/questions/discount_spec.rb index 977585d7b..f40b2eded 100644 --- a/spec/models/form/sales/questions/discount_spec.rb +++ b/spec/models/form/sales/questions/discount_spec.rb @@ -32,8 +32,8 @@ RSpec.describe Form::Sales::Questions::Discount, type: :model do end it "has the correct hint" do - expect(question.hint_text).to eq("For Right to Buy (RTB), Preserved Right to Buy (PRTB), and Voluntary Right to Buy (VRTB) - If discount capped, enter capped % + expect(question.hint_text).to eq("For Right to Buy (RTB), Preserved Right to Buy (PRTB), and Voluntary Right to Buy (VRTB)

+ If discount capped, enter capped %

If the property is being sold to an existing tenant under the RTB, PRTB, or VRTB schemes, enter the % discount from the full market value that is being given.") end diff --git a/spec/models/form/sales/subsections/discounted_ownership_scheme_spec.rb b/spec/models/form/sales/subsections/discounted_ownership_scheme_spec.rb index c3220bb51..9d716b9ef 100644 --- a/spec/models/form/sales/subsections/discounted_ownership_scheme_spec.rb +++ b/spec/models/form/sales/subsections/discounted_ownership_scheme_spec.rb @@ -13,9 +13,9 @@ RSpec.describe Form::Sales::Subsections::DiscountedOwnershipScheme, type: :model it "has correct pages" do expect(discounted_ownership_scheme.pages.map(&:id)).to eq( - %w[about_deposit_discounted_ownership - about_price_rtb - about_price_not_rtb], + %w[about_price_rtb + about_price_not_rtb + about_deposit_discounted_ownership], ) end