Browse Source

CLDC-2075: details added to three question pages with tests updated

pull/1707/head
Aaron Spencer 3 years ago
parent
commit
e79fb1cc66
  1. 1
      app/models/form/sales/pages/discounted_ownership_type.rb
  2. 1
      app/models/form/sales/pages/outright_ownership_type.rb
  3. 1
      app/models/form/sales/pages/shared_ownership_type.rb
  4. 2
      app/models/form/sales/questions/discounted_ownership_type.rb
  5. 2
      app/models/form/sales/questions/outright_ownership_type.rb
  6. 2
      app/models/form/sales/questions/shared_ownership_type.rb
  7. 23
      app/views/form/guidance/_discounted_ownership_type_definitions.erb
  8. 8
      app/views/form/guidance/_outright_sale_type_definitions.erb
  9. 26
      app/views/form/guidance/_shared_ownership_type_definitions.erb
  10. 2
      spec/models/form/sales/pages/discounted_ownership_type_spec.rb
  11. 2
      spec/models/form/sales/pages/outright_ownership_type_spec.rb
  12. 2
      spec/models/form/sales/pages/shared_ownership_type_spec.rb

1
app/models/form/sales/pages/discounted_ownership_type.rb

@ -2,6 +2,7 @@ class Form::Sales::Pages::DiscountedOwnershipType < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "discounted_ownership_type"
@header = "Discounted ownership type"
@depends_on = [{
"ownershipsch" => 2,
}]

1
app/models/form/sales/pages/outright_ownership_type.rb

@ -2,6 +2,7 @@ class Form::Sales::Pages::OutrightOwnershipType < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "outright_ownership_type"
@header = "Outright ownership type"
@depends_on = [{
"ownershipsch" => 3,
}]

1
app/models/form/sales/pages/shared_ownership_type.rb

@ -2,6 +2,7 @@ class Form::Sales::Pages::SharedOwnershipType < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "shared_ownership_type"
@header = "Shared Ownership"
@depends_on = [{
"ownershipsch" => 1,
}]

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

@ -5,6 +5,8 @@ class Form::Sales::Questions::DiscountedOwnershipType < ::Form::Question
@check_answer_label = "Type of discounted ownership sale"
@header = "What is the type of discounted ownership sale?"
@type = "radio"
@guidance_partial = "discounted_ownership_type_definitions"
@guidance_position = GuidancePosition::TOP
@answer_options = ANSWER_OPTIONS
@question_number = 5
end

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

@ -5,6 +5,8 @@ class Form::Sales::Questions::OutrightOwnershipType < ::Form::Question
@check_answer_label = "Type of outright sale"
@header = "What is the type of outright sale?"
@type = "radio"
@guidance_partial = "outright_sale_type_definitions"
@guidance_position = GuidancePosition::TOP
@answer_options = ANSWER_OPTIONS
@conditional_for = {
"othtype" => [12],

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

@ -5,6 +5,8 @@ class Form::Sales::Questions::SharedOwnershipType < ::Form::Question
@check_answer_label = "Type of shared ownership sale"
@header = "What is the type of shared ownership sale?"
@hint_text = "A shared ownership sale is when the purchaser buys up to 75% of the property value and pays rent to the Private Registered Provider (PRP) on the remaining portion"
@guidance_partial = "shared_ownership_type_definitions"
@guidance_position = GuidancePosition::TOP
@type = "radio"
@answer_options = answer_options
@question_number = 4

23
app/views/form/guidance/_discounted_ownership_type_definitions.erb

@ -0,0 +1,23 @@
<%= govuk_details(summary_text: "Discounted ownership type definitions") do %>
<p class="govuk-body">
<b>Right to Acquire (RTA):</b> a discounted sale of a property built or purchased after 31 March 1997 to tenants of a private registered provider.
</p>
<p class="govuk-body">
<b>Preserved Right to Buy (PRTB):</b> a discounted sale of a property that used to be owned by a council to tenants of a private registered provider.
</p>
<p class="govuk-body">
<b>Voluntary Right to Buy (VRTB):</b> a discounted sale to tenants in this PRP owned property, as part of a pilot scheme.
</p>
<p class="govuk-body">
<b>Right to Buy (RTB):</b> a discounted sale to tenants in this council owned property.
</p>
<p class="govuk-body">
<b>Rent to Buy full ownership:</b> a sale on full ownership terms following a period of discounted rent.
</p>
<p class="govuk-body">
<b>Social HomeBuy for outright purchase:</b> a discounted sale to tenants of a private registered provider on full ownership terms.
</p>
<p class="govuk-body">
<b>Any other equity loan scheme:</b> any scheme, not covered elsewhere, in which a loan is used to purchase equity.
</p>
<% end %>

8
app/views/form/guidance/_outright_sale_type_definitions.erb

@ -0,0 +1,8 @@
<%= govuk_details(summary_text: "Outright sale type definitions") do %>
<p class="govuk-body">
<b>Outright sale:</b> the full purchase of a property, usually with a mortgage or cash.
</p>
<p class="govuk-body">
<b>Other sale:</b> any sale which does not fit the criteria of any of the remaining options.
</p>
<% end %>

26
app/views/form/guidance/_shared_ownership_type_definitions.erb

@ -0,0 +1,26 @@
<%= govuk_details(summary_text: "Shared ownership type definitions") do %>
<p class="govuk-body">
<b>Shared ownership:</b> Cannot be used for homes funded through the Affordable Homes Programme 2021 to 2026. Use the 2021 model lease for these properties.
</p>
<p class="govuk-body">
<b>Shared ownership 2021 model lease:</b> Homes bought using the Affordable Homes Programme 2021 to 2026.
</p>
<p class="govuk-body">
<b>Older Persons Shared Ownership:</b> A type of shared ownership for those 55 years and over.
</p>
<p class="govuk-body">
<b>Social HomeBuy shared ownership purchase:</b> Tenants of private registered providers purchase their home at discount on Shared Ownership terms.
</p>
<p class="govuk-body">
<b>Home Ownership for people with Long-Term Disabilities (HOLD):</b> A shared ownership sale for those with long term disabilities.
</p>
<p class="govuk-body">
<b>Rent to Buy shared ownership:</b> A sale following a period of discounted rent.
</p>
<p class="govuk-body">
<b>Right to Shared Ownership:</b> A sale of a share of a rented home to a tenant using this scheme.
</p>
<p class="govuk-body">
<b>London Living Rent shared ownership:</b> A shared ownership sale following a period of discounted rent as part of the London Living Rent scheme.
</p>
<% end %>

2
spec/models/form/sales/pages/discounted_ownership_type_spec.rb

@ -20,7 +20,7 @@ RSpec.describe Form::Sales::Pages::DiscountedOwnershipType, type: :model do
end
it "has the correct header" do
expect(page.header).to be_nil
expect(page.header).to eq("Discounted ownership type")
end
it "has the correct description" do

2
spec/models/form/sales/pages/outright_ownership_type_spec.rb

@ -20,7 +20,7 @@ RSpec.describe Form::Sales::Pages::OutrightOwnershipType, type: :model do
end
it "has the correct header" do
expect(page.header).to be_nil
expect(page.header).to eq("Outright ownership type")
end
it "has the correct description" do

2
spec/models/form/sales/pages/shared_ownership_type_spec.rb

@ -22,7 +22,7 @@ RSpec.describe Form::Sales::Pages::SharedOwnershipType, type: :model do
end
it "has the correct header" do
expect(page.header).to be_nil
expect(page.header).to eq("Shared Ownership")
end
it "has the correct description" do

Loading…
Cancel
Save