Browse Source

Address UPRN PO review (#1467)

* Fix question number rendering

* Update title copy
pull/1471/head
Jack 2 years ago committed by GitHub
parent
commit
ea810beab1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/models/form/lettings/pages/address.rb
  2. 2
      app/models/form/lettings/questions/address_line1.rb
  3. 2
      app/models/form/lettings/questions/uprn_known.rb
  4. 2
      app/models/form/sales/pages/address.rb
  5. 2
      app/models/form/sales/questions/address_line1.rb
  6. 2
      app/models/form/sales/questions/uprn_known.rb
  7. 2
      spec/models/form/lettings/pages/address_spec.rb
  8. 4
      spec/models/form/lettings/questions/address_line1_spec.rb
  9. 2
      spec/models/form/lettings/questions/uprn_known_spec.rb
  10. 2
      spec/models/form/sales/pages/address_spec.rb
  11. 4
      spec/models/form/sales/questions/address_line1_spec.rb
  12. 2
      spec/models/form/sales/questions/uprn_known_spec.rb

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

@ -2,7 +2,7 @@ class Form::Lettings::Pages::Address < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "address"
@header = "What is the property's address?"
@header = "Q12 - What is the property's address?"
end
def questions

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

@ -6,7 +6,7 @@ class Form::Lettings::Questions::AddressLine1 < ::Form::Question
@header = "Address line 1"
@type = "text"
@plain_label = true
@question_number = 12
@check_answer_label = "Q12 - Address"
end
def hidden_in_check_answers?(log, _current_user = nil)

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

@ -3,7 +3,7 @@ class Form::Lettings::Questions::UprnKnown < ::Form::Question
super
@id = "uprn_known"
@check_answer_label = "UPRN known?"
@header = "Do you know the property UPRN?"
@header = "Do you know the property's UPRN?"
@type = "radio"
@answer_options = ANSWER_OPTIONS
@hint_text = "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and sectors UK-wide. For example 10010457355.<br><br>

2
app/models/form/sales/pages/address.rb

@ -2,7 +2,7 @@ class Form::Sales::Pages::Address < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "address"
@header = "What is the property's address?"
@header = "Q15 - What is the property's address?"
end
def questions

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

@ -6,7 +6,7 @@ class Form::Sales::Questions::AddressLine1 < ::Form::Question
@header = "Address line 1"
@type = "text"
@plain_label = true
@question_number = 15
@check_answer_label = "Q15 - Address"
end
def hidden_in_check_answers?(log, _current_user = nil)

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

@ -3,7 +3,7 @@ class Form::Sales::Questions::UprnKnown < ::Form::Question
super
@id = "uprn_known"
@check_answer_label = "UPRN known?"
@header = "Do you know the property UPRN?"
@header = "Do you know the property's UPRN?"
@type = "radio"
@answer_options = ANSWER_OPTIONS
@hint_text = "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and sectors UK-wide. For example 10010457355.<br><br>

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

@ -20,7 +20,7 @@ RSpec.describe Form::Lettings::Pages::Address, type: :model do
end
it "has the correct header" do
expect(page.header).to eq("What is the property's address?")
expect(page.header).to eq("Q12 - What is the property's address?")
end
it "has the correct description" do

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

@ -20,11 +20,11 @@ RSpec.describe Form::Lettings::Questions::AddressLine1, type: :model do
end
it "has the correct question_number" do
expect(question.question_number).to eq(12)
expect(question.question_number).to be_nil
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Address")
expect(question.check_answer_label).to eq("Q12 - Address")
end
it "has the correct type" do

2
spec/models/form/lettings/questions/uprn_known_spec.rb

@ -16,7 +16,7 @@ RSpec.describe Form::Lettings::Questions::UprnKnown, type: :model do
end
it "has the correct header" do
expect(question.header).to eq("Do you know the property UPRN?")
expect(question.header).to eq("Do you know the property's UPRN?")
end
it "has the correct check_answer_label" do

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

@ -20,7 +20,7 @@ RSpec.describe Form::Sales::Pages::Address, type: :model do
end
it "has the correct header" do
expect(page.header).to eq("What is the property's address?")
expect(page.header).to eq("Q15 - What is the property's address?")
end
it "has the correct description" do

4
spec/models/form/sales/questions/address_line1_spec.rb

@ -12,7 +12,7 @@ RSpec.describe Form::Sales::Questions::AddressLine1, type: :model do
end
it "has the correct question_number" do
expect(question.question_number).to eq(15)
expect(question.question_number).to be_nil
end
it "has the correct id" do
@ -24,7 +24,7 @@ RSpec.describe Form::Sales::Questions::AddressLine1, type: :model do
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Address")
expect(question.check_answer_label).to eq("Q15 - Address")
end
it "has the correct type" do

2
spec/models/form/sales/questions/uprn_known_spec.rb

@ -16,7 +16,7 @@ RSpec.describe Form::Sales::Questions::UprnKnown, type: :model do
end
it "has the correct header" do
expect(question.header).to eq("Do you know the property UPRN?")
expect(question.header).to eq("Do you know the property's UPRN?")
end
it "has the correct check_answer_label" do

Loading…
Cancel
Save