Browse Source

Update header and CYA label

pull/2214/head
Kat 2 years ago
parent
commit
5ae1c26a19
  1. 4
      app/models/form/lettings/questions/starter_tenancy_type.rb
  2. 12
      spec/models/form/lettings/questions/starter_tenancy_type_spec.rb

4
app/models/form/lettings/questions/starter_tenancy_type.rb

@ -2,8 +2,8 @@ class Form::Lettings::Questions::StarterTenancyType < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "tenancy" @id = "tenancy"
@check_answer_label = form.start_year_after_2024? ? "What is the type of tenancy after the starter or introductory period has ended" : "Type of main tenancy after the starter period has ended?" @check_answer_label = form.start_year_after_2024? ? "Type of main tenancy after the starter or introductory period has ended" : "Type of main tenancy after the starter period has ended"
@header = "What is the type of tenancy after the starter period has ended?" @header = form.start_year_after_2024? ? "What is the type of tenancy after the starter or introductory period has ended?" : "What is the type of tenancy after the starter period has ended?"
@type = "radio" @type = "radio"
@check_answers_card_number = 0 @check_answers_card_number = 0
@hint_text = form.start_year_after_2024? ? "" : "This is also known as an ‘introductory period’." @hint_text = form.start_year_after_2024? ? "" : "This is also known as an ‘introductory period’."

12
spec/models/form/lettings/questions/starter_tenancy_type_spec.rb

@ -20,13 +20,17 @@ RSpec.describe Form::Lettings::Questions::StarterTenancyType, type: :model do
end end
it "has the correct check answer label" do it "has the correct check answer label" do
expect(question.check_answer_label).to eq("Type of main tenancy after the starter period has ended?") expect(question.check_answer_label).to eq("Type of main tenancy after the starter period has ended")
end end
it "has the correct hint_text" do it "has the correct hint_text" do
expect(question.hint_text).to eq("This is also known as an ‘introductory period’.") expect(question.hint_text).to eq("This is also known as an ‘introductory period’.")
end end
it "has the correct header" do
expect(question.header).to eq("What is the type of tenancy after the starter period has ended?")
end
it "has the correct answer options" do it "has the correct answer options" do
expect(question.answer_options).to eq( expect(question.answer_options).to eq(
{ {
@ -62,13 +66,17 @@ RSpec.describe Form::Lettings::Questions::StarterTenancyType, type: :model do
end end
it "has the correct check answer label" do it "has the correct check answer label" do
expect(question.check_answer_label).to eq("What is the type of tenancy after the starter or introductory period has ended") expect(question.check_answer_label).to eq("Type of main tenancy after the starter or introductory period has ended")
end end
it "has the correct updated hint_text" do it "has the correct updated hint_text" do
expect(question.hint_text).to eq("") expect(question.hint_text).to eq("")
end end
it "has the correct header" do
expect(question.header).to eq("What is the type of tenancy after the starter or introductory period has ended?")
end
it "has the correct answer options" do it "has the correct answer options" do
expect(question.answer_options).to eq( expect(question.answer_options).to eq(
{ {

Loading…
Cancel
Save