From 9c8b7ae0c769b331f4b535c4e86b9e134ac10554 Mon Sep 17 00:00:00 2001 From: Adam Goldstone <13471320+agoldstone93@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:47:08 +0100 Subject: [PATCH] AP-2416: Revert 'family' to 'Family' Reverting as CategoryOfLawDescription is sent in the CCMS payload from Apply --- .../ccms/attribute_value_generator.rb | 2 +- .../has_other_proceedings/show.html.erb | 2 +- .../proceedings_types/index.html.erb | 2 +- features/support/puffing_billy_helper.rb | 16 ++++++------ spec/factories/proceedings.rb | 26 +++++++++---------- .../emergency_defaults_form_spec.rb | 2 +- .../non_means_tested_attributes_spec.rb | 2 +- .../passported_attributes_spec.rb | 2 +- .../proceeding_types/all_spec.rb | 12 ++++----- .../proceeding_types/proceeding_spec.rb | 4 +-- 10 files changed, 35 insertions(+), 35 deletions(-) diff --git a/app/services/ccms/attribute_value_generator.rb b/app/services/ccms/attribute_value_generator.rb index 31903de09d6..dffd9019c19 100644 --- a/app/services/ccms/attribute_value_generator.rb +++ b/app/services/ccms/attribute_value_generator.rb @@ -209,7 +209,7 @@ def lead_proceeding_category_of_law(_options) end def lead_proceeding_category_of_law_is_family?(_options) - lead_proceeding.category_of_law == "family" + lead_proceeding.category_of_law == "Family" end def lead_proceeding_meaning(_options) diff --git a/app/views/providers/has_other_proceedings/show.html.erb b/app/views/providers/has_other_proceedings/show.html.erb index fc0eeca7f5c..d6fa1b5bcbd 100644 --- a/app/views/providers/has_other_proceedings/show.html.erb +++ b/app/views/providers/has_other_proceedings/show.html.erb @@ -10,7 +10,7 @@ <%= summary_list.with_row(html_attributes: { id: "proceeding_type_#{proceeding.ccms_code}" }) do |row| %> <%= row.with_value do %> <%= proceeding.meaning %>
- <%= proceeding.matter_type.humanize %>, <%= proceeding.category_of_law %> + <%= proceeding.matter_type.humanize %>, <%= proceeding.category_of_law.downcase %> <% end %> <% if proceeding.sca_type == "core" && @legal_aid_application.related_proceedings.any? %> <%= row.with_action( diff --git a/app/views/providers/proceedings_types/index.html.erb b/app/views/providers/proceedings_types/index.html.erb index 7e44ce77d3c..ca9ac47ebd9 100644 --- a/app/views/providers/proceedings_types/index.html.erb +++ b/app/views/providers/proceedings_types/index.html.erb @@ -55,7 +55,7 @@ :id, proceeding_type.ccms_code, label: { text: proceeding_type.meaning }, - hint: { text: "#{proceeding_type.ccms_matter.humanize}, #{proceeding_type.ccms_category_law}" }, + hint: { text: "#{proceeding_type.ccms_matter.humanize}, #{proceeding_type.ccms_category_law.downcase}" }, ) %> <% end %> diff --git a/features/support/puffing_billy_helper.rb b/features/support/puffing_billy_helper.rb index 694ebf5692c..b9d6da35700 100644 --- a/features/support/puffing_billy_helper.rb +++ b/features/support/puffing_billy_helper.rb @@ -166,7 +166,7 @@ def proceeding_search_term_stubs ccms_code: "DA004", description: "to be represented on an application for a non-molestation order.", full_s8_only: false, - ccms_category_law: "family", + ccms_category_law: "Family", ccms_matter: "domestic abuse (DA)", }, ], @@ -180,7 +180,7 @@ def proceeding_search_term_stubs ccms_code: "DA001", description: "to be represented on an application for an injunction, order or declaration under the inherent jurisdiction of the court.", full_s8_only: false, - ccms_category_law: "family", + ccms_category_law: "Family", ccms_matter: "domestic abuse (DA)", }, { @@ -188,7 +188,7 @@ def proceeding_search_term_stubs ccms_code: "DA003", description: "to be represented in an action for an injunction under section 3 Protection from Harassment Act 1997.", full_s8_only: false, - ccms_category_law: "family", + ccms_category_law: "Family", ccms_matter: "domestic abuse (DA)", }, ], @@ -202,7 +202,7 @@ def proceeding_search_term_stubs ccms_code: "DA005", description: "to be represented on an application for an occupation order.", full_s8_only: false, - ccms_category_law: "family", + ccms_category_law: "Family", ccms_matter: "domestic abuse (DA)", }, ], @@ -216,7 +216,7 @@ def proceeding_search_term_stubs ccms_code: "DA020", description: "To be represented on an application for a Female Genital Mutilation Protection Order under the Female Genital Mutilation Act.", full_s8_only: false, - ccms_category_law: "family", + ccms_category_law: "Family", ccms_matter: "domestic abuse (DA)", }, ], @@ -230,7 +230,7 @@ def proceeding_search_term_stubs ccms_code: "DA003", description: "to be represented in an action for an injunction under section 3 Protection from Harassment Act 1997.", full_s8_only: false, - ccms_category_law: "family", + ccms_category_law: "Family", ccms_matter: "domestic abuse (DA)", }, { @@ -238,7 +238,7 @@ def proceeding_search_term_stubs ccms_code: "DA004", description: "to be represented on an application for a non-molestation order.", full_s8_only: false, - ccms_category_law: "family", + ccms_category_law: "Family", ccms_matter: "domestic abuse (DA)", }, ], @@ -252,7 +252,7 @@ def proceeding_search_term_stubs ccms_code: "SE014", description: "to be represented on an application for a child arrangements order - where the child(ren) will live", full_s8_only: false, - ccms_category_law: "family", + ccms_category_law: "Family", ccms_matter: "section 8 children (S8)", }, ], diff --git a/spec/factories/proceedings.rb b/spec/factories/proceedings.rb index 6780c3adba1..b10a2b76d9d 100644 --- a/spec/factories/proceedings.rb +++ b/spec/factories/proceedings.rb @@ -63,7 +63,7 @@ used_delegated_functions_reported_on { nil } name { "inherent_jurisdiction_high_court_injunction" } matter_type { "Domestic Abuse" } - category_of_law { "family" } + category_of_law { "Family" } category_law_code { "MAT" } ccms_matter_code { "MINJN" } client_involvement_type_ccms_code { "A" } @@ -90,7 +90,7 @@ used_delegated_functions_reported_on { Time.zone.today } name { "variation_or_discharge_under_section_protection_from_harassment_act" } matter_type { "Domestic Abuse" } - category_of_law { "family" } + category_of_law { "Family" } category_law_code { "MAT" } ccms_matter_code { "MINJN" } client_involvement_type_ccms_code { "A" } @@ -114,7 +114,7 @@ used_delegated_functions_reported_on { Time.zone.today } name { "occupation_order" } matter_type { "Domestic Abuse" } - category_of_law { "family" } + category_of_law { "Family" } category_law_code { "MAT" } ccms_matter_code { "MINJN" } client_involvement_type_ccms_code { "A" } @@ -138,7 +138,7 @@ used_delegated_functions_reported_on { Time.zone.today } name { "extend_variation_or_discharge_part_iv" } matter_type { "Domestic Abuse" } - category_of_law { "family" } + category_of_law { "Family" } category_law_code { "MAT" } ccms_matter_code { "MINJN" } client_involvement_type_ccms_code { "A" } @@ -162,7 +162,7 @@ used_delegated_functions_reported_on { Time.zone.today } name { "nonmolestation_order" } matter_type { "Domestic Abuse" } - category_of_law { "family" } + category_of_law { "Family" } category_law_code { "MAT" } ccms_matter_code { "MINJN" } client_involvement_type_ccms_code { "A" } @@ -186,7 +186,7 @@ used_delegated_functions_reported_on { nil } name { "prohibited_steps_order_s8" } matter_type { "section 8 children (S8)" } - category_of_law { "family" } + category_of_law { "Family" } category_law_code { "MAT" } ccms_matter_code { "KSEC8" } client_involvement_type_ccms_code { "A" } @@ -210,7 +210,7 @@ used_delegated_functions_reported_on { nil } name { "specified_issue_order_s8" } matter_type { "Section 8 orders" } - category_of_law { "family" } + category_of_law { "Family" } category_law_code { "MAT" } ccms_matter_code { "KSEC8" } client_involvement_type_ccms_code { "A" } @@ -234,7 +234,7 @@ used_delegated_functions_reported_on { nil } name { "child_arrangements_order_contact" } matter_type { "Section 8 orders" } - category_of_law { "family" } + category_of_law { "Family" } category_law_code { "MAT" } ccms_matter_code { "KSEC8" } client_involvement_type_ccms_code { "A" } @@ -258,7 +258,7 @@ used_delegated_functions_reported_on { nil } name { "child_arrangements_order_residence" } matter_type { "Section 8 orders" } - category_of_law { "family" } + category_of_law { "Family" } category_law_code { "MAT" } ccms_matter_code { "KSEC8" } client_involvement_type_ccms_code { "A" } @@ -290,7 +290,7 @@ used_delegated_functions_reported_on { nil } name { "CAO contact-Appeal" } matter_type { "Section 8 orders" } - category_of_law { "family" } + category_of_law { "Family" } category_law_code { "MAT" } ccms_matter_code { "KSEC8" } client_involvement_type_ccms_code { "A" } @@ -309,7 +309,7 @@ used_delegated_functions_reported_on { nil } name { "child_assessment_order_sca" } matter_type { "special children act (SCA)" } - category_of_law { "family" } + category_of_law { "Family" } category_law_code { "MAT" } ccms_matter_code { "KPBLW" } client_involvement_type_ccms_code { "A" } @@ -332,7 +332,7 @@ used_delegated_functions_reported_on { nil } name { "app_contact_child_in_care_sca" } matter_type { "special children act (SCA)" } - category_of_law { "family" } + category_of_law { "Family" } category_law_code { "MAT" } ccms_matter_code { "KPBLW" } client_involvement_type_ccms_code { "A" } @@ -352,7 +352,7 @@ used_delegated_functions_reported_on { nil } name { "app_for_supervision_order_sca" } matter_type { "special children act (SCA)" } - category_of_law { "family" } + category_of_law { "Family" } category_law_code { "MAT" } ccms_matter_code { "KPBLW" } client_involvement_type_ccms_code { "A" } diff --git a/spec/forms/proceedings/emergency_defaults_form_spec.rb b/spec/forms/proceedings/emergency_defaults_form_spec.rb index 5f904688406..6fbd192e0e9 100644 --- a/spec/forms/proceedings/emergency_defaults_form_spec.rb +++ b/spec/forms/proceedings/emergency_defaults_form_spec.rb @@ -16,7 +16,7 @@ used_delegated_functions_reported_on: Time.zone.today, name: "inherent_jurisdiction_high_court_injunction", matter_type: "Domestic Abuse", - category_of_law: "family", + category_of_law: "Family", category_law_code: "MAT", ccms_matter_code: "MINJN", client_involvement_type_ccms_code: "A", diff --git a/spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_means_tested_attributes_spec.rb b/spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_means_tested_attributes_spec.rb index a29b1b102c3..d1220fc78a7 100644 --- a/spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_means_tested_attributes_spec.rb +++ b/spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_means_tested_attributes_spec.rb @@ -967,7 +967,7 @@ module Requestors it "adds APP_IS_FAMILY attribute with value from application to merits assessment section" do block = XmlExtractor.call(xml, :global_merits, "APP_IS_FAMILY") - expect(block).to have_boolean_response(proceeding.category_of_law == "family") + expect(block).to have_boolean_response(proceeding.category_of_law == "Family") end it "adds CAT_OF_LAW_DESCRIPTION attribute with value from application to merits assessment section" do diff --git a/spec/services/ccms/requestors/case_add_requestor_xml_blocks/passported_attributes_spec.rb b/spec/services/ccms/requestors/case_add_requestor_xml_blocks/passported_attributes_spec.rb index 21f4ada0829..c3bba82a68c 100644 --- a/spec/services/ccms/requestors/case_add_requestor_xml_blocks/passported_attributes_spec.rb +++ b/spec/services/ccms/requestors/case_add_requestor_xml_blocks/passported_attributes_spec.rb @@ -1359,7 +1359,7 @@ module Requestors it "populates APP_IS_FAMILY" do block = XmlExtractor.call(xml, :global_merits, "APP_IS_FAMILY") - expect(block).to have_boolean_response(proceeding.category_of_law == "family") + expect(block).to have_boolean_response(proceeding.category_of_law == "Family") end it "populates CAT_OF_LAW_DESCRIPTION" do diff --git a/spec/services/legal_framework/proceeding_types/all_spec.rb b/spec/services/legal_framework/proceeding_types/all_spec.rb index f808a82d742..b9bf0ff01a3 100644 --- a/spec/services/legal_framework/proceeding_types/all_spec.rb +++ b/spec/services/legal_framework/proceeding_types/all_spec.rb @@ -42,7 +42,7 @@ def all_proceeding_types_payload full_s8_only: false, sca_core: false, sca_related: false, - ccms_category_law: "family", + ccms_category_law: "Family", ccms_category_law_code: "MAT", ccms_matter_code: "MINJN", ccms_matter: "domestic abuse (DA)", @@ -54,7 +54,7 @@ def all_proceeding_types_payload full_s8_only: true, sca_core: false, sca_related: false, - ccms_category_law: "family", + ccms_category_law: "Family", ccms_category_law_code: "MAT", ccms_matter_code: "KSEC8", ccms_matter: "section 8 children (S8)", @@ -66,7 +66,7 @@ def all_proceeding_types_payload full_s8_only: false, sca_core: false, sca_related: false, - ccms_category_law: "family", + ccms_category_law: "Family", ccms_category_law_code: "MAT", ccms_matter_code: "MINJN", ccms_matter: "domestic abuse (DA)", @@ -78,7 +78,7 @@ def all_proceeding_types_payload full_s8_only: true, sca_core: false, sca_related: false, - ccms_category_law: "family", + ccms_category_law: "Family", ccms_category_law_code: "MAT", ccms_matter_code: "KSEC8", ccms_matter: "section 8 children (S8)", @@ -90,7 +90,7 @@ def all_proceeding_types_payload full_s8_only: false, sca_core: false, sca_related: false, - ccms_category_law: "family", + ccms_category_law: "Family", ccms_category_law_code: "MAT", ccms_matter_code: "MINJN", ccms_matter: "domestic abuse (DA)", @@ -102,7 +102,7 @@ def all_proceeding_types_payload full_s8_only: false, sca_core: true, sca_related: false, - ccms_category_law: "family", + ccms_category_law: "Family", ccms_category_law_code: "MAT", ccms_matter_code: "KPBLW", ccms_matter: "special children act (SCA)", diff --git a/spec/services/legal_framework/proceeding_types/proceeding_spec.rb b/spec/services/legal_framework/proceeding_types/proceeding_spec.rb index 4007f683051..1108bb12620 100644 --- a/spec/services/legal_framework/proceeding_types/proceeding_spec.rb +++ b/spec/services/legal_framework/proceeding_types/proceeding_spec.rb @@ -29,9 +29,9 @@ it "has the expected values in all attributes" do response = call - expect(response.ccms_category_law).to eq "family" + expect(response.ccms_category_law).to eq "Family" expect(response.ccms_category_law_code).to eq "MAT" - expect(response.ccms_matter).to eq "domestic abuse (DA)" + expect(response.ccms_matter).to eq "Domestic abuse" expect(response.ccms_matter_code).to eq "MINJN" expect(response.cost_limitations).to eq expected_cost_limitations expect(response.default_scope_limitations).to eq expected_default_scope_limitations