Browse Source

CLDC-2423 Update hint text on conditional questions (#1779)

* Update hint text on conditional questions

* Update flaky test
revert-CLDC-2310
kosiakkatrina 1 year ago committed by GitHub
parent
commit
b6cf1b44f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/models/form/lettings/questions/reason_renewal.rb
  2. 2
      app/models/form/lettings/questions/referral.rb
  3. 2
      app/models/form/lettings/questions/referral_prp.rb
  4. 2
      app/models/form/lettings/questions/referral_supported_housing.rb
  5. 8
      config/forms/2022_2023.json
  6. 8
      spec/requests/sales_logs_controller_spec.rb

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

@ -6,7 +6,7 @@ class Form::Lettings::Questions::ReasonRenewal < ::Form::Question
@header = "What is the tenant’s main reason for the household leaving their last settled home?" @header = "What is the tenant’s main reason for the household leaving their last settled home?"
@type = "radio" @type = "radio"
@check_answers_card_number = 0 @check_answers_card_number = 0
@hint_text = "" @hint_text = "You told us this letting is a renewal. We have removed some options because of this."
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 77 @question_number = 77
end end

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

@ -6,7 +6,7 @@ class Form::Lettings::Questions::Referral < ::Form::Question
@header = "What was the source of referral for this letting?" @header = "What was the source of referral for this letting?"
@type = "radio" @type = "radio"
@check_answers_card_number = 0 @check_answers_card_number = 0
@hint_text = "" @hint_text = "You told us that you are a local authority and that the needs type is general needs. We have removed some options because of this."
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 85 @question_number = 85
end end

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

@ -6,7 +6,7 @@ class Form::Lettings::Questions::ReferralPrp < ::Form::Question
@header = "What was the source of referral for this letting?" @header = "What was the source of referral for this letting?"
@type = "radio" @type = "radio"
@check_answers_card_number = 0 @check_answers_card_number = 0
@hint_text = "" @hint_text = "You told us that the needs type is general needs. We have removed some options because of this."
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 85 @question_number = 85
end end

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

@ -6,7 +6,7 @@ class Form::Lettings::Questions::ReferralSupportedHousing < ::Form::Question
@header = "What was the source of referral for this letting?" @header = "What was the source of referral for this letting?"
@type = "radio" @type = "radio"
@check_answers_card_number = 0 @check_answers_card_number = 0
@hint_text = "" @hint_text = "You told us that you are a local authority. We have removed some options because of this."
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = 85 @question_number = 85
end end

8
config/forms/2022_2023.json

@ -6220,7 +6220,7 @@
"reason": { "reason": {
"check_answer_label": "Reason for leaving last settled home", "check_answer_label": "Reason for leaving last settled home",
"header": "What is the tenant’s main reason for the household leaving their last settled home?", "header": "What is the tenant’s main reason for the household leaving their last settled home?",
"hint_text": "", "hint_text": "You told us this letting is a renewal. We have removed some options because of this.",
"type": "radio", "type": "radio",
"answer_options": { "answer_options": {
"40": { "40": {
@ -6966,7 +6966,7 @@
"referral": { "referral": {
"check_answer_label": "Source of referral for letting", "check_answer_label": "Source of referral for letting",
"header": "What was the source of referral for this letting?", "header": "What was the source of referral for this letting?",
"hint_text": "", "hint_text": "You told us that you are a local authority and that the needs type is general needs. We have removed some options because of this.",
"type": "radio", "type": "radio",
"answer_options": { "answer_options": {
"1": { "1": {
@ -7023,7 +7023,7 @@
"referral": { "referral": {
"check_answer_label": "Source of referral for letting", "check_answer_label": "Source of referral for letting",
"header": "What was the source of referral for this letting?", "header": "What was the source of referral for this letting?",
"hint_text": "", "hint_text": "You told us that the needs type is general needs. We have removed some options because of this.",
"type": "radio", "type": "radio",
"answer_options": { "answer_options": {
"1": { "1": {
@ -7080,7 +7080,7 @@
"referral": { "referral": {
"check_answer_label": "Source of referral for letting", "check_answer_label": "Source of referral for letting",
"header": "What was the source of referral for this letting?", "header": "What was the source of referral for this letting?",
"hint_text": "", "hint_text": "You told us that you are a local authority. We have removed some options because of this.",
"type": "radio", "type": "radio",
"answer_options": { "answer_options": {
"1": { "1": {

8
spec/requests/sales_logs_controller_spec.rb

@ -412,14 +412,14 @@ RSpec.describe SalesLogsController, type: :request do
let(:other_user) { create(:user, organisation:) } let(:other_user) { create(:user, organisation:) }
let(:bulk_upload) { create(:bulk_upload, :sales, user: other_user) } let(:bulk_upload) { create(:bulk_upload, :sales, user: other_user) }
let!(:excluded_log) { create(:sales_log, bulk_upload:, owning_organisation: organisation) } let!(:excluded_log) { create(:sales_log, bulk_upload:, owning_organisation: organisation, purchid: "fake_tenancy_code") }
let!(:also_excluded_log) { create(:sales_log, owning_organisation: organisation) } let!(:also_excluded_log) { create(:sales_log, owning_organisation: organisation, purchid: "fake_tenancy_code_too") }
it "does not return any logs" do it "does not return any logs" do
get "/sales-logs?bulk_upload_id[]=#{bulk_upload.id}" get "/sales-logs?bulk_upload_id[]=#{bulk_upload.id}"
expect(page).not_to have_content(excluded_log.id) expect(page).not_to have_content(excluded_log.purchid)
expect(page).not_to have_content(also_excluded_log.id) expect(page).not_to have_content(also_excluded_log.purchid)
end end
end end

Loading…
Cancel
Save