From ea810beab1c3b8ce73567fd74f5bb6f70ab7e21b Mon Sep 17 00:00:00 2001 From: Jack <113976590+bibblobcode@users.noreply.github.com> Date: Fri, 24 Mar 2023 14:56:57 +0000 Subject: [PATCH] Address UPRN PO review (#1467) * Fix question number rendering * Update title copy --- app/models/form/lettings/pages/address.rb | 2 +- app/models/form/lettings/questions/address_line1.rb | 2 +- app/models/form/lettings/questions/uprn_known.rb | 2 +- app/models/form/sales/pages/address.rb | 2 +- app/models/form/sales/questions/address_line1.rb | 2 +- app/models/form/sales/questions/uprn_known.rb | 2 +- spec/models/form/lettings/pages/address_spec.rb | 2 +- spec/models/form/lettings/questions/address_line1_spec.rb | 4 ++-- spec/models/form/lettings/questions/uprn_known_spec.rb | 2 +- spec/models/form/sales/pages/address_spec.rb | 2 +- spec/models/form/sales/questions/address_line1_spec.rb | 4 ++-- spec/models/form/sales/questions/uprn_known_spec.rb | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/models/form/lettings/pages/address.rb b/app/models/form/lettings/pages/address.rb index 6f88bad0d..cf6f73036 100644 --- a/app/models/form/lettings/pages/address.rb +++ b/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 diff --git a/app/models/form/lettings/questions/address_line1.rb b/app/models/form/lettings/questions/address_line1.rb index 6f82edf45..b3288c82c 100644 --- a/app/models/form/lettings/questions/address_line1.rb +++ b/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) diff --git a/app/models/form/lettings/questions/uprn_known.rb b/app/models/form/lettings/questions/uprn_known.rb index 6e3ce0302..d206885fb 100644 --- a/app/models/form/lettings/questions/uprn_known.rb +++ b/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.

diff --git a/app/models/form/sales/pages/address.rb b/app/models/form/sales/pages/address.rb index aa8ab7e0d..ca686d1b1 100644 --- a/app/models/form/sales/pages/address.rb +++ b/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 diff --git a/app/models/form/sales/questions/address_line1.rb b/app/models/form/sales/questions/address_line1.rb index 2dd3a734e..a71229970 100644 --- a/app/models/form/sales/questions/address_line1.rb +++ b/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) diff --git a/app/models/form/sales/questions/uprn_known.rb b/app/models/form/sales/questions/uprn_known.rb index 9f192f7de..b07b0b7d7 100644 --- a/app/models/form/sales/questions/uprn_known.rb +++ b/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.

diff --git a/spec/models/form/lettings/pages/address_spec.rb b/spec/models/form/lettings/pages/address_spec.rb index e4cf044b8..230d6964f 100644 --- a/spec/models/form/lettings/pages/address_spec.rb +++ b/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 diff --git a/spec/models/form/lettings/questions/address_line1_spec.rb b/spec/models/form/lettings/questions/address_line1_spec.rb index 781b0a748..e2600f0cc 100644 --- a/spec/models/form/lettings/questions/address_line1_spec.rb +++ b/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 diff --git a/spec/models/form/lettings/questions/uprn_known_spec.rb b/spec/models/form/lettings/questions/uprn_known_spec.rb index 1a0f810da..07eb72f8d 100644 --- a/spec/models/form/lettings/questions/uprn_known_spec.rb +++ b/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 diff --git a/spec/models/form/sales/pages/address_spec.rb b/spec/models/form/sales/pages/address_spec.rb index d6979b6b4..43a054a1e 100644 --- a/spec/models/form/sales/pages/address_spec.rb +++ b/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 diff --git a/spec/models/form/sales/questions/address_line1_spec.rb b/spec/models/form/sales/questions/address_line1_spec.rb index 27c0179e2..f037f41cd 100644 --- a/spec/models/form/sales/questions/address_line1_spec.rb +++ b/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 diff --git a/spec/models/form/sales/questions/uprn_known_spec.rb b/spec/models/form/sales/questions/uprn_known_spec.rb index 528e60a1f..457471568 100644 --- a/spec/models/form/sales/questions/uprn_known_spec.rb +++ b/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