Browse Source

CLDC-2046: Use 'Buyer 1' consistently in error messages (#2264)

pull/2265/head^2
Robert Sullivan 11 months ago committed by GitHub
parent
commit
8bfdbef3f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      app/models/form/sales/questions/age1.rb
  2. 2
      app/models/form/sales/questions/buyer1_age_known.rb
  3. 2
      spec/models/form/sales/questions/age1_spec.rb
  4. 2
      spec/models/form/sales/questions/buyer1_age_known_spec.rb
  5. 14
      spec/requests/duplicate_logs_controller_spec.rb

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

@ -2,7 +2,7 @@ class Form::Sales::Questions::Age1 < ::Form::Question
def initialize(id, hsh, page)
super
@id = "age1"
@check_answer_label = "Lead buyer’s age"
@check_answer_label = "Buyer 1’s age"
@header = "Age"
@type = "numeric"
@width = 2

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

@ -2,7 +2,7 @@ class Form::Sales::Questions::Buyer1AgeKnown < ::Form::Question
def initialize(id, hsh, page)
super
@id = "age1_known"
@check_answer_label = "Lead buyer’s age"
@check_answer_label = "Buyer 1’s age"
@header = "Do you know buyer 1’s age?"
@type = "radio"
@answer_options = ANSWER_OPTIONS

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

@ -20,7 +20,7 @@ RSpec.describe Form::Sales::Questions::Age1, type: :model do
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Lead buyer’s age")
expect(question.check_answer_label).to eq("Buyer 1’s age")
end
it "has the correct type" do

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

@ -20,7 +20,7 @@ RSpec.describe Form::Sales::Questions::Buyer1AgeKnown, type: :model do
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Lead buyer’s age")
expect(question.check_answer_label).to eq("Buyer 1’s age")
end
it "has the correct type" do

14
spec/requests/duplicate_logs_controller_spec.rb

@ -169,7 +169,7 @@ RSpec.describe DuplicateLogsController, type: :request do
it "displays check your answers for each log with correct questions" do
expect(page).to have_content("Q1 - Sale completion date", count: 3)
expect(page).to have_content("Q2 - Purchaser code", count: 3)
expect(page).to have_content("Q20 - Lead buyer’s age", count: 3)
expect(page).to have_content("Q20 - Buyer 1’s age", count: 3)
expect(page).to have_content("Q21 - Buyer 1’s gender identity", count: 3)
expect(page).to have_content("Q25 - Buyer 1's working situation", count: 3)
expect(page).to have_content("Q15 - Postcode", count: 3)
@ -187,7 +187,7 @@ RSpec.describe DuplicateLogsController, type: :request do
expect(page).to have_content("Q1 - Sale completion date", count: 3)
expect(page).to have_content("Q2 - Purchaser code", count: 3)
expect(page).to have_content("Q20 - Lead buyer’s age", count: 3)
expect(page).to have_content("Q20 - Buyer 1’s age", count: 3)
expect(page).to have_content("Q21 - Buyer 1’s gender identity", count: 3)
expect(page).to have_content("Q25 - Buyer 1's working situation", count: 3)
expect(page).to have_content("Postcode (from UPRN)", count: 3)
@ -215,7 +215,7 @@ RSpec.describe DuplicateLogsController, type: :request do
it "displays check your answers for each log with correct questions" do
expect(page).to have_content("Q1 - Sale completion date", count: 1)
expect(page).to have_content("Q2 - Purchaser code", count: 1)
expect(page).to have_content("Q20 - Lead buyer’s age", count: 1)
expect(page).to have_content("Q20 - Buyer 1’s age", count: 1)
expect(page).to have_content("Q21 - Buyer 1’s gender identity", count: 1)
expect(page).to have_content("Q25 - Buyer 1's working situation", count: 1)
expect(page).to have_content("Q15 - Postcode", count: 1)
@ -241,7 +241,7 @@ RSpec.describe DuplicateLogsController, type: :request do
it "displays check your answers for each log with correct questions" do
expect(page).to have_content("Q1 - Sale completion date", count: 1)
expect(page).to have_content("Q2 - Purchaser code", count: 1)
expect(page).to have_content("Q20 - Lead buyer’s age", count: 1)
expect(page).to have_content("Q20 - Buyer 1’s age", count: 1)
expect(page).to have_content("Q21 - Buyer 1’s gender identity", count: 1)
expect(page).to have_content("Q25 - Buyer 1's working situation", count: 1)
expect(page).to have_content("Q15 - Postcode", count: 1)
@ -379,7 +379,7 @@ RSpec.describe DuplicateLogsController, type: :request do
it "displays check your answers for each log with correct questions" do
expect(page).to have_content("Q1 - Sale completion date", count: 3)
expect(page).to have_content("Q2 - Purchaser code", count: 3)
expect(page).to have_content("Q20 - Lead buyer’s age", count: 3)
expect(page).to have_content("Q20 - Buyer 1’s age", count: 3)
expect(page).to have_content("Q21 - Buyer 1’s gender identity", count: 3)
expect(page).to have_content("Q25 - Buyer 1's working situation", count: 3)
expect(page).to have_content("Q15 - Postcode", count: 3)
@ -407,7 +407,7 @@ RSpec.describe DuplicateLogsController, type: :request do
it "displays check your answers for each log with correct questions" do
expect(page).to have_content("Q1 - Sale completion date", count: 1)
expect(page).to have_content("Q2 - Purchaser code", count: 1)
expect(page).to have_content("Q20 - Lead buyer’s age", count: 1)
expect(page).to have_content("Q20 - Buyer 1’s age", count: 1)
expect(page).to have_content("Q21 - Buyer 1’s gender identity", count: 1)
expect(page).to have_content("Q25 - Buyer 1's working situation", count: 1)
expect(page).to have_content("Q15 - Postcode", count: 1)
@ -433,7 +433,7 @@ RSpec.describe DuplicateLogsController, type: :request do
it "displays check your answers for each log with correct questions" do
expect(page).to have_content("Q1 - Sale completion date", count: 1)
expect(page).to have_content("Q2 - Purchaser code", count: 1)
expect(page).to have_content("Q20 - Lead buyer’s age", count: 1)
expect(page).to have_content("Q20 - Buyer 1’s age", count: 1)
expect(page).to have_content("Q21 - Buyer 1’s gender identity", count: 1)
expect(page).to have_content("Q25 - Buyer 1's working situation", count: 1)
expect(page).to have_content("Q15 - Postcode", count: 1)

Loading…
Cancel
Save