From 9f6d7a0463581b475547b7a477a9d9d3c218091e Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Tue, 2 Jul 2024 15:20:53 +0100 Subject: [PATCH 01/25] New migration file to create london_fees column/attribute in Claim model. New attribute is set to be a boolean, with null values enabled to not break compatibility with existing claim entries. --- ...708_add_london_fees_attribute_to_claims.rb | 5 + db/schema.rb | 199 +++++++++--------- 2 files changed, 105 insertions(+), 99 deletions(-) create mode 100644 db/migrate/20240702094708_add_london_fees_attribute_to_claims.rb diff --git a/db/migrate/20240702094708_add_london_fees_attribute_to_claims.rb b/db/migrate/20240702094708_add_london_fees_attribute_to_claims.rb new file mode 100644 index 0000000000..071366366c --- /dev/null +++ b/db/migrate/20240702094708_add_london_fees_attribute_to_claims.rb @@ -0,0 +1,5 @@ +class AddLondonFeesAttributeToClaims < ActiveRecord::Migration[7.0] + def change + add_column :claims, :london_fees, :boolean, null: true + end +end diff --git a/db/schema.rb b/db/schema.rb index 832d46556e..aae67cca18 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2024_04_19_173039) do +ActiveRecord::Schema[7.0].define(version: 2024_07_02_094708) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" enable_extension "uuid-ossp" @@ -20,7 +20,7 @@ t.string "record_type", null: false t.bigint "record_id", null: false t.bigint "blob_id", null: false - t.datetime "created_at", null: false + t.datetime "created_at", precision: nil, null: false t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true end @@ -32,7 +32,7 @@ t.text "metadata" t.bigint "byte_size", null: false t.string "checksum", null: false - t.datetime "created_at", null: false + t.datetime "created_at", precision: nil, null: false t.string "service_name", null: false t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true end @@ -55,8 +55,8 @@ create_table "case_types", id: :serial, force: :cascade do |t| t.string "name" t.boolean "is_fixed_fee" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.boolean "requires_cracked_dates" t.boolean "requires_trial_dates" t.boolean "allow_pcmh_fee_type", default: false @@ -70,18 +70,18 @@ create_table "case_worker_claims", id: :serial, force: :cascade do |t| t.integer "case_worker_id" t.integer "claim_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["case_worker_id"], name: "index_case_worker_claims_on_case_worker_id" t.index ["claim_id"], name: "index_case_worker_claims_on_claim_id" end create_table "case_workers", id: :serial, force: :cascade do |t| - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "location_id" t.string "roles" - t.datetime "deleted_at" + t.datetime "deleted_at", precision: nil t.uuid "uuid", default: -> { "uuid_generate_v4()" } t.index ["location_id"], name: "index_case_workers_on_location_id" end @@ -89,8 +89,8 @@ create_table "certification_types", id: :serial, force: :cascade do |t| t.string "name" t.boolean "pre_may_2015", default: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "roles" t.index ["name"], name: "index_certification_types_on_name" end @@ -99,15 +99,15 @@ t.integer "claim_id" t.string "certified_by" t.date "certification_date" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "certification_type_id" end create_table "claim_intentions", id: :serial, force: :cascade do |t| t.string "form_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.integer "user_id" t.index ["form_id"], name: "index_claim_intentions_on_form_id" end @@ -118,7 +118,7 @@ t.string "event" t.string "from" t.string "to" - t.datetime "created_at" + t.datetime "created_at", precision: nil t.string "reason_code" t.integer "author_id" t.integer "subject_id" @@ -130,7 +130,7 @@ t.text "additional_information" t.boolean "apply_vat" t.string "state" - t.datetime "last_submitted_at" + t.datetime "last_submitted_at", precision: nil t.string "case_number" t.string "advocate_category" t.date "first_day_of_trial" @@ -142,11 +142,11 @@ t.integer "external_user_id" t.integer "court_id" t.integer "offence_id" - t.datetime "created_at" - t.datetime "updated_at" - t.datetime "valid_until" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil + t.datetime "valid_until", precision: nil t.string "cms_number" - t.datetime "authorised_at" + t.datetime "authorised_at", precision: nil t.integer "creator_id" t.text "evidence_notes" t.string "evidence_checklist_ids" @@ -160,7 +160,7 @@ t.uuid "uuid", default: -> { "uuid_generate_v4()" } t.integer "case_type_id" t.string "form_id" - t.datetime "original_submission_date" + t.datetime "original_submission_date", precision: nil t.date "retrial_started_at" t.integer "retrial_estimated_length", default: 0 t.integer "retrial_actual_length", default: 0 @@ -175,8 +175,8 @@ t.string "allocation_type" t.string "transfer_case_number" t.integer "clone_source_id" - t.datetime "last_edited_at" - t.datetime "deleted_at" + t.datetime "last_edited_at", precision: nil + t.datetime "deleted_at", precision: nil t.string "providers_ref" t.boolean "disk_evidence", default: false t.decimal "fees_vat", default: "0.0" @@ -188,6 +188,7 @@ t.boolean "prosecution_evidence" t.bigint "case_stage_id" t.date "main_hearing_date" + t.boolean "london_fees" t.index ["case_number"], name: "index_claims_on_case_number" t.index ["case_stage_id"], name: "index_claims_on_case_stage_id" t.index ["cms_number"], name: "index_claims_on_cms_number" @@ -207,8 +208,8 @@ t.string "code" t.string "name" t.string "court_type" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["code"], name: "index_courts_on_code" t.index ["court_type"], name: "index_courts_on_court_type" t.index ["name"], name: "index_courts_on_name" @@ -216,8 +217,8 @@ create_table "dates_attended", id: :serial, force: :cascade do |t| t.date "date" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.date "date_to" t.uuid "uuid", default: -> { "uuid_generate_v4()" } t.string "attended_item_type" @@ -231,8 +232,8 @@ t.date "date_of_birth" t.boolean "order_for_judicial_apportionment" t.integer "claim_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.uuid "uuid", default: -> { "uuid_generate_v4()" } t.index ["claim_id"], name: "index_defendants_on_claim_id" end @@ -243,8 +244,8 @@ t.decimal "fees", default: "0.0" t.decimal "expenses", default: "0.0" t.decimal "total" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.float "vat_amount", default: 0.0 t.decimal "disbursements", default: "0.0" t.index ["claim_id"], name: "index_determinations_on_claim_id" @@ -252,9 +253,9 @@ create_table "disbursement_types", id: :serial, force: :cascade do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" - t.datetime "deleted_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil + t.datetime "deleted_at", precision: nil t.string "unique_code" t.index ["name"], name: "index_disbursement_types_on_name" t.index ["unique_code"], name: "index_disbursement_types_on_unique_code", unique: true @@ -265,8 +266,8 @@ t.integer "claim_id" t.decimal "net_amount" t.decimal "vat_amount" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.decimal "total", default: "0.0" t.uuid "uuid", default: -> { "uuid_generate_v4()" } t.index ["claim_id"], name: "index_disbursements_on_claim_id" @@ -275,8 +276,8 @@ create_table "documents", id: :serial, force: :cascade do |t| t.integer "claim_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "external_user_id" t.uuid "uuid", default: -> { "uuid_generate_v4()" } t.string "form_id" @@ -293,15 +294,15 @@ t.string "name" t.string "category" t.string "postcode" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["category"], name: "index_establishments_on_category" end create_table "expense_types", id: :serial, force: :cascade do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "roles" t.string "reason_set" t.string "unique_code" @@ -316,8 +317,8 @@ t.float "quantity" t.decimal "rate" t.decimal "amount" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.uuid "uuid", default: -> { "uuid_generate_v4()" } t.integer "reason_id" t.string "reason_text" @@ -334,14 +335,14 @@ end create_table "external_users", id: :serial, force: :cascade do |t| - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "supplier_number" t.uuid "uuid", default: -> { "uuid_generate_v4()" } t.boolean "vat_registered", default: true t.integer "provider_id" t.string "roles" - t.datetime "deleted_at" + t.datetime "deleted_at", precision: nil t.index ["provider_id"], name: "index_external_users_on_provider_id" t.index ["supplier_number"], name: "index_external_users_on_supplier_number" end @@ -349,17 +350,17 @@ create_table "fee_schemes", id: :serial, force: :cascade do |t| t.string "name" t.integer "version" - t.datetime "start_date" - t.datetime "end_date" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "start_date", precision: nil + t.datetime "end_date", precision: nil + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "fee_types", id: :serial, force: :cascade do |t| t.string "description" t.string "code" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.decimal "max_amount" t.boolean "calculated", default: true t.string "type" @@ -378,8 +379,8 @@ t.integer "fee_type_id" t.decimal "quantity" t.decimal "amount" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.uuid "uuid", default: -> { "uuid_generate_v4()" } t.decimal "rate" t.string "type" @@ -397,10 +398,10 @@ create_table "injection_attempts", id: :serial, force: :cascade do |t| t.integer "claim_id" t.boolean "succeeded" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.json "error_messages" - t.datetime "deleted_at" + t.datetime "deleted_at", precision: nil t.index ["claim_id"], name: "index_injection_attempts_on_claim_id" end @@ -414,8 +415,8 @@ create_table "locations", id: :serial, force: :cascade do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["name"], name: "index_locations_on_name" end @@ -423,8 +424,8 @@ t.text "body" t.integer "claim_id" t.integer "sender_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["claim_id"], name: "index_messages_on_claim_id" t.index ["sender_id"], name: "index_messages_on_sender_id" end @@ -442,11 +443,11 @@ t.date "trial_cracked_at" t.date "trial_fixed_at" t.date "trial_fixed_notice_at" - t.datetime "authorised_at" - t.datetime "created_at" - t.datetime "date_last_assessed" - t.datetime "last_submitted_at" - t.datetime "original_submission_date" + t.datetime "authorised_at", precision: nil + t.datetime "created_at", precision: nil + t.datetime "date_last_assessed", precision: nil + t.datetime "last_submitted_at", precision: nil + t.datetime "original_submission_date", precision: nil t.decimal "amount_authorised" t.decimal "amount_claimed" t.decimal "disbursements_total" @@ -496,23 +497,23 @@ t.integer "number" t.string "description" t.integer "offence_category_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["offence_category_id"], name: "index_offence_bands_on_offence_category_id" end create_table "offence_categories", id: :serial, force: :cascade do |t| t.integer "number" t.string "description" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "offence_classes", id: :serial, force: :cascade do |t| t.string "class_letter" t.string "description" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["class_letter"], name: "index_offence_classes_on_class_letter" t.index ["description"], name: "index_offence_classes_on_description" end @@ -527,8 +528,8 @@ create_table "offences", id: :serial, force: :cascade do |t| t.string "description" t.integer "offence_class_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "unique_code", default: "anyoldrubbish", null: false t.integer "offence_band_id" t.string "contrary" @@ -545,8 +546,8 @@ t.boolean "vat_registered" t.uuid "uuid" t.uuid "api_key" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.string "roles" t.index ["firm_agfs_supplier_number"], name: "index_providers_on_firm_agfs_supplier_number" t.index ["name"], name: "index_providers_on_name" @@ -555,8 +556,8 @@ create_table "representation_orders", id: :serial, force: :cascade do |t| t.integer "defendant_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "maat_reference" t.date "representation_order_date" t.uuid "uuid", default: -> { "uuid_generate_v4()" } @@ -566,13 +567,13 @@ create_table "stats_reports", id: :serial, force: :cascade do |t| t.string "report_name" t.string "status" - t.datetime "started_at" - t.datetime "completed_at" + t.datetime "started_at", precision: nil + t.datetime "completed_at", precision: nil end create_table "super_admins", id: :serial, force: :cascade do |t| - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "supplier_numbers", id: :serial, force: :cascade do |t| @@ -595,8 +596,8 @@ t.integer "user_id" t.integer "message_id" t.boolean "read", default: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["message_id"], name: "index_user_message_statuses_on_message_id" t.index ["read"], name: "index_user_message_statuses_on_read" t.index ["user_id"], name: "index_user_message_statuses_on_user_id" @@ -606,26 +607,26 @@ t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false t.string "reset_password_token" - t.datetime "reset_password_sent_at" - t.datetime "remember_created_at" + t.datetime "reset_password_sent_at", precision: nil + t.datetime "remember_created_at", precision: nil t.integer "sign_in_count", default: 0, null: false - t.datetime "current_sign_in_at" - t.datetime "last_sign_in_at" + t.datetime "current_sign_in_at", precision: nil + t.datetime "last_sign_in_at", precision: nil t.inet "current_sign_in_ip" t.inet "last_sign_in_ip" t.string "persona_type" t.integer "persona_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "first_name" t.string "last_name" t.integer "failed_attempts", default: 0, null: false - t.datetime "locked_at" + t.datetime "locked_at", precision: nil t.string "unlock_token" t.text "settings" - t.datetime "deleted_at" + t.datetime "deleted_at", precision: nil t.uuid "api_key", default: -> { "uuid_generate_v4()" } - t.datetime "disabled_at" + t.datetime "disabled_at", precision: nil t.index ["email"], name: "index_users_on_email", unique: true t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true @@ -634,8 +635,8 @@ create_table "vat_rates", id: :serial, force: :cascade do |t| t.integer "rate_base_points" t.date "effective_date" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "versions", id: :serial, force: :cascade do |t| @@ -644,7 +645,7 @@ t.string "event", null: false t.string "whodunnit" t.text "object" - t.datetime "created_at" + t.datetime "created_at", precision: nil t.text "object_changes" t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id" end From a5b3f15c3c5b8dd2cbd514a7dd31a1a863ef9288 Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Fri, 5 Jul 2024 16:59:50 +0100 Subject: [PATCH 02/25] Create new step definitions and modify existing litigator tests to check for London Fees field --- .../scheme_nine/hardship_claim_draft_submit.feature | 2 ++ .../scheme_nine/interim_trial_claim_draft_submit.feature | 2 ++ .../interim_trial_warrant_claim_draft_submit.feature | 2 ++ .../litigator_contempt_claim_draft_submit.feature | 2 ++ .../litigator_contempt_claim_with_errors_submit.feature | 2 ++ .../litigator/scheme_nine/litigator_expense_page.feature | 2 ++ .../litigator_trial_claim_draft_submit.feature | 2 ++ .../scheme_nine/transfer_claim_draft_submit.feature | 2 ++ .../scheme_nine_a/hardship_claim_draft_submit.feature | 2 ++ .../interim_trial_claim_draft_submit.feature | 2 ++ .../interim_trial_warrant_claim_draft_submit.feature | 2 ++ .../litigator_contempt_claim_draft_submit.feature | 2 ++ .../litigator_contempt_claim_with_errors_submit.feature | 2 ++ .../scheme_nine_a/litigator_expense_page.feature | 2 ++ .../litigator_trial_claim_draft_submit.feature | 2 ++ .../scheme_nine_a/transfer_claim_draft_submit.feature | 2 ++ .../scheme_ten/hardship_claim_draft_submit.feature | 2 ++ .../scheme_ten/interim_trial_claim_draft_submit.feature | 2 ++ .../interim_trial_warrant_claim_draft_submit.feature | 2 ++ .../litigator_contempt_claim_draft_submit.feature | 2 ++ .../litigator_contempt_claim_with_errors_submit.feature | 3 +++ .../litigator/scheme_ten/litigator_expense_page.feature | 2 ++ .../litigator_trial_claim_draft_submit.feature | 2 ++ .../scheme_ten/transfer_claim_draft_submit.feature | 3 +++ features/page_objects/claim_form_page.rb | 2 ++ features/page_objects/sections/london_fees_section.rb | 7 +++++++ features/step_definitions/common_steps.rb | 9 +++++++++ 27 files changed, 68 insertions(+) create mode 100644 features/page_objects/sections/london_fees_section.rb diff --git a/features/claims/litigator/scheme_nine/hardship_claim_draft_submit.feature b/features/claims/litigator/scheme_nine/hardship_claim_draft_submit.feature index 542d7bc69d..d5625defe1 100644 --- a/features/claims/litigator/scheme_nine/hardship_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine/hardship_claim_draft_submit.feature @@ -12,6 +12,8 @@ Feature: Litigator completes hardship claims Then I should be on the litigator new hardship claim page When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I enter a providers reference of 'LGFS test hardship fee for covid-19' And I select the court 'Blackfriars' And I enter a case number of 'A20201234' diff --git a/features/claims/litigator/scheme_nine/interim_trial_claim_draft_submit.feature b/features/claims/litigator/scheme_nine/interim_trial_claim_draft_submit.feature index 2ca7a8fa71..53b0b30268 100644 --- a/features/claims/litigator/scheme_nine/interim_trial_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine/interim_trial_claim_draft_submit.feature @@ -12,6 +12,8 @@ Feature: Litigator partially fills out a draft interim claim, then later edits a Then I should be on the litigator new interim claim page When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I enter a providers reference of 'LGFS test interim fee' And I select the court 'Blackfriars' And I select a case type of 'Trial' diff --git a/features/claims/litigator/scheme_nine/interim_trial_warrant_claim_draft_submit.feature b/features/claims/litigator/scheme_nine/interim_trial_warrant_claim_draft_submit.feature index f8ae07ba60..c2af08e092 100644 --- a/features/claims/litigator/scheme_nine/interim_trial_warrant_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine/interim_trial_warrant_claim_draft_submit.feature @@ -11,6 +11,8 @@ Feature: Litigator partially fills out a draft interim claim, then later edits a Then I should be on the litigator new interim claim page When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I select the court 'Blackfriars' And I select a case type of 'Trial' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_nine/litigator_contempt_claim_draft_submit.feature b/features/claims/litigator/scheme_nine/litigator_contempt_claim_draft_submit.feature index 5a65ada965..c28e6bb8f7 100644 --- a/features/claims/litigator/scheme_nine/litigator_contempt_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine/litigator_contempt_claim_draft_submit.feature @@ -14,6 +14,8 @@ Feature: Litigator partially fills out a draft final fee claim, then later edits And I should see 3 supplier number radios When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I select a case type of 'Contempt' And I select the court 'Blackfriars' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_nine/litigator_contempt_claim_with_errors_submit.feature b/features/claims/litigator/scheme_nine/litigator_contempt_claim_with_errors_submit.feature index efcb6b62d3..ba8ec3b1a1 100644 --- a/features/claims/litigator/scheme_nine/litigator_contempt_claim_with_errors_submit.feature +++ b/features/claims/litigator/scheme_nine/litigator_contempt_claim_with_errors_submit.feature @@ -12,6 +12,8 @@ Feature: Litigator fills out a final fee claim, there is an error, fixes it and Then I should be on the litigator new claim page When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I select the court 'Blackfriars' And I select a case type of 'Contempt' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_nine/litigator_expense_page.feature b/features/claims/litigator/scheme_nine/litigator_expense_page.feature index fd8cb98182..b69d0dfea9 100644 --- a/features/claims/litigator/scheme_nine/litigator_expense_page.feature +++ b/features/claims/litigator/scheme_nine/litigator_expense_page.feature @@ -11,6 +11,8 @@ Feature: Litigator expense specific page features Then I should be on the litigator new claim page When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I select a case type of 'Trial' And I select the court 'Blackfriars' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_nine/litigator_trial_claim_draft_submit.feature b/features/claims/litigator/scheme_nine/litigator_trial_claim_draft_submit.feature index af98fbfd6b..ccb61bafc4 100644 --- a/features/claims/litigator/scheme_nine/litigator_trial_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine/litigator_trial_claim_draft_submit.feature @@ -21,6 +21,8 @@ Feature: Litigator partially fills out a draft final fee claim, then later edits Then I click "Continue" I should be on the 'Case details' page and see a "Choose a supplier number" error When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I click "Continue" in the claim form Then I should be in the 'Defendant details' form page And I should see a page title "Enter defendant details for litigator final fees claim" diff --git a/features/claims/litigator/scheme_nine/transfer_claim_draft_submit.feature b/features/claims/litigator/scheme_nine/transfer_claim_draft_submit.feature index 7e232d3df1..6497edab0b 100644 --- a/features/claims/litigator/scheme_nine/transfer_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine/transfer_claim_draft_submit.feature @@ -21,6 +21,8 @@ Feature: Litigator partially fills out a draft transfer claim, then later edits And I click "Continue" in the claim form When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I select the court 'Blackfriars' And I enter a case number of 'A20161234' And I enter the case concluded date diff --git a/features/claims/litigator/scheme_nine_a/hardship_claim_draft_submit.feature b/features/claims/litigator/scheme_nine_a/hardship_claim_draft_submit.feature index 5cac521b37..7ec9e55612 100644 --- a/features/claims/litigator/scheme_nine_a/hardship_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine_a/hardship_claim_draft_submit.feature @@ -12,6 +12,8 @@ Feature: Litigator completes hardship claims Then I should be on the litigator new hardship claim page When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I enter a providers reference of 'LGFS test hardship fee for covid-19' And I select the court 'Blackfriars' And I enter a case number of 'A20201234' diff --git a/features/claims/litigator/scheme_nine_a/interim_trial_claim_draft_submit.feature b/features/claims/litigator/scheme_nine_a/interim_trial_claim_draft_submit.feature index 31d5e9c109..3d1977a9b7 100644 --- a/features/claims/litigator/scheme_nine_a/interim_trial_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine_a/interim_trial_claim_draft_submit.feature @@ -12,6 +12,8 @@ Feature: Litigator partially fills out a draft interim claim, then later edits a Then I should be on the litigator new interim claim page When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I enter a providers reference of 'LGFS test interim fee' And I select the court 'Blackfriars' And I select a case type of 'Trial' diff --git a/features/claims/litigator/scheme_nine_a/interim_trial_warrant_claim_draft_submit.feature b/features/claims/litigator/scheme_nine_a/interim_trial_warrant_claim_draft_submit.feature index 09bf93bb06..134b15170e 100644 --- a/features/claims/litigator/scheme_nine_a/interim_trial_warrant_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine_a/interim_trial_warrant_claim_draft_submit.feature @@ -11,6 +11,8 @@ Feature: Litigator partially fills out a draft interim claim, then later edits a Then I should be on the litigator new interim claim page When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I select the court 'Blackfriars' And I select a case type of 'Trial' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_nine_a/litigator_contempt_claim_draft_submit.feature b/features/claims/litigator/scheme_nine_a/litigator_contempt_claim_draft_submit.feature index f9bf39423d..15add0ac93 100644 --- a/features/claims/litigator/scheme_nine_a/litigator_contempt_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine_a/litigator_contempt_claim_draft_submit.feature @@ -14,6 +14,8 @@ Feature: Litigator partially fills out a draft final fee claim, then later edits And I should see 3 supplier number radios When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I select a case type of 'Contempt' And I select the court 'Blackfriars' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_nine_a/litigator_contempt_claim_with_errors_submit.feature b/features/claims/litigator/scheme_nine_a/litigator_contempt_claim_with_errors_submit.feature index bb807a2c8a..1a4a49d54b 100644 --- a/features/claims/litigator/scheme_nine_a/litigator_contempt_claim_with_errors_submit.feature +++ b/features/claims/litigator/scheme_nine_a/litigator_contempt_claim_with_errors_submit.feature @@ -12,6 +12,8 @@ Feature: Litigator fills out a final fee claim, there is an error, fixes it and Then I should be on the litigator new claim page When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I select the court 'Blackfriars' And I select a case type of 'Contempt' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_nine_a/litigator_expense_page.feature b/features/claims/litigator/scheme_nine_a/litigator_expense_page.feature index d66855c12f..a19edbca86 100644 --- a/features/claims/litigator/scheme_nine_a/litigator_expense_page.feature +++ b/features/claims/litigator/scheme_nine_a/litigator_expense_page.feature @@ -11,6 +11,8 @@ Feature: Litigator expense specific page features Then I should be on the litigator new claim page When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I select a case type of 'Trial' And I select the court 'Blackfriars' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_nine_a/litigator_trial_claim_draft_submit.feature b/features/claims/litigator/scheme_nine_a/litigator_trial_claim_draft_submit.feature index 282f831732..aaf1be90b6 100644 --- a/features/claims/litigator/scheme_nine_a/litigator_trial_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine_a/litigator_trial_claim_draft_submit.feature @@ -21,6 +21,8 @@ Feature: Litigator partially fills out a draft final fee claim, then later edits Then I click "Continue" I should be on the 'Case details' page and see a "Choose a supplier number" error When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I click "Continue" in the claim form Then I should be in the 'Defendant details' form page And I should see a page title "Enter defendant details for litigator final fees claim" diff --git a/features/claims/litigator/scheme_nine_a/transfer_claim_draft_submit.feature b/features/claims/litigator/scheme_nine_a/transfer_claim_draft_submit.feature index c3e4b8e7ed..98b3bbc1ae 100644 --- a/features/claims/litigator/scheme_nine_a/transfer_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine_a/transfer_claim_draft_submit.feature @@ -21,6 +21,8 @@ Feature: Litigator partially fills out a draft transfer claim, then later edits And I click "Continue" in the claim form When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I select the court 'Blackfriars' And I enter a case number of 'A20161234' And I enter the case concluded date '2022-10-21' diff --git a/features/claims/litigator/scheme_ten/hardship_claim_draft_submit.feature b/features/claims/litigator/scheme_ten/hardship_claim_draft_submit.feature index ce0c57098a..8eb201ab6b 100644 --- a/features/claims/litigator/scheme_ten/hardship_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_ten/hardship_claim_draft_submit.feature @@ -13,6 +13,8 @@ Feature: Litigator completes hardship claims Then I should be on the litigator new hardship claim page When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I enter a providers reference of 'LGFS test hardship fee for covid-19' And I select the court 'Blackfriars' And I enter a case number of 'A20201234' diff --git a/features/claims/litigator/scheme_ten/interim_trial_claim_draft_submit.feature b/features/claims/litigator/scheme_ten/interim_trial_claim_draft_submit.feature index b30aedbe4d..7f19373d58 100644 --- a/features/claims/litigator/scheme_ten/interim_trial_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_ten/interim_trial_claim_draft_submit.feature @@ -13,6 +13,8 @@ Feature: Litigator partially fills out a draft interim claim, then later edits a Then I should be on the litigator new interim claim page When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I enter a providers reference of 'LGFS test interim fee' And I select the court 'Blackfriars' And I select a case type of 'Trial' diff --git a/features/claims/litigator/scheme_ten/interim_trial_warrant_claim_draft_submit.feature b/features/claims/litigator/scheme_ten/interim_trial_warrant_claim_draft_submit.feature index f2dc4f75f0..4919af0c6a 100644 --- a/features/claims/litigator/scheme_ten/interim_trial_warrant_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_ten/interim_trial_warrant_claim_draft_submit.feature @@ -12,6 +12,8 @@ Feature: Litigator partially fills out a draft interim claim, then later edits a Then I should be on the litigator new interim claim page When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I select the court 'Blackfriars' And I select a case type of 'Trial' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_ten/litigator_contempt_claim_draft_submit.feature b/features/claims/litigator/scheme_ten/litigator_contempt_claim_draft_submit.feature index e30bb8330d..16db6f5de3 100644 --- a/features/claims/litigator/scheme_ten/litigator_contempt_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_ten/litigator_contempt_claim_draft_submit.feature @@ -15,6 +15,8 @@ Feature: Litigator partially fills out a draft final fee claim, then later edits And I should see 3 supplier number radios When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I select a case type of 'Contempt' And I select the court 'Blackfriars' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_ten/litigator_contempt_claim_with_errors_submit.feature b/features/claims/litigator/scheme_ten/litigator_contempt_claim_with_errors_submit.feature index 4ebf89f5fe..ca47f91b08 100644 --- a/features/claims/litigator/scheme_ten/litigator_contempt_claim_with_errors_submit.feature +++ b/features/claims/litigator/scheme_ten/litigator_contempt_claim_with_errors_submit.feature @@ -13,12 +13,15 @@ Feature: Litigator fills out a final fee claim, there is an error, fixes it and Then I should be on the litigator new claim page When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I select the court 'Blackfriars' And I select a case type of 'Contempt' And I enter a case number of 'A20161234' And I enter the case concluded date '2022-10-01' And I enter lgfs scheme 10 main hearing date + Then I click "Continue" in the claim form and move to the 'Defendant details' form page And I enter defendant, LGFS Scheme 10 representation order and MAAT reference diff --git a/features/claims/litigator/scheme_ten/litigator_expense_page.feature b/features/claims/litigator/scheme_ten/litigator_expense_page.feature index 89fb864db3..3662f0d0fa 100644 --- a/features/claims/litigator/scheme_ten/litigator_expense_page.feature +++ b/features/claims/litigator/scheme_ten/litigator_expense_page.feature @@ -12,6 +12,8 @@ Feature: Litigator expense specific page features Then I should be on the litigator new claim page When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I select a case type of 'Trial' And I select the court 'Blackfriars' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_ten/litigator_trial_claim_draft_submit.feature b/features/claims/litigator/scheme_ten/litigator_trial_claim_draft_submit.feature index 8755d53b53..23dc34d65b 100644 --- a/features/claims/litigator/scheme_ten/litigator_trial_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_ten/litigator_trial_claim_draft_submit.feature @@ -13,6 +13,7 @@ Feature: Litigator partially fills out a draft final fee claim, then later edits Then I should be on the litigator new claim page And I should see a page title "Enter case details for litigator final fees claim" And I should see 3 supplier number radios + And I should see the London fee radios When I select a case type of 'Trial' And I select the court 'Blackfriars' @@ -22,6 +23,7 @@ Feature: Litigator partially fills out a draft final fee claim, then later edits Then I click "Continue" I should be on the 'Case details' page and see a "Choose a supplier number" error When I choose the supplier number '1A222Z' + And I select 'Yes' to London fees And I click "Continue" in the claim form Then I should be in the 'Defendant details' form page And I should see a page title "Enter defendant details for litigator final fees claim" diff --git a/features/claims/litigator/scheme_ten/transfer_claim_draft_submit.feature b/features/claims/litigator/scheme_ten/transfer_claim_draft_submit.feature index b766c31cc2..9050a7f5dc 100644 --- a/features/claims/litigator/scheme_ten/transfer_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_ten/transfer_claim_draft_submit.feature @@ -22,12 +22,15 @@ Feature: Litigator partially fills out a draft transfer claim, then later edits And I click "Continue" in the claim form When I choose the supplier number '1A222Z' + And I should see the London fee radios + And I select 'Yes' to London fees And I select the court 'Blackfriars' And I enter a case number of 'A20161234' And I enter the case concluded date '2022-10-21' And I enter lgfs scheme 10 main hearing date And I should see a page title "Enter case details for litigator transfer fees claim" + Then I click "Continue" in the claim form and move to the 'Defendant details' form page And I should see a page title "Enter defendant details for litigator transfer fees claim" diff --git a/features/page_objects/claim_form_page.rb b/features/page_objects/claim_form_page.rb index f3539ebc75..9f236b5785 100644 --- a/features/page_objects/claim_form_page.rb +++ b/features/page_objects/claim_form_page.rb @@ -2,6 +2,7 @@ require_relative 'sections/common_autocomplete_section' require_relative 'sections/govuk_date_section' require_relative 'sections/supplier_numbers_section' +require_relative 'sections/london_fees_section' require_relative 'sections/retrial_section' require_relative 'sections/cracked_trial_section' require_relative 'sections/fee_dates_section' @@ -88,6 +89,7 @@ class ClaimFormPage < BasePage section :lgfs_supplier_number_radios, SupplierNumberRadioSection, '.lgfs-supplier-numbers' section :auto_lgfs_supplier_number, CommonAutocomplete, ".lgfs-supplier-numbers" + section :london_fees, LondonFeesRadioSection, ".london_fees" section :prosecution_evidence, YesNoSection, '.prosecution-evidence' diff --git a/features/page_objects/sections/london_fees_section.rb b/features/page_objects/sections/london_fees_section.rb new file mode 100644 index 0000000000..8194731635 --- /dev/null +++ b/features/page_objects/sections/london_fees_section.rb @@ -0,0 +1,7 @@ +class LondonFeesSection < SitePrism::Section + element :radio, 'label' +end + +class LondonFeesRadioSection < SitePrism::Section + sections :london_fees_options, LondonFeesSection, '.govuk-radios__item' +end diff --git a/features/step_definitions/common_steps.rb b/features/step_definitions/common_steps.rb index f910456b7a..12ec5bb7f5 100644 --- a/features/step_definitions/common_steps.rb +++ b/features/step_definitions/common_steps.rb @@ -47,6 +47,15 @@ @claim_form_page.select_supplier_number(number) end +And (/^I should see the London fee radios$/) do + expect(@claim_form_page.london_fees).to be_visible +end + +And (/^I select '(.*)' to London fees$/) do |text| + @claim_form_page.london_fees.choose('Yes') if option.downcase == 'yes' + @claim_form_page.london_fees.choose('No') if option.downcase == 'no' +end + When(/^I select the offence category '(.*?)'$/) do |offence_cat| @claim_form_page.auto_offence.choose_autocomplete_option(offence_cat) wait_for_ajax From dba5019745c1a1b6f085edfecbc217ed56a2d312 Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Thu, 4 Jul 2024 17:17:30 +0100 Subject: [PATCH 03/25] Add new entries for london fees to en translation file --- config/locales/en.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/locales/en.yml b/config/locales/en.yml index 2beef7ca46..a945467ad2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1081,6 +1081,9 @@ en: offence_class: 'Offence class' offence_category: 'Offence category' select_category: 'Please select' + london_fees: + london_fee_title: "Is the firm based in a London borough?" + london_fee_hint: "We need to know this to check the correct rates have been used in your application." offence_select: offence_class: 'Offence class' select_offence_class: 'Please select' From e38d46264b6cdbc620c3a9f5e00eff93a23182d7 Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Thu, 4 Jul 2024 17:24:25 +0100 Subject: [PATCH 04/25] Create new partial and render it in the case details _fields.html.haml view --- .../external_users/claims/case_details/_fields.html.haml | 3 +++ .../external_users/claims/case_details/_london_fees.html.haml | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 app/views/external_users/claims/case_details/_london_fees.html.haml diff --git a/app/views/external_users/claims/case_details/_fields.html.haml b/app/views/external_users/claims/case_details/_fields.html.haml index 40c13ce6c1..da957b3f32 100644 --- a/app/views/external_users/claims/case_details/_fields.html.haml +++ b/app/views/external_users/claims/case_details/_fields.html.haml @@ -7,6 +7,9 @@ label: { text: t('common.external_user.providers_ref') }, width: 'one-half' + - if @claim.lgfs? + = render partial: 'external_users/claims/case_details/london_fees', locals: { f: f } + - if @claim.requires_case_type? = render partial: 'external_users/claims/case_details/case_type_fields', locals: { f: f } diff --git a/app/views/external_users/claims/case_details/_london_fees.html.haml b/app/views/external_users/claims/case_details/_london_fees.html.haml new file mode 100644 index 0000000000..f8937eef4d --- /dev/null +++ b/app/views/external_users/claims/case_details/_london_fees.html.haml @@ -0,0 +1,4 @@ += f.govuk_radio_buttons_fieldset :london_fees, legend: { size: 'm', text: t('.london_fee_title') }, hint: { text: t('.london_fee_hint') } do + = f.govuk_radio_button :london_fees, true, label: { text: t('global_yes') } + = f.govuk_radio_button :london_fees, false, label: { text: t('global_no') } + From e312ccd85d5bb6de962337e204981c4d504f35ee Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Thu, 4 Jul 2024 17:40:01 +0100 Subject: [PATCH 05/25] Add london_fees to allowable params in ClaimsController, radiobuttons are now functional and will store a true or false value in the created claim. --- app/controllers/external_users/claims_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/external_users/claims_controller.rb b/app/controllers/external_users/claims_controller.rb index e9cb879e0d..ce1b0298bb 100644 --- a/app/controllers/external_users/claims_controller.rb +++ b/app/controllers/external_users/claims_controller.rb @@ -294,6 +294,7 @@ def claim_params :case_type_id, :case_stage_id, :offence_id, + :london_fees, :travel_expense_additional_information, :first_day_of_trial, :estimated_trial_length, From 87b15650589421e035930d6cbb800e835b3fefa0 Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Mon, 15 Jul 2024 18:01:44 +0100 Subject: [PATCH 06/25] Testing cleanup *** Some tweaks to make cucumber tests work properly *** Added a test to claims_controller_spec.rb to confirm that the new attribute is working in the backend. --- .../claims/case_details/_london_fees.html.haml | 7 ++++--- features/page_objects/claim_form_page.rb | 2 +- features/page_objects/sections/london_fees_section.rb | 2 ++ features/step_definitions/common_steps.rb | 6 +++--- .../external_users/litigators/claims_controller_spec.rb | 5 +++++ 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/app/views/external_users/claims/case_details/_london_fees.html.haml b/app/views/external_users/claims/case_details/_london_fees.html.haml index f8937eef4d..5f19afb898 100644 --- a/app/views/external_users/claims/case_details/_london_fees.html.haml +++ b/app/views/external_users/claims/case_details/_london_fees.html.haml @@ -1,4 +1,5 @@ -= f.govuk_radio_buttons_fieldset :london_fees, legend: { size: 'm', text: t('.london_fee_title') }, hint: { text: t('.london_fee_hint') } do - = f.govuk_radio_button :london_fees, true, label: { text: t('global_yes') } - = f.govuk_radio_button :london_fees, false, label: { text: t('global_no') } +.london-fees{ id: 'london-fees' } + = f.govuk_radio_buttons_fieldset :london_fees, legend: { size: 'm', text: t('.london_fee_title') }, hint: { text: t('.london_fee_hint') } do + = f.govuk_radio_button :london_fees, true, label: { text: t('global_yes') } + = f.govuk_radio_button :london_fees, false, label: { text: t('global_no') } diff --git a/features/page_objects/claim_form_page.rb b/features/page_objects/claim_form_page.rb index 9f236b5785..7d67a0a14b 100644 --- a/features/page_objects/claim_form_page.rb +++ b/features/page_objects/claim_form_page.rb @@ -89,7 +89,7 @@ class ClaimFormPage < BasePage section :lgfs_supplier_number_radios, SupplierNumberRadioSection, '.lgfs-supplier-numbers' section :auto_lgfs_supplier_number, CommonAutocomplete, ".lgfs-supplier-numbers" - section :london_fees, LondonFeesRadioSection, ".london_fees" + section :london_fees, LondonFeesRadioSection, ".london-fees" section :prosecution_evidence, YesNoSection, '.prosecution-evidence' diff --git a/features/page_objects/sections/london_fees_section.rb b/features/page_objects/sections/london_fees_section.rb index 8194731635..db778e6204 100644 --- a/features/page_objects/sections/london_fees_section.rb +++ b/features/page_objects/sections/london_fees_section.rb @@ -4,4 +4,6 @@ class LondonFeesSection < SitePrism::Section class LondonFeesRadioSection < SitePrism::Section sections :london_fees_options, LondonFeesSection, '.govuk-radios__item' + element :yes, "label[for='claim-london-fees-true-field']" + element :no, "label[for='claim-london-fees-field']" end diff --git a/features/step_definitions/common_steps.rb b/features/step_definitions/common_steps.rb index 12ec5bb7f5..d4cee49f21 100644 --- a/features/step_definitions/common_steps.rb +++ b/features/step_definitions/common_steps.rb @@ -51,9 +51,9 @@ expect(@claim_form_page.london_fees).to be_visible end -And (/^I select '(.*)' to London fees$/) do |text| - @claim_form_page.london_fees.choose('Yes') if option.downcase == 'yes' - @claim_form_page.london_fees.choose('No') if option.downcase == 'no' +And (/^I select '(.*)' to London fees$/) do |option| + @claim_form_page.london_fees.yes.click if option.downcase == 'yes' + @claim_form_page.london_fees.no.click if option.downcase == 'no' end When(/^I select the offence category '(.*?)'$/) do |offence_cat| diff --git a/spec/controllers/external_users/litigators/claims_controller_spec.rb b/spec/controllers/external_users/litigators/claims_controller_spec.rb index 4d3b2efc5d..f9ab3fbfb5 100644 --- a/spec/controllers/external_users/litigators/claims_controller_spec.rb +++ b/spec/controllers/external_users/litigators/claims_controller_spec.rb @@ -235,6 +235,10 @@ def expense_params expect(assigns(:claim).graduated_fee.amount).to eq 2000 end + it 'sets the london fee attribute' do + expect(assigns(:claim).london_fees).to be true + end + it 'creates the miscellaneous fees' do expect(assigns(:claim).misc_fees.size).to eq 2 expect(assigns(:claim).misc_fees.sum(&:amount)).to eq 375 @@ -465,6 +469,7 @@ def valid_claim_fee_params { 'source' => 'web', 'supplier_number' => supplier_number, + 'london_fees' => true, 'case_type_id' => case_type.id.to_s, 'court_id' => court.id.to_s, 'case_number' => 'A20161234', From a3bb5251765ffbda009adea1fbaceb60dbebbd4a Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Tue, 16 Jul 2024 09:45:09 +0100 Subject: [PATCH 07/25] Adding feature tests to check for London Fees on the claim summary page. Failing as expected. --- .../litigator/scheme_nine/hardship_claim_draft_submit.feature | 1 + .../scheme_nine/interim_trial_claim_draft_submit.feature | 1 + .../scheme_nine/litigator_trial_claim_draft_submit.feature | 1 + .../scheme_nine_a/hardship_claim_draft_submit.feature | 1 + .../scheme_nine_a/interim_trial_claim_draft_submit.feature | 1 + .../scheme_nine_a/litigator_trial_claim_draft_submit.feature | 1 + .../litigator/scheme_ten/hardship_claim_draft_submit.feature | 3 ++- .../scheme_ten/interim_trial_claim_draft_submit.feature | 3 ++- .../scheme_ten/litigator_trial_claim_draft_submit.feature | 3 ++- 9 files changed, 12 insertions(+), 3 deletions(-) diff --git a/features/claims/litigator/scheme_nine/hardship_claim_draft_submit.feature b/features/claims/litigator/scheme_nine/hardship_claim_draft_submit.feature index d5625defe1..e1dd359157 100644 --- a/features/claims/litigator/scheme_nine/hardship_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine/hardship_claim_draft_submit.feature @@ -59,6 +59,7 @@ Feature: Litigator completes hardship claims And I should see 'Blackfriars' And I should see 'A20201234' And I should see 'Pre PTPH or PTPH adjourned' + And I should see 'This claim qualifies for London fee rates' And I should see 'Handling stolen goods' And I should see 'G: Other offences of dishonesty between £30,001 and £100,000' diff --git a/features/claims/litigator/scheme_nine/interim_trial_claim_draft_submit.feature b/features/claims/litigator/scheme_nine/interim_trial_claim_draft_submit.feature index 53b0b30268..589be665cb 100644 --- a/features/claims/litigator/scheme_nine/interim_trial_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine/interim_trial_claim_draft_submit.feature @@ -31,6 +31,7 @@ Feature: Litigator partially fills out a draft interim claim, then later edits a Then Claim 'A20161234' should be listed with a status of 'Draft' When I click the claim 'A20161234' + Then I should see 'This claim qualifies for London fee rates' And I edit the claim's defendants And I enter defendant, LGFS representation order and MAAT reference diff --git a/features/claims/litigator/scheme_nine/litigator_trial_claim_draft_submit.feature b/features/claims/litigator/scheme_nine/litigator_trial_claim_draft_submit.feature index ccb61bafc4..7120514883 100644 --- a/features/claims/litigator/scheme_nine/litigator_trial_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine/litigator_trial_claim_draft_submit.feature @@ -35,6 +35,7 @@ Feature: Litigator partially fills out a draft final fee claim, then later edits Then Claim 'A20161234' should be listed with a status of 'Draft' When I click the claim 'A20161234' + Then I should see 'This claim qualifies for London fee rates' And I edit the claim's case details And I should see a page title "Enter case details for litigator final fees claim" And I should see a supplier number select list diff --git a/features/claims/litigator/scheme_nine_a/hardship_claim_draft_submit.feature b/features/claims/litigator/scheme_nine_a/hardship_claim_draft_submit.feature index 7ec9e55612..97cb12ea1b 100644 --- a/features/claims/litigator/scheme_nine_a/hardship_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine_a/hardship_claim_draft_submit.feature @@ -59,6 +59,7 @@ Feature: Litigator completes hardship claims And I should see 'Blackfriars' And I should see 'A20201234' And I should see 'Pre PTPH or PTPH adjourned' + And I should see 'This claim qualifies for London fee rates' And I should see 'Handling stolen goods' And I should see 'G: Other offences of dishonesty between £30,001 and £100,000' diff --git a/features/claims/litigator/scheme_nine_a/interim_trial_claim_draft_submit.feature b/features/claims/litigator/scheme_nine_a/interim_trial_claim_draft_submit.feature index 3d1977a9b7..87f40f308c 100644 --- a/features/claims/litigator/scheme_nine_a/interim_trial_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine_a/interim_trial_claim_draft_submit.feature @@ -31,6 +31,7 @@ Feature: Litigator partially fills out a draft interim claim, then later edits a Then Claim 'A20161234' should be listed with a status of 'Draft' When I click the claim 'A20161234' + Then I should see 'This claim qualifies for London fee rates' And I edit the claim's defendants And I enter defendant, LGFS Scheme 9a representation order and MAAT reference diff --git a/features/claims/litigator/scheme_nine_a/litigator_trial_claim_draft_submit.feature b/features/claims/litigator/scheme_nine_a/litigator_trial_claim_draft_submit.feature index aaf1be90b6..289ad24e93 100644 --- a/features/claims/litigator/scheme_nine_a/litigator_trial_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine_a/litigator_trial_claim_draft_submit.feature @@ -35,6 +35,7 @@ Feature: Litigator partially fills out a draft final fee claim, then later edits Then Claim 'A20161234' should be listed with a status of 'Draft' When I click the claim 'A20161234' + Then I should see 'This claim qualifies for London fee rates' And I edit the claim's case details And I should see a page title "Enter case details for litigator final fees claim" And I should see a supplier number select list diff --git a/features/claims/litigator/scheme_ten/hardship_claim_draft_submit.feature b/features/claims/litigator/scheme_ten/hardship_claim_draft_submit.feature index 8eb201ab6b..967527a1a9 100644 --- a/features/claims/litigator/scheme_ten/hardship_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_ten/hardship_claim_draft_submit.feature @@ -14,7 +14,7 @@ Feature: Litigator completes hardship claims When I choose the supplier number '1A222Z' And I should see the London fee radios - And I select 'Yes' to London fees + And I select 'No' to London fees And I enter a providers reference of 'LGFS test hardship fee for covid-19' And I select the court 'Blackfriars' And I enter a case number of 'A20201234' @@ -60,6 +60,7 @@ Feature: Litigator completes hardship claims And I should see 'Blackfriars' And I should see 'A20201234' And I should see 'Pre PTPH or PTPH adjourned' + And I should see 'This claim does not qualify for London fee rates' And I should see 'Handling stolen goods' And I should see 'G: Other offences of dishonesty between £30,001 and £100,000' diff --git a/features/claims/litigator/scheme_ten/interim_trial_claim_draft_submit.feature b/features/claims/litigator/scheme_ten/interim_trial_claim_draft_submit.feature index 7f19373d58..cba1b5cdd1 100644 --- a/features/claims/litigator/scheme_ten/interim_trial_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_ten/interim_trial_claim_draft_submit.feature @@ -14,7 +14,7 @@ Feature: Litigator partially fills out a draft interim claim, then later edits a When I choose the supplier number '1A222Z' And I should see the London fee radios - And I select 'Yes' to London fees + And I select 'No' to London fees And I enter a providers reference of 'LGFS test interim fee' And I select the court 'Blackfriars' And I select a case type of 'Trial' @@ -32,6 +32,7 @@ Feature: Litigator partially fills out a draft interim claim, then later edits a Then Claim 'A20161234' should be listed with a status of 'Draft' When I click the claim 'A20161234' + Then I should see 'This claim does not qualify for London fee rates' And I edit the claim's defendants And I enter defendant, LGFS Scheme 10 representation order and MAAT reference diff --git a/features/claims/litigator/scheme_ten/litigator_trial_claim_draft_submit.feature b/features/claims/litigator/scheme_ten/litigator_trial_claim_draft_submit.feature index 23dc34d65b..dab9beac97 100644 --- a/features/claims/litigator/scheme_ten/litigator_trial_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_ten/litigator_trial_claim_draft_submit.feature @@ -23,7 +23,7 @@ Feature: Litigator partially fills out a draft final fee claim, then later edits Then I click "Continue" I should be on the 'Case details' page and see a "Choose a supplier number" error When I choose the supplier number '1A222Z' - And I select 'Yes' to London fees + And I select 'No' to London fees And I click "Continue" in the claim form Then I should be in the 'Defendant details' form page And I should see a page title "Enter defendant details for litigator final fees claim" @@ -36,6 +36,7 @@ Feature: Litigator partially fills out a draft final fee claim, then later edits Then Claim 'A20161234' should be listed with a status of 'Draft' When I click the claim 'A20161234' + Then I should see 'This case does not qualify for London fee rates' And I edit the claim's case details And I should see a page title "Enter case details for litigator final fees claim" And I should see a supplier number select list From 8f04f71445750135a680c677317178f25738beaf Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Tue, 16 Jul 2024 10:58:10 +0100 Subject: [PATCH 08/25] Adding new row to Case Details summary form to show London Fee attribute --- .../external_users/claims/case_details/_summary.html.haml | 3 +++ config/locales/en.yml | 3 +++ .../scheme_ten/litigator_trial_claim_draft_submit.feature | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/external_users/claims/case_details/_summary.html.haml b/app/views/external_users/claims/case_details/_summary.html.haml index 1800745f38..36b49ee5a4 100644 --- a/app/views/external_users/claims/case_details/_summary.html.haml +++ b/app/views/external_users/claims/case_details/_summary.html.haml @@ -28,6 +28,9 @@ .unique-id-small = claim.unique_id + - if claim.lgfs? + = govuk_summary_list_row_collection( t('external_users.claims.case_details.london_fees.london_fee') ) { t("external_users.claims.case_details.london_fees.london_fee_#{claim.london_fees}") unless claim.london_fees.nil? } + - if claim.transfer_court.present? = govuk_summary_list_row_collection( t('common.transfer_court') ) { claim.transfer_court.name if claim.transfer_court } diff --git a/config/locales/en.yml b/config/locales/en.yml index a945467ad2..6402b10174 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1082,6 +1082,9 @@ en: offence_category: 'Offence category' select_category: 'Please select' london_fees: + london_fee: "London Fees" + london_fee_true: "This claim qualifies for London fee rates" + london_fee_false: "This claim does not qualify for London fee rates" london_fee_title: "Is the firm based in a London borough?" london_fee_hint: "We need to know this to check the correct rates have been used in your application." offence_select: diff --git a/features/claims/litigator/scheme_ten/litigator_trial_claim_draft_submit.feature b/features/claims/litigator/scheme_ten/litigator_trial_claim_draft_submit.feature index dab9beac97..ede66578d5 100644 --- a/features/claims/litigator/scheme_ten/litigator_trial_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_ten/litigator_trial_claim_draft_submit.feature @@ -36,7 +36,7 @@ Feature: Litigator partially fills out a draft final fee claim, then later edits Then Claim 'A20161234' should be listed with a status of 'Draft' When I click the claim 'A20161234' - Then I should see 'This case does not qualify for London fee rates' + Then I should see 'This claim does not qualify for London fee rates' And I edit the claim's case details And I should see a page title "Enter case details for litigator final fees claim" And I should see a supplier number select list From 2cee46d02281d843d9c30e4481cfb2dcc2dcbada Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Tue, 16 Jul 2024 17:20:10 +0100 Subject: [PATCH 09/25] Refactoring to change london_fees to london_rates_apply --- app/controllers/external_users/claims_controller.rb | 2 +- .../claims/case_details/_fields.html.haml | 2 +- .../claims/case_details/_london_fees.html.haml | 5 ----- .../claims/case_details/_london_rates.html.haml | 5 +++++ .../claims/case_details/_summary.html.haml | 2 +- config/locales/en.yml | 12 ++++++------ ...0702094708_add_london_fees_attribute_to_claims.rb | 5 ----- ...708_add_london_rates_apply_attribute_to_claims.rb | 5 +++++ db/schema.rb | 2 +- .../scheme_nine/hardship_claim_draft_submit.feature | 4 ++-- .../interim_trial_claim_draft_submit.feature | 4 ++-- .../interim_trial_warrant_claim_draft_submit.feature | 4 ++-- .../litigator_contempt_claim_draft_submit.feature | 4 ++-- ...tigator_contempt_claim_with_errors_submit.feature | 4 ++-- .../scheme_nine/litigator_expense_page.feature | 4 ++-- .../litigator_trial_claim_draft_submit.feature | 4 ++-- .../scheme_nine/transfer_claim_draft_submit.feature | 4 ++-- .../hardship_claim_draft_submit.feature | 4 ++-- .../interim_trial_claim_draft_submit.feature | 4 ++-- .../interim_trial_warrant_claim_draft_submit.feature | 4 ++-- .../litigator_contempt_claim_draft_submit.feature | 4 ++-- ...tigator_contempt_claim_with_errors_submit.feature | 4 ++-- .../scheme_nine_a/litigator_expense_page.feature | 4 ++-- .../litigator_trial_claim_draft_submit.feature | 4 ++-- .../transfer_claim_draft_submit.feature | 4 ++-- .../scheme_ten/hardship_claim_draft_submit.feature | 4 ++-- .../interim_trial_claim_draft_submit.feature | 4 ++-- .../interim_trial_warrant_claim_draft_submit.feature | 4 ++-- .../litigator_contempt_claim_draft_submit.feature | 4 ++-- ...tigator_contempt_claim_with_errors_submit.feature | 4 ++-- .../scheme_ten/litigator_expense_page.feature | 4 ++-- .../litigator_trial_claim_draft_submit.feature | 4 ++-- .../scheme_ten/transfer_claim_draft_submit.feature | 4 ++-- features/page_objects/claim_form_page.rb | 4 ++-- .../page_objects/sections/london_fees_section.rb | 9 --------- .../page_objects/sections/london_rates_section.rb | 9 +++++++++ features/step_definitions/common_steps.rb | 10 +++++----- .../litigators/claims_controller_spec.rb | 6 +++--- 38 files changed, 87 insertions(+), 87 deletions(-) delete mode 100644 app/views/external_users/claims/case_details/_london_fees.html.haml create mode 100644 app/views/external_users/claims/case_details/_london_rates.html.haml delete mode 100644 db/migrate/20240702094708_add_london_fees_attribute_to_claims.rb create mode 100644 db/migrate/20240702094708_add_london_rates_apply_attribute_to_claims.rb delete mode 100644 features/page_objects/sections/london_fees_section.rb create mode 100644 features/page_objects/sections/london_rates_section.rb diff --git a/app/controllers/external_users/claims_controller.rb b/app/controllers/external_users/claims_controller.rb index ce1b0298bb..c2c55af1a0 100644 --- a/app/controllers/external_users/claims_controller.rb +++ b/app/controllers/external_users/claims_controller.rb @@ -294,7 +294,7 @@ def claim_params :case_type_id, :case_stage_id, :offence_id, - :london_fees, + :london_rates_apply, :travel_expense_additional_information, :first_day_of_trial, :estimated_trial_length, diff --git a/app/views/external_users/claims/case_details/_fields.html.haml b/app/views/external_users/claims/case_details/_fields.html.haml index da957b3f32..4e7b9b9b8e 100644 --- a/app/views/external_users/claims/case_details/_fields.html.haml +++ b/app/views/external_users/claims/case_details/_fields.html.haml @@ -8,7 +8,7 @@ width: 'one-half' - if @claim.lgfs? - = render partial: 'external_users/claims/case_details/london_fees', locals: { f: f } + = render partial: 'external_users/claims/case_details/london_rates', locals: { f: f } - if @claim.requires_case_type? = render partial: 'external_users/claims/case_details/case_type_fields', locals: { f: f } diff --git a/app/views/external_users/claims/case_details/_london_fees.html.haml b/app/views/external_users/claims/case_details/_london_fees.html.haml deleted file mode 100644 index 5f19afb898..0000000000 --- a/app/views/external_users/claims/case_details/_london_fees.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -.london-fees{ id: 'london-fees' } - = f.govuk_radio_buttons_fieldset :london_fees, legend: { size: 'm', text: t('.london_fee_title') }, hint: { text: t('.london_fee_hint') } do - = f.govuk_radio_button :london_fees, true, label: { text: t('global_yes') } - = f.govuk_radio_button :london_fees, false, label: { text: t('global_no') } - diff --git a/app/views/external_users/claims/case_details/_london_rates.html.haml b/app/views/external_users/claims/case_details/_london_rates.html.haml new file mode 100644 index 0000000000..1722443e5a --- /dev/null +++ b/app/views/external_users/claims/case_details/_london_rates.html.haml @@ -0,0 +1,5 @@ +.london-rates{ id: 'london-rates' } + = f.govuk_radio_buttons_fieldset :london_rates_apply, legend: { size: 'm', text: t('.london_rates_title') }, hint: { text: t('.london_rates_hint') } do + = f.govuk_radio_button :london_rates_apply, true, label: { text: t('global_yes') } + = f.govuk_radio_button :london_rates_apply, false, label: { text: t('global_no') } + diff --git a/app/views/external_users/claims/case_details/_summary.html.haml b/app/views/external_users/claims/case_details/_summary.html.haml index 36b49ee5a4..6d264c2ea5 100644 --- a/app/views/external_users/claims/case_details/_summary.html.haml +++ b/app/views/external_users/claims/case_details/_summary.html.haml @@ -29,7 +29,7 @@ = claim.unique_id - if claim.lgfs? - = govuk_summary_list_row_collection( t('external_users.claims.case_details.london_fees.london_fee') ) { t("external_users.claims.case_details.london_fees.london_fee_#{claim.london_fees}") unless claim.london_fees.nil? } + = govuk_summary_list_row_collection( t('external_users.claims.case_details.london_rates.london_rates') ) { t("external_users.claims.case_details.london_rates.london_rates_#{claim.london_rates_apply}") unless claim.london_rates_apply.nil? } - if claim.transfer_court.present? = govuk_summary_list_row_collection( t('common.transfer_court') ) { claim.transfer_court.name if claim.transfer_court } diff --git a/config/locales/en.yml b/config/locales/en.yml index 6402b10174..52fd84c9cf 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1081,12 +1081,12 @@ en: offence_class: 'Offence class' offence_category: 'Offence category' select_category: 'Please select' - london_fees: - london_fee: "London Fees" - london_fee_true: "This claim qualifies for London fee rates" - london_fee_false: "This claim does not qualify for London fee rates" - london_fee_title: "Is the firm based in a London borough?" - london_fee_hint: "We need to know this to check the correct rates have been used in your application." + london_rates: + london_rates: "London fee rates" + london_rates_true: "This claim qualifies for London fee rates" + london_rates_false: "This claim does not qualify for London fee rates" + london_rates_title: "Is the firm based in a London borough?" + london_rates_hint: "We need to know this to check the correct rates have been used in your application." offence_select: offence_class: 'Offence class' select_offence_class: 'Please select' diff --git a/db/migrate/20240702094708_add_london_fees_attribute_to_claims.rb b/db/migrate/20240702094708_add_london_fees_attribute_to_claims.rb deleted file mode 100644 index 071366366c..0000000000 --- a/db/migrate/20240702094708_add_london_fees_attribute_to_claims.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddLondonFeesAttributeToClaims < ActiveRecord::Migration[7.0] - def change - add_column :claims, :london_fees, :boolean, null: true - end -end diff --git a/db/migrate/20240702094708_add_london_rates_apply_attribute_to_claims.rb b/db/migrate/20240702094708_add_london_rates_apply_attribute_to_claims.rb new file mode 100644 index 0000000000..c9002555aa --- /dev/null +++ b/db/migrate/20240702094708_add_london_rates_apply_attribute_to_claims.rb @@ -0,0 +1,5 @@ +class AddLondonRatesApplyAttributeToClaims < ActiveRecord::Migration[7.0] + def change + add_column :claims, :london_rates_apply, :boolean, null: true + end +end diff --git a/db/schema.rb b/db/schema.rb index aae67cca18..e0a715b27b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -188,7 +188,7 @@ t.boolean "prosecution_evidence" t.bigint "case_stage_id" t.date "main_hearing_date" - t.boolean "london_fees" + t.boolean "london_rates_apply" t.index ["case_number"], name: "index_claims_on_case_number" t.index ["case_stage_id"], name: "index_claims_on_case_stage_id" t.index ["cms_number"], name: "index_claims_on_cms_number" diff --git a/features/claims/litigator/scheme_nine/hardship_claim_draft_submit.feature b/features/claims/litigator/scheme_nine/hardship_claim_draft_submit.feature index e1dd359157..55141e11ce 100644 --- a/features/claims/litigator/scheme_nine/hardship_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine/hardship_claim_draft_submit.feature @@ -12,8 +12,8 @@ Feature: Litigator completes hardship claims Then I should be on the litigator new hardship claim page When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I enter a providers reference of 'LGFS test hardship fee for covid-19' And I select the court 'Blackfriars' And I enter a case number of 'A20201234' diff --git a/features/claims/litigator/scheme_nine/interim_trial_claim_draft_submit.feature b/features/claims/litigator/scheme_nine/interim_trial_claim_draft_submit.feature index 589be665cb..251b7c5c8a 100644 --- a/features/claims/litigator/scheme_nine/interim_trial_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine/interim_trial_claim_draft_submit.feature @@ -12,8 +12,8 @@ Feature: Litigator partially fills out a draft interim claim, then later edits a Then I should be on the litigator new interim claim page When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I enter a providers reference of 'LGFS test interim fee' And I select the court 'Blackfriars' And I select a case type of 'Trial' diff --git a/features/claims/litigator/scheme_nine/interim_trial_warrant_claim_draft_submit.feature b/features/claims/litigator/scheme_nine/interim_trial_warrant_claim_draft_submit.feature index c2af08e092..82efb9fa1b 100644 --- a/features/claims/litigator/scheme_nine/interim_trial_warrant_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine/interim_trial_warrant_claim_draft_submit.feature @@ -11,8 +11,8 @@ Feature: Litigator partially fills out a draft interim claim, then later edits a Then I should be on the litigator new interim claim page When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I select the court 'Blackfriars' And I select a case type of 'Trial' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_nine/litigator_contempt_claim_draft_submit.feature b/features/claims/litigator/scheme_nine/litigator_contempt_claim_draft_submit.feature index c28e6bb8f7..b9b12a32b1 100644 --- a/features/claims/litigator/scheme_nine/litigator_contempt_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine/litigator_contempt_claim_draft_submit.feature @@ -14,8 +14,8 @@ Feature: Litigator partially fills out a draft final fee claim, then later edits And I should see 3 supplier number radios When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I select a case type of 'Contempt' And I select the court 'Blackfriars' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_nine/litigator_contempt_claim_with_errors_submit.feature b/features/claims/litigator/scheme_nine/litigator_contempt_claim_with_errors_submit.feature index ba8ec3b1a1..5ba95f5360 100644 --- a/features/claims/litigator/scheme_nine/litigator_contempt_claim_with_errors_submit.feature +++ b/features/claims/litigator/scheme_nine/litigator_contempt_claim_with_errors_submit.feature @@ -12,8 +12,8 @@ Feature: Litigator fills out a final fee claim, there is an error, fixes it and Then I should be on the litigator new claim page When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I select the court 'Blackfriars' And I select a case type of 'Contempt' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_nine/litigator_expense_page.feature b/features/claims/litigator/scheme_nine/litigator_expense_page.feature index b69d0dfea9..28ef7400dc 100644 --- a/features/claims/litigator/scheme_nine/litigator_expense_page.feature +++ b/features/claims/litigator/scheme_nine/litigator_expense_page.feature @@ -11,8 +11,8 @@ Feature: Litigator expense specific page features Then I should be on the litigator new claim page When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I select a case type of 'Trial' And I select the court 'Blackfriars' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_nine/litigator_trial_claim_draft_submit.feature b/features/claims/litigator/scheme_nine/litigator_trial_claim_draft_submit.feature index 7120514883..013a14fc3d 100644 --- a/features/claims/litigator/scheme_nine/litigator_trial_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine/litigator_trial_claim_draft_submit.feature @@ -21,8 +21,8 @@ Feature: Litigator partially fills out a draft final fee claim, then later edits Then I click "Continue" I should be on the 'Case details' page and see a "Choose a supplier number" error When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I click "Continue" in the claim form Then I should be in the 'Defendant details' form page And I should see a page title "Enter defendant details for litigator final fees claim" diff --git a/features/claims/litigator/scheme_nine/transfer_claim_draft_submit.feature b/features/claims/litigator/scheme_nine/transfer_claim_draft_submit.feature index 6497edab0b..dce6532465 100644 --- a/features/claims/litigator/scheme_nine/transfer_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine/transfer_claim_draft_submit.feature @@ -21,8 +21,8 @@ Feature: Litigator partially fills out a draft transfer claim, then later edits And I click "Continue" in the claim form When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I select the court 'Blackfriars' And I enter a case number of 'A20161234' And I enter the case concluded date diff --git a/features/claims/litigator/scheme_nine_a/hardship_claim_draft_submit.feature b/features/claims/litigator/scheme_nine_a/hardship_claim_draft_submit.feature index 97cb12ea1b..a4a4e27037 100644 --- a/features/claims/litigator/scheme_nine_a/hardship_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine_a/hardship_claim_draft_submit.feature @@ -12,8 +12,8 @@ Feature: Litigator completes hardship claims Then I should be on the litigator new hardship claim page When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I enter a providers reference of 'LGFS test hardship fee for covid-19' And I select the court 'Blackfriars' And I enter a case number of 'A20201234' diff --git a/features/claims/litigator/scheme_nine_a/interim_trial_claim_draft_submit.feature b/features/claims/litigator/scheme_nine_a/interim_trial_claim_draft_submit.feature index 87f40f308c..648ace4a3d 100644 --- a/features/claims/litigator/scheme_nine_a/interim_trial_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine_a/interim_trial_claim_draft_submit.feature @@ -12,8 +12,8 @@ Feature: Litigator partially fills out a draft interim claim, then later edits a Then I should be on the litigator new interim claim page When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I enter a providers reference of 'LGFS test interim fee' And I select the court 'Blackfriars' And I select a case type of 'Trial' diff --git a/features/claims/litigator/scheme_nine_a/interim_trial_warrant_claim_draft_submit.feature b/features/claims/litigator/scheme_nine_a/interim_trial_warrant_claim_draft_submit.feature index 134b15170e..fece41b2ca 100644 --- a/features/claims/litigator/scheme_nine_a/interim_trial_warrant_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine_a/interim_trial_warrant_claim_draft_submit.feature @@ -11,8 +11,8 @@ Feature: Litigator partially fills out a draft interim claim, then later edits a Then I should be on the litigator new interim claim page When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I select the court 'Blackfriars' And I select a case type of 'Trial' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_nine_a/litigator_contempt_claim_draft_submit.feature b/features/claims/litigator/scheme_nine_a/litigator_contempt_claim_draft_submit.feature index 15add0ac93..7791f51868 100644 --- a/features/claims/litigator/scheme_nine_a/litigator_contempt_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine_a/litigator_contempt_claim_draft_submit.feature @@ -14,8 +14,8 @@ Feature: Litigator partially fills out a draft final fee claim, then later edits And I should see 3 supplier number radios When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I select a case type of 'Contempt' And I select the court 'Blackfriars' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_nine_a/litigator_contempt_claim_with_errors_submit.feature b/features/claims/litigator/scheme_nine_a/litigator_contempt_claim_with_errors_submit.feature index 1a4a49d54b..138a40ea2f 100644 --- a/features/claims/litigator/scheme_nine_a/litigator_contempt_claim_with_errors_submit.feature +++ b/features/claims/litigator/scheme_nine_a/litigator_contempt_claim_with_errors_submit.feature @@ -12,8 +12,8 @@ Feature: Litigator fills out a final fee claim, there is an error, fixes it and Then I should be on the litigator new claim page When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I select the court 'Blackfriars' And I select a case type of 'Contempt' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_nine_a/litigator_expense_page.feature b/features/claims/litigator/scheme_nine_a/litigator_expense_page.feature index a19edbca86..93536e68ec 100644 --- a/features/claims/litigator/scheme_nine_a/litigator_expense_page.feature +++ b/features/claims/litigator/scheme_nine_a/litigator_expense_page.feature @@ -11,8 +11,8 @@ Feature: Litigator expense specific page features Then I should be on the litigator new claim page When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I select a case type of 'Trial' And I select the court 'Blackfriars' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_nine_a/litigator_trial_claim_draft_submit.feature b/features/claims/litigator/scheme_nine_a/litigator_trial_claim_draft_submit.feature index 289ad24e93..1faf4bd382 100644 --- a/features/claims/litigator/scheme_nine_a/litigator_trial_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine_a/litigator_trial_claim_draft_submit.feature @@ -21,8 +21,8 @@ Feature: Litigator partially fills out a draft final fee claim, then later edits Then I click "Continue" I should be on the 'Case details' page and see a "Choose a supplier number" error When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I click "Continue" in the claim form Then I should be in the 'Defendant details' form page And I should see a page title "Enter defendant details for litigator final fees claim" diff --git a/features/claims/litigator/scheme_nine_a/transfer_claim_draft_submit.feature b/features/claims/litigator/scheme_nine_a/transfer_claim_draft_submit.feature index 98b3bbc1ae..851701e02b 100644 --- a/features/claims/litigator/scheme_nine_a/transfer_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_nine_a/transfer_claim_draft_submit.feature @@ -21,8 +21,8 @@ Feature: Litigator partially fills out a draft transfer claim, then later edits And I click "Continue" in the claim form When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I select the court 'Blackfriars' And I enter a case number of 'A20161234' And I enter the case concluded date '2022-10-21' diff --git a/features/claims/litigator/scheme_ten/hardship_claim_draft_submit.feature b/features/claims/litigator/scheme_ten/hardship_claim_draft_submit.feature index 967527a1a9..edca37957b 100644 --- a/features/claims/litigator/scheme_ten/hardship_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_ten/hardship_claim_draft_submit.feature @@ -13,8 +13,8 @@ Feature: Litigator completes hardship claims Then I should be on the litigator new hardship claim page When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'No' to London fees + And I should see the London rates radios + And I select 'No' to London rates And I enter a providers reference of 'LGFS test hardship fee for covid-19' And I select the court 'Blackfriars' And I enter a case number of 'A20201234' diff --git a/features/claims/litigator/scheme_ten/interim_trial_claim_draft_submit.feature b/features/claims/litigator/scheme_ten/interim_trial_claim_draft_submit.feature index cba1b5cdd1..8d5b956dc2 100644 --- a/features/claims/litigator/scheme_ten/interim_trial_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_ten/interim_trial_claim_draft_submit.feature @@ -13,8 +13,8 @@ Feature: Litigator partially fills out a draft interim claim, then later edits a Then I should be on the litigator new interim claim page When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'No' to London fees + And I should see the London rates radios + And I select 'No' to London rates And I enter a providers reference of 'LGFS test interim fee' And I select the court 'Blackfriars' And I select a case type of 'Trial' diff --git a/features/claims/litigator/scheme_ten/interim_trial_warrant_claim_draft_submit.feature b/features/claims/litigator/scheme_ten/interim_trial_warrant_claim_draft_submit.feature index 4919af0c6a..7a6d7d2025 100644 --- a/features/claims/litigator/scheme_ten/interim_trial_warrant_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_ten/interim_trial_warrant_claim_draft_submit.feature @@ -12,8 +12,8 @@ Feature: Litigator partially fills out a draft interim claim, then later edits a Then I should be on the litigator new interim claim page When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I select the court 'Blackfriars' And I select a case type of 'Trial' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_ten/litigator_contempt_claim_draft_submit.feature b/features/claims/litigator/scheme_ten/litigator_contempt_claim_draft_submit.feature index 16db6f5de3..4d566c8b4d 100644 --- a/features/claims/litigator/scheme_ten/litigator_contempt_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_ten/litigator_contempt_claim_draft_submit.feature @@ -15,8 +15,8 @@ Feature: Litigator partially fills out a draft final fee claim, then later edits And I should see 3 supplier number radios When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I select a case type of 'Contempt' And I select the court 'Blackfriars' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_ten/litigator_contempt_claim_with_errors_submit.feature b/features/claims/litigator/scheme_ten/litigator_contempt_claim_with_errors_submit.feature index ca47f91b08..bca9a90ed6 100644 --- a/features/claims/litigator/scheme_ten/litigator_contempt_claim_with_errors_submit.feature +++ b/features/claims/litigator/scheme_ten/litigator_contempt_claim_with_errors_submit.feature @@ -13,8 +13,8 @@ Feature: Litigator fills out a final fee claim, there is an error, fixes it and Then I should be on the litigator new claim page When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I select the court 'Blackfriars' And I select a case type of 'Contempt' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_ten/litigator_expense_page.feature b/features/claims/litigator/scheme_ten/litigator_expense_page.feature index 3662f0d0fa..ccb418079a 100644 --- a/features/claims/litigator/scheme_ten/litigator_expense_page.feature +++ b/features/claims/litigator/scheme_ten/litigator_expense_page.feature @@ -12,8 +12,8 @@ Feature: Litigator expense specific page features Then I should be on the litigator new claim page When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I select a case type of 'Trial' And I select the court 'Blackfriars' And I enter a case number of 'A20161234' diff --git a/features/claims/litigator/scheme_ten/litigator_trial_claim_draft_submit.feature b/features/claims/litigator/scheme_ten/litigator_trial_claim_draft_submit.feature index ede66578d5..a84f2803dd 100644 --- a/features/claims/litigator/scheme_ten/litigator_trial_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_ten/litigator_trial_claim_draft_submit.feature @@ -13,7 +13,7 @@ Feature: Litigator partially fills out a draft final fee claim, then later edits Then I should be on the litigator new claim page And I should see a page title "Enter case details for litigator final fees claim" And I should see 3 supplier number radios - And I should see the London fee radios + And I should see the London rates radios When I select a case type of 'Trial' And I select the court 'Blackfriars' @@ -23,7 +23,7 @@ Feature: Litigator partially fills out a draft final fee claim, then later edits Then I click "Continue" I should be on the 'Case details' page and see a "Choose a supplier number" error When I choose the supplier number '1A222Z' - And I select 'No' to London fees + And I select 'No' to London rates And I click "Continue" in the claim form Then I should be in the 'Defendant details' form page And I should see a page title "Enter defendant details for litigator final fees claim" diff --git a/features/claims/litigator/scheme_ten/transfer_claim_draft_submit.feature b/features/claims/litigator/scheme_ten/transfer_claim_draft_submit.feature index 9050a7f5dc..d5671f3f7b 100644 --- a/features/claims/litigator/scheme_ten/transfer_claim_draft_submit.feature +++ b/features/claims/litigator/scheme_ten/transfer_claim_draft_submit.feature @@ -22,8 +22,8 @@ Feature: Litigator partially fills out a draft transfer claim, then later edits And I click "Continue" in the claim form When I choose the supplier number '1A222Z' - And I should see the London fee radios - And I select 'Yes' to London fees + And I should see the London rates radios + And I select 'Yes' to London rates And I select the court 'Blackfriars' And I enter a case number of 'A20161234' And I enter the case concluded date '2022-10-21' diff --git a/features/page_objects/claim_form_page.rb b/features/page_objects/claim_form_page.rb index 7d67a0a14b..a39c523ee4 100644 --- a/features/page_objects/claim_form_page.rb +++ b/features/page_objects/claim_form_page.rb @@ -2,7 +2,7 @@ require_relative 'sections/common_autocomplete_section' require_relative 'sections/govuk_date_section' require_relative 'sections/supplier_numbers_section' -require_relative 'sections/london_fees_section' +require_relative 'sections/london_rates_section' require_relative 'sections/retrial_section' require_relative 'sections/cracked_trial_section' require_relative 'sections/fee_dates_section' @@ -89,7 +89,7 @@ class ClaimFormPage < BasePage section :lgfs_supplier_number_radios, SupplierNumberRadioSection, '.lgfs-supplier-numbers' section :auto_lgfs_supplier_number, CommonAutocomplete, ".lgfs-supplier-numbers" - section :london_fees, LondonFeesRadioSection, ".london-fees" + section :london_rates, LondonRatesRadioSection, ".london-rates" section :prosecution_evidence, YesNoSection, '.prosecution-evidence' diff --git a/features/page_objects/sections/london_fees_section.rb b/features/page_objects/sections/london_fees_section.rb deleted file mode 100644 index db778e6204..0000000000 --- a/features/page_objects/sections/london_fees_section.rb +++ /dev/null @@ -1,9 +0,0 @@ -class LondonFeesSection < SitePrism::Section - element :radio, 'label' -end - -class LondonFeesRadioSection < SitePrism::Section - sections :london_fees_options, LondonFeesSection, '.govuk-radios__item' - element :yes, "label[for='claim-london-fees-true-field']" - element :no, "label[for='claim-london-fees-field']" -end diff --git a/features/page_objects/sections/london_rates_section.rb b/features/page_objects/sections/london_rates_section.rb new file mode 100644 index 0000000000..c683ef54f4 --- /dev/null +++ b/features/page_objects/sections/london_rates_section.rb @@ -0,0 +1,9 @@ +class LondonRatesSection < SitePrism::Section + element :radio, 'label' +end + +class LondonRatesRadioSection < SitePrism::Section + sections :london_rates_options, LondonRatesSection, '.govuk-radios__item' + element :yes, "label[for='claim-london-rates-apply-true-field']" + element :no, "label[for='claim-london-rates-apply-field']" +end diff --git a/features/step_definitions/common_steps.rb b/features/step_definitions/common_steps.rb index d4cee49f21..6ea01ebb77 100644 --- a/features/step_definitions/common_steps.rb +++ b/features/step_definitions/common_steps.rb @@ -47,13 +47,13 @@ @claim_form_page.select_supplier_number(number) end -And (/^I should see the London fee radios$/) do - expect(@claim_form_page.london_fees).to be_visible +And (/^I should see the London rates radios$/) do + expect(@claim_form_page.london_rates).to be_visible end -And (/^I select '(.*)' to London fees$/) do |option| - @claim_form_page.london_fees.yes.click if option.downcase == 'yes' - @claim_form_page.london_fees.no.click if option.downcase == 'no' +And (/^I select '(.*)' to London rates$/) do |option| + @claim_form_page.london_rates.yes.click if option.downcase == 'yes' + @claim_form_page.london_rates.no.click if option.downcase == 'no' end When(/^I select the offence category '(.*?)'$/) do |offence_cat| diff --git a/spec/controllers/external_users/litigators/claims_controller_spec.rb b/spec/controllers/external_users/litigators/claims_controller_spec.rb index f9ab3fbfb5..2522be24be 100644 --- a/spec/controllers/external_users/litigators/claims_controller_spec.rb +++ b/spec/controllers/external_users/litigators/claims_controller_spec.rb @@ -235,8 +235,8 @@ def expense_params expect(assigns(:claim).graduated_fee.amount).to eq 2000 end - it 'sets the london fee attribute' do - expect(assigns(:claim).london_fees).to be true + it 'sets the london rates attribute' do + expect(assigns(:claim).london_rates_apply).to be true end it 'creates the miscellaneous fees' do @@ -469,7 +469,7 @@ def valid_claim_fee_params { 'source' => 'web', 'supplier_number' => supplier_number, - 'london_fees' => true, + 'london_rates_apply' => true, 'case_type_id' => case_type.id.to_s, 'court_id' => court.id.to_s, 'case_number' => 'A20161234', From 68cb2b6f406bfe1b9a1060c7c256acba627273cd Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Thu, 18 Jul 2024 16:48:14 +0100 Subject: [PATCH 10/25] New tests created for creation and validation of claims through the API --- .../v1/external_users/claims/final_claim_spec.rb | 1 + .../external_users/claims/interim_claim_spec.rb | 1 + .../claims/litigators/hardship_claim_spec.rb | 1 + .../external_users/claims/transfer_claim_spec.rb | 1 + spec/support/shared_examples_for_api.rb | 15 +++++++++++++++ 5 files changed, 19 insertions(+) diff --git a/spec/api/v1/external_users/claims/final_claim_spec.rb b/spec/api/v1/external_users/claims/final_claim_spec.rb index d5cb18cd29..11705d0831 100644 --- a/spec/api/v1/external_users/claims/final_claim_spec.rb +++ b/spec/api/v1/external_users/claims/final_claim_spec.rb @@ -17,6 +17,7 @@ api_key: provider.api_key, creator_email: vendor.user.email, user_email: litigator.user.email, + london_rates_apply: true, supplier_number: provider.lgfs_supplier_numbers.first, case_type_id: create(:case_type, :trial).id, case_number: 'A20161234', diff --git a/spec/api/v1/external_users/claims/interim_claim_spec.rb b/spec/api/v1/external_users/claims/interim_claim_spec.rb index a6d524f50d..f4bcb484d0 100644 --- a/spec/api/v1/external_users/claims/interim_claim_spec.rb +++ b/spec/api/v1/external_users/claims/interim_claim_spec.rb @@ -17,6 +17,7 @@ api_key: provider.api_key, creator_email: vendor.user.email, user_email: litigator.user.email, + london_rates_apply: false, supplier_number: provider.lgfs_supplier_numbers.first.supplier_number, case_type_id: create(:case_type, :trial).id, case_number: 'A20161234', diff --git a/spec/api/v1/external_users/claims/litigators/hardship_claim_spec.rb b/spec/api/v1/external_users/claims/litigators/hardship_claim_spec.rb index e8b580cbc8..45127dec73 100644 --- a/spec/api/v1/external_users/claims/litigators/hardship_claim_spec.rb +++ b/spec/api/v1/external_users/claims/litigators/hardship_claim_spec.rb @@ -18,6 +18,7 @@ api_key: provider.api_key, creator_email: vendor.user.email, user_email: litigator.user.email, + london_rates_apply: true, supplier_number: provider.lgfs_supplier_numbers.first, case_stage_unique_code: create(:case_stage, :pre_ptph_or_ptph_adjourned).unique_code, case_number: 'A20201234', diff --git a/spec/api/v1/external_users/claims/transfer_claim_spec.rb b/spec/api/v1/external_users/claims/transfer_claim_spec.rb index b3a9f82e09..c73a439b9e 100644 --- a/spec/api/v1/external_users/claims/transfer_claim_spec.rb +++ b/spec/api/v1/external_users/claims/transfer_claim_spec.rb @@ -17,6 +17,7 @@ api_key: provider.api_key, creator_email: vendor.user.email, user_email: litigator.user.email, + london_rates_apply: false, supplier_number: provider.lgfs_supplier_numbers.first, case_type_id: create(:case_type, :trial).id, case_number: 'A20161234', diff --git a/spec/support/shared_examples_for_api.rb b/spec/support/shared_examples_for_api.rb index c434566ded..c23a3a1c2a 100644 --- a/spec/support/shared_examples_for_api.rb +++ b/spec/support/shared_examples_for_api.rb @@ -237,6 +237,16 @@ it { expect_error_response('Enter a case number') } end + + context 'when london_rates_apply is neither nil or boolean' do + before do + valid_params[:london_rates_apply] = 'Invalid' + post_to_validate_endpoint + end + + it { expect_error_response('London Rates field is invalid. This must be true, false, or nil') } + end + end end @@ -305,6 +315,11 @@ expected_owner = User.find_by(email: valid_params[:user_email]) expect(claim.external_user).to eq expected_owner.persona end + + it 'has had the London Rates Apply attribute correctly set' do + expect(claim.london_rates_apply).to eq valid_params[:london_rates_apply] + end + end end From 73c761dfbd6793069d3fe978222bf2a55b7e6154 Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Fri, 19 Jul 2024 17:07:22 +0100 Subject: [PATCH 11/25] Add london_rates_apply to API params london_rates_apply added as an optional param to common_lgfs_params in claim_params_helper.rb which cascades down to the individual API endpoints --- app/interfaces/api/v1/claim_params_helper.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/interfaces/api/v1/claim_params_helper.rb b/app/interfaces/api/v1/claim_params_helper.rb index b296fd5a84..124a568077 100644 --- a/app/interfaces/api/v1/claim_params_helper.rb +++ b/app/interfaces/api/v1/claim_params_helper.rb @@ -41,6 +41,9 @@ module ClaimParamsHelper optional :supplier_number, type: String, desc: 'REQUIRED. The supplier number.' optional :transfer_court_id, type: Integer, desc: 'OPTIONAL: The unique identifier for the transfer court.' optional :transfer_case_number, type: String, desc: 'OPTIONAL: The case number or URN for the transfer court.' + optional :london_rates_apply, + type: Boolean, + desc: 'OPTIONAL: Whether the firm for the claim is based in a London Borough or not' end params :legacy_agfs_params do From 085bb429e554ee69a200a28a9e291352f847a88c Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Wed, 24 Jul 2024 14:18:45 +0100 Subject: [PATCH 12/25] Step valdation for london_rates_apply ** added new helper method to base_validator ** added validation method to base_claim validator ** added param to litigator final claims validation only for now; TODO for late add it to other litigator claim types ** translations added to claim.yml --- app/validators/base_validator.rb | 4 ++++ app/validators/claim/base_claim_validator.rb | 5 +++++ .../claim/litigator_claim_validator.rb | 1 + config/locales/en/error_messages/claim.yml | 9 ++++++++- config/locales/en/models/claim.yml | 2 ++ spec/support/shared_examples_for_api.rb | 16 ++++++++++++---- 6 files changed, 32 insertions(+), 5 deletions(-) diff --git a/app/validators/base_validator.rb b/app/validators/base_validator.rb index 5a6e189c22..d8bcdbb96c 100644 --- a/app/validators/base_validator.rb +++ b/app/validators/base_validator.rb @@ -60,6 +60,10 @@ def validate_boolean_presence(attribute, message) add_error(attribute, message) if attr_nil?(attribute) end + def validate_optional_boolean(attribute, message) + add_error(attribute, message) unless @record.__send__(attribute).in? [true, false, nil] + end + def validate_max_length(attribute, length, message) add_error(attribute, message) if @record.__send__(attribute).to_s.size > length end diff --git a/app/validators/claim/base_claim_validator.rb b/app/validators/claim/base_claim_validator.rb index bbee0d4b7c..8ddf62ad3a 100644 --- a/app/validators/claim/base_claim_validator.rb +++ b/app/validators/claim/base_claim_validator.rb @@ -60,6 +60,11 @@ def validate_creator validate_presence(:creator, 'blank') unless @record.errors.key?(:creator) end + # optional, must be boolean if present + def validate_london_rates_apply + validate_optional_boolean(:london_rates_apply, :not_boolean_or_nil) + end + # object must be present def validate_case_type_id validate_belongs_to_object_presence(:case_type, :blank) diff --git a/app/validators/claim/litigator_claim_validator.rb b/app/validators/claim/litigator_claim_validator.rb index 42aa03fa84..a24c141c82 100644 --- a/app/validators/claim/litigator_claim_validator.rb +++ b/app/validators/claim/litigator_claim_validator.rb @@ -7,6 +7,7 @@ def self.fields_for_steps case_details: %i[ case_type_id court_id + london_rates_apply case_number case_transferred_from_another_court transfer_court_id diff --git a/config/locales/en/error_messages/claim.yml b/config/locales/en/error_messages/claim.yml index f33ca26631..3bf62a085d 100644 --- a/config/locales/en/error_messages/claim.yml +++ b/config/locales/en/error_messages/claim.yml @@ -100,6 +100,13 @@ supplier_number: short: _ api: Supplier number is unknown +london_rates_apply: + _seq: 6 + not_boolean_or_nil: + long: Choose True or False to indicate if your firm is based inside a London Borough + short: _ + api: london_rates_apply is not in an acceptable format - choose true, false or nil + external_user_id: _seq: 10 choose_an_advocate: @@ -1061,7 +1068,7 @@ misc_fee: enter_a_valid_quantity_(1)_for_additional_preparation_hearing: long: 'Enter a valid quantity (1) for additional preparation hearing' short: _ - api: Enter a valid quantity (1) for additional preparation hearing + api: Enter a valid quantity (1) for additional preparation hearing the_amount_for_the_miscellaneous_fee_exceeds_the_limit: long: The amount for the miscellaneous fee exceeds the limit short: _ diff --git a/config/locales/en/models/claim.yml b/config/locales/en/models/claim.yml index 322392391c..b66e446e94 100644 --- a/config/locales/en/models/claim.yml +++ b/config/locales/en/models/claim.yml @@ -62,6 +62,8 @@ en: invalid: Enter a valid legal aid transfer date invalid_date: Enter a valid legal aid transfer date present: The date legal aid was transferred is not allowed + london_rates_apply: + not_boolean_or_nil: london_rates_apply is not in an acceptable format - choose true, false or nil main_hearing_date: check_not_too_far_in_past: Main hearing date cannot be too far in the past misc_fees: diff --git a/spec/support/shared_examples_for_api.rb b/spec/support/shared_examples_for_api.rb index c23a3a1c2a..d18d0c6913 100644 --- a/spec/support/shared_examples_for_api.rb +++ b/spec/support/shared_examples_for_api.rb @@ -236,17 +236,18 @@ end it { expect_error_response('Enter a case number') } + it { expect(LogStuff).to have_received(:send).with(:error, hash_including(type: 'api-error')) } end context 'when london_rates_apply is neither nil or boolean' do before do - valid_params[:london_rates_apply] = 'Invalid' + valid_params[:london_rates_apply] = 'Invalid string' post_to_validate_endpoint end - it { expect_error_response('London Rates field is invalid. This must be true, false, or nil') } + it { expect_error_response('london_rates_apply is not in an acceptable format - choose true, false or nil') } + it { expect(LogStuff).to have_received(:send).with(:error, hash_including(type: 'api-error')) } end - end end @@ -319,7 +320,6 @@ it 'has had the London Rates Apply attribute correctly set' do expect(claim.london_rates_apply).to eq valid_params[:london_rates_apply] end - end end @@ -342,6 +342,14 @@ end end + context 'when london_rates_apply is invalid' do + it 'has had the London Rates Apply attribute correctly set' do + valid_params[:london_rates_apply] = 'invalid string' + post_to_create_endpoint + expect_error_response('london_rates_apply is not in an acceptable format - choose true, false or nil') + end + end + context 'when expected params are missing' do before { valid_params.delete(:case_number) } From 481707dccc0299cc8abb0baae76f0726a4ab014a Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Fri, 2 Aug 2024 15:01:52 +0100 Subject: [PATCH 13/25] API validation working for london_rates_apply ** Created new custom validation in Grape for optional booleans ** Tweaked and expanded unit tests --- .../optional_boolean_validation.rb | 14 +++++++++++ app/interfaces/api/helpers/api_helper.rb | 1 + app/interfaces/api/v1/claim_params_helper.rb | 3 ++- .../claims/litigators/hardship_claim_spec.rb | 2 +- spec/support/shared_examples_for_api.rb | 23 +++++++++++++++---- 5 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 app/interfaces/api/custom_validations/optional_boolean_validation.rb diff --git a/app/interfaces/api/custom_validations/optional_boolean_validation.rb b/app/interfaces/api/custom_validations/optional_boolean_validation.rb new file mode 100644 index 0000000000..ddc61ca18b --- /dev/null +++ b/app/interfaces/api/custom_validations/optional_boolean_validation.rb @@ -0,0 +1,14 @@ +module API + module CustomValidations + class OptionalBooleanValidation < Grape::Validations::Validators::Base + def validate_param!(attr_name, params) + london_rates_apply = params[attr_name] + + raise ArgumentError unless london_rates_apply.nil? || london_rates_apply.in?([true, false]) + rescue ArgumentError + raise Grape::Exceptions::Validation.new(params: [@scope.full_name(attr_name)], + message: 'must be true, false or nil') + end + end + end +end diff --git a/app/interfaces/api/helpers/api_helper.rb b/app/interfaces/api/helpers/api_helper.rb index d00bbb3f86..895676a32e 100644 --- a/app/interfaces/api/helpers/api_helper.rb +++ b/app/interfaces/api/helpers/api_helper.rb @@ -2,6 +2,7 @@ module API module Helpers module APIHelper require_relative '../custom_validations/standard_json_format' + require_relative '../custom_validations/optional_boolean_validation' require_relative '../api_response' require_relative '../error_response' diff --git a/app/interfaces/api/v1/claim_params_helper.rb b/app/interfaces/api/v1/claim_params_helper.rb index 124a568077..9b97c499e1 100644 --- a/app/interfaces/api/v1/claim_params_helper.rb +++ b/app/interfaces/api/v1/claim_params_helper.rb @@ -43,7 +43,8 @@ module ClaimParamsHelper optional :transfer_case_number, type: String, desc: 'OPTIONAL: The case number or URN for the transfer court.' optional :london_rates_apply, type: Boolean, - desc: 'OPTIONAL: Whether the firm for the claim is based in a London Borough or not' + desc: 'OPTIONAL: Whether the firm for the claim is based in a London Borough or not', + optional_boolean_validation: true end params :legacy_agfs_params do diff --git a/spec/api/v1/external_users/claims/litigators/hardship_claim_spec.rb b/spec/api/v1/external_users/claims/litigators/hardship_claim_spec.rb index 45127dec73..3ad0dd8b9a 100644 --- a/spec/api/v1/external_users/claims/litigators/hardship_claim_spec.rb +++ b/spec/api/v1/external_users/claims/litigators/hardship_claim_spec.rb @@ -18,7 +18,7 @@ api_key: provider.api_key, creator_email: vendor.user.email, user_email: litigator.user.email, - london_rates_apply: true, + london_rates_apply: nil, supplier_number: provider.lgfs_supplier_numbers.first, case_stage_unique_code: create(:case_stage, :pre_ptph_or_ptph_adjourned).unique_code, case_number: 'A20201234', diff --git a/spec/support/shared_examples_for_api.rb b/spec/support/shared_examples_for_api.rb index d18d0c6913..7963d1fb64 100644 --- a/spec/support/shared_examples_for_api.rb +++ b/spec/support/shared_examples_for_api.rb @@ -239,13 +239,23 @@ it { expect(LogStuff).to have_received(:send).with(:error, hash_including(type: 'api-error')) } end - context 'when london_rates_apply is neither nil or boolean' do + context 'when london_rates_apply is a string' do before do valid_params[:london_rates_apply] = 'Invalid string' post_to_validate_endpoint end - it { expect_error_response('london_rates_apply is not in an acceptable format - choose true, false or nil') } + it { expect_error_response('london_rates_apply is invalid, london_rates_apply must be true, false or nil') } + it { expect(LogStuff).to have_received(:send).with(:error, hash_including(type: 'api-error')) } + end + + context 'when london_rates_apply is an integer' do + before do + valid_params[:london_rates_apply] = 2 + post_to_validate_endpoint + end + + it { expect_error_response('london_rates_apply is invalid, london_rates_apply must be true, false or nil') } it { expect(LogStuff).to have_received(:send).with(:error, hash_including(type: 'api-error')) } end end @@ -343,10 +353,15 @@ end context 'when london_rates_apply is invalid' do - it 'has had the London Rates Apply attribute correctly set' do + before do valid_params[:london_rates_apply] = 'invalid string' post_to_create_endpoint - expect_error_response('london_rates_apply is not in an acceptable format - choose true, false or nil') + end + + it { expect_error_response('london_rates_apply is invalid, london_rates_apply must be true, false or nil') } + + it 'does not create a new claim' do + expect { post_to_create_endpoint }.not_to(change { claim_class.active.count }) end end From 426162da8de79465200c9e89babba9e71583b92b Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Fri, 2 Aug 2024 15:27:51 +0100 Subject: [PATCH 14/25] Step validation unit tests ** Expanded step validation specs to include the new attribute --- spec/validators/claim/interim_claim_validator_spec.rb | 1 + spec/validators/claim/litigator_claim_validator_spec.rb | 1 + spec/validators/claim/transfer_claim_validator_spec.rb | 1 + 3 files changed, 3 insertions(+) diff --git a/spec/validators/claim/interim_claim_validator_spec.rb b/spec/validators/claim/interim_claim_validator_spec.rb index 6f15a6ac9e..79b35baea6 100644 --- a/spec/validators/claim/interim_claim_validator_spec.rb +++ b/spec/validators/claim/interim_claim_validator_spec.rb @@ -18,6 +18,7 @@ case_type_id court_id case_number + london_rates_apply case_transferred_from_another_court transfer_court_id transfer_case_number diff --git a/spec/validators/claim/litigator_claim_validator_spec.rb b/spec/validators/claim/litigator_claim_validator_spec.rb index 866b86a558..54b48fa2a7 100644 --- a/spec/validators/claim/litigator_claim_validator_spec.rb +++ b/spec/validators/claim/litigator_claim_validator_spec.rb @@ -16,6 +16,7 @@ case_type_id court_id case_number + london_rates_apply case_transferred_from_another_court transfer_court_id transfer_case_number diff --git a/spec/validators/claim/transfer_claim_validator_spec.rb b/spec/validators/claim/transfer_claim_validator_spec.rb index 35deee5627..231fca5497 100644 --- a/spec/validators/claim/transfer_claim_validator_spec.rb +++ b/spec/validators/claim/transfer_claim_validator_spec.rb @@ -24,6 +24,7 @@ case_details: %i[ court_id case_number + london_rates_apply case_transferred_from_another_court transfer_court_id transfer_case_number From af401955731179c509d6a6b9a015135ed13018bf Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Thu, 8 Aug 2024 10:43:56 +0100 Subject: [PATCH 15/25] Code review ** Neatened summary row code to make it multiple smaller lines ** Added london_rates_apply summary line to the accordion for submitted claims ** Nils now have a default message --- .../external_users/claims/case_details/_summary.html.haml | 3 ++- app/views/shared/_claim.html.haml | 4 ++++ config/locales/en.yml | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/views/external_users/claims/case_details/_summary.html.haml b/app/views/external_users/claims/case_details/_summary.html.haml index 6d264c2ea5..9599476c0b 100644 --- a/app/views/external_users/claims/case_details/_summary.html.haml +++ b/app/views/external_users/claims/case_details/_summary.html.haml @@ -29,7 +29,8 @@ = claim.unique_id - if claim.lgfs? - = govuk_summary_list_row_collection( t('external_users.claims.case_details.london_rates.london_rates') ) { t("external_users.claims.case_details.london_rates.london_rates_#{claim.london_rates_apply}") unless claim.london_rates_apply.nil? } + = govuk_summary_list_row_collection( t('external_users.claims.case_details.london_rates.london_rates') ) do + = t("external_users.claims.case_details.london_rates.london_rates_#{claim.london_rates_apply}") - if claim.transfer_court.present? = govuk_summary_list_row_collection( t('common.transfer_court') ) { claim.transfer_court.name if claim.transfer_court } diff --git a/app/views/shared/_claim.html.haml b/app/views/shared/_claim.html.haml index bbca000b72..4b3a5ded35 100644 --- a/app/views/shared/_claim.html.haml +++ b/app/views/shared/_claim.html.haml @@ -39,6 +39,10 @@ %span.unique-id-small = claim.unique_id + - if claim.lgfs? + = govuk_summary_list_row_collection( t('external_users.claims.case_details.london_rates.london_rates') ) do + = t("external_users.claims.case_details.london_rates.london_rates_#{claim.london_rates_apply}") + - if claim.transfer_court.present? = govuk_summary_list_row_collection(t('common.transfer_court')) do = claim.transfer_court.name diff --git a/config/locales/en.yml b/config/locales/en.yml index 52fd84c9cf..73e410a8bc 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1085,8 +1085,9 @@ en: london_rates: "London fee rates" london_rates_true: "This claim qualifies for London fee rates" london_rates_false: "This claim does not qualify for London fee rates" + london_rates_: "This claim may qualify for London fee rates. This will be assessed by a caseworker" london_rates_title: "Is the firm based in a London borough?" - london_rates_hint: "We need to know this to check the correct rates have been used in your application." + london_rates_hint: "We need to know this to check the correct rates have been used in your application" offence_select: offence_class: 'Offence class' select_offence_class: 'Please select' From ceacae2c56aab09e53f8d91817a663f3a50df5e0 Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Fri, 2 Aug 2024 16:18:15 +0100 Subject: [PATCH 16/25] Tests and Rubocop cleanup ** Step validation hadn't been activated for some LGFS claim types, fixed that --- app/interfaces/api/v1/claim_params_helper.rb | 2 +- .../claim/interim_claim_validator.rb | 1 + .../litigator_hardship_claim_validator.rb | 1 + .../claim/transfer_claim_validator.rb | 1 + spec/support/shared_examples_for_api.rb | 28 +++++++++++++++---- 5 files changed, 27 insertions(+), 6 deletions(-) diff --git a/app/interfaces/api/v1/claim_params_helper.rb b/app/interfaces/api/v1/claim_params_helper.rb index 9b97c499e1..56c4882d0e 100644 --- a/app/interfaces/api/v1/claim_params_helper.rb +++ b/app/interfaces/api/v1/claim_params_helper.rb @@ -43,7 +43,7 @@ module ClaimParamsHelper optional :transfer_case_number, type: String, desc: 'OPTIONAL: The case number or URN for the transfer court.' optional :london_rates_apply, type: Boolean, - desc: 'OPTIONAL: Whether the firm for the claim is based in a London Borough or not', + desc: 'OPTIONAL: Whether the firm for the claim is based in a London borough or not', optional_boolean_validation: true end diff --git a/app/validators/claim/interim_claim_validator.rb b/app/validators/claim/interim_claim_validator.rb index 0597005600..6ceb1ea794 100644 --- a/app/validators/claim/interim_claim_validator.rb +++ b/app/validators/claim/interim_claim_validator.rb @@ -8,6 +8,7 @@ def self.fields_for_steps case_type_id court_id case_number + london_rates_apply case_transferred_from_another_court transfer_court_id transfer_case_number diff --git a/app/validators/claim/litigator_hardship_claim_validator.rb b/app/validators/claim/litigator_hardship_claim_validator.rb index 67872c46e7..65e51aed95 100644 --- a/app/validators/claim/litigator_hardship_claim_validator.rb +++ b/app/validators/claim/litigator_hardship_claim_validator.rb @@ -9,6 +9,7 @@ def self.fields_for_steps case_stage_id court_id case_number + london_rates_apply case_transferred_from_another_court transfer_court_id transfer_case_number diff --git a/app/validators/claim/transfer_claim_validator.rb b/app/validators/claim/transfer_claim_validator.rb index f983028b04..505f647b2e 100644 --- a/app/validators/claim/transfer_claim_validator.rb +++ b/app/validators/claim/transfer_claim_validator.rb @@ -22,6 +22,7 @@ def self.fields_for_steps case_details: %i[ court_id case_number + london_rates_apply case_transferred_from_another_court transfer_court_id transfer_case_number diff --git a/spec/support/shared_examples_for_api.rb b/spec/support/shared_examples_for_api.rb index 7963d1fb64..aae11cd0d9 100644 --- a/spec/support/shared_examples_for_api.rb +++ b/spec/support/shared_examples_for_api.rb @@ -245,8 +245,15 @@ post_to_validate_endpoint end - it { expect_error_response('london_rates_apply is invalid, london_rates_apply must be true, false or nil') } - it { expect(LogStuff).to have_received(:send).with(:error, hash_including(type: 'api-error')) } + it 'returns an error' do + skip('Only test for LGFS') if claim_user_type == 'Advocate' + expect_error_response('london_rates_apply is invalid, london_rates_apply must be true, false or nil') + end + + it 'logs an error' do + skip('Only test for LGFS') if claim_user_type == 'Advocate' + expect(LogStuff).to have_received(:send).with(:error, hash_including(type: 'api-error')) + end end context 'when london_rates_apply is an integer' do @@ -255,8 +262,15 @@ post_to_validate_endpoint end - it { expect_error_response('london_rates_apply is invalid, london_rates_apply must be true, false or nil') } - it { expect(LogStuff).to have_received(:send).with(:error, hash_including(type: 'api-error')) } + it 'returns an error' do + skip('Only test for LGFS') if claim_user_type == 'Advocate' + expect_error_response('london_rates_apply is invalid, london_rates_apply must be true, false or nil') + end + + it 'logs an error' do + skip('Only test for LGFS') if claim_user_type == 'Advocate' + expect(LogStuff).to have_received(:send).with(:error, hash_including(type: 'api-error')) + end end end end @@ -358,9 +372,13 @@ post_to_create_endpoint end - it { expect_error_response('london_rates_apply is invalid, london_rates_apply must be true, false or nil') } + it 'returns an error' do + skip('Only test for LGFS') if claim_user_type == 'Advocate' + expect_error_response('london_rates_apply is invalid, london_rates_apply must be true, false or nil') + end it 'does not create a new claim' do + skip('Only test for LGFS') if claim_user_type == 'Advocate' expect { post_to_create_endpoint }.not_to(change { claim_class.active.count }) end end From 3667f2a69248f06031c958547e689e7185c1e2dc Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Thu, 8 Aug 2024 11:46:17 +0100 Subject: [PATCH 17/25] London Rates tests refactored to shared examples ** Tests within shared_examples_for_api.rb covering london rates refactored to use shared examples to avoid use of skip for AGFS claim types ** New shared examples included in all LGFS claim type specs --- .../external_users/claims/final_claim_spec.rb | 3 + .../claims/interim_claim_spec.rb | 2 + .../claims/litigators/hardship_claim_spec.rb | 2 + .../claims/transfer_claim_spec.rb | 2 + spec/support/shared_examples_for_api.rb | 89 +++++++++++++------ 5 files changed, 73 insertions(+), 25 deletions(-) diff --git a/spec/api/v1/external_users/claims/final_claim_spec.rb b/spec/api/v1/external_users/claims/final_claim_spec.rb index 11705d0831..867446dcce 100644 --- a/spec/api/v1/external_users/claims/final_claim_spec.rb +++ b/spec/api/v1/external_users/claims/final_claim_spec.rb @@ -37,7 +37,10 @@ relative_endpoint: LITIGATOR_FINAL_VALIDATE_ENDPOINT include_examples 'optional parameter validation', optional_parameters: %i[main_hearing_date], relative_endpoint: LITIGATOR_FINAL_VALIDATE_ENDPOINT + it_behaves_like 'a claim endpoint', relative_endpoint: :final it_behaves_like 'a claim validate endpoint', relative_endpoint: :final it_behaves_like 'a claim create endpoint', relative_endpoint: :final + include_examples 'create claim with london rates', relative_endpoint: :final + include_examples 'validate London rates', relative_endpoint: :final end diff --git a/spec/api/v1/external_users/claims/interim_claim_spec.rb b/spec/api/v1/external_users/claims/interim_claim_spec.rb index f4bcb484d0..b19fe287ca 100644 --- a/spec/api/v1/external_users/claims/interim_claim_spec.rb +++ b/spec/api/v1/external_users/claims/interim_claim_spec.rb @@ -38,4 +38,6 @@ it_behaves_like 'a claim endpoint', relative_endpoint: :interim it_behaves_like 'a claim validate endpoint', relative_endpoint: :interim it_behaves_like 'a claim create endpoint', relative_endpoint: :interim + include_examples 'create claim with london rates', relative_endpoint: :interim + include_examples 'validate London rates', relative_endpoint: :interim end diff --git a/spec/api/v1/external_users/claims/litigators/hardship_claim_spec.rb b/spec/api/v1/external_users/claims/litigators/hardship_claim_spec.rb index 3ad0dd8b9a..3bfa8708b0 100644 --- a/spec/api/v1/external_users/claims/litigators/hardship_claim_spec.rb +++ b/spec/api/v1/external_users/claims/litigators/hardship_claim_spec.rb @@ -39,4 +39,6 @@ it_behaves_like 'a claim endpoint', relative_endpoint: LITIGATOR_HARDSHIP_CLAIM_ENDPOINT it_behaves_like 'a claim validate endpoint', relative_endpoint: LITIGATOR_HARDSHIP_CLAIM_ENDPOINT it_behaves_like 'a claim create endpoint', relative_endpoint: LITIGATOR_HARDSHIP_CLAIM_ENDPOINT + include_examples 'create claim with london rates', relative_endpoint: LITIGATOR_HARDSHIP_CLAIM_ENDPOINT + include_examples 'validate London rates', relative_endpoint: LITIGATOR_HARDSHIP_CLAIM_ENDPOINT end diff --git a/spec/api/v1/external_users/claims/transfer_claim_spec.rb b/spec/api/v1/external_users/claims/transfer_claim_spec.rb index c73a439b9e..ddf07e4c0f 100644 --- a/spec/api/v1/external_users/claims/transfer_claim_spec.rb +++ b/spec/api/v1/external_users/claims/transfer_claim_spec.rb @@ -46,4 +46,6 @@ it_behaves_like 'a claim endpoint', relative_endpoint: :transfer it_behaves_like 'a claim validate endpoint', relative_endpoint: :transfer it_behaves_like 'a claim create endpoint', relative_endpoint: :transfer + include_examples 'create claim with london rates', relative_endpoint: :transfer + include_examples 'validate London rates', relative_endpoint: :transfer end diff --git a/spec/support/shared_examples_for_api.rb b/spec/support/shared_examples_for_api.rb index aae11cd0d9..3ecb9caba4 100644 --- a/spec/support/shared_examples_for_api.rb +++ b/spec/support/shared_examples_for_api.rb @@ -238,6 +238,25 @@ it { expect_error_response('Enter a case number') } it { expect(LogStuff).to have_received(:send).with(:error, hash_including(type: 'api-error')) } end + end +end + +RSpec.shared_examples 'validate London rates' do |options| + describe "POST #{ClaimApiEndpoints.for(options[:relative_endpoint]).validate}" do + subject(:post_to_validate_endpoint) do + post ClaimApiEndpoints.for(options[:relative_endpoint]).validate, valid_params, format: :json + end + + before { allow(LogStuff).to receive(:send) } + + let(:claim_user_type) do + if ClaimApiEndpoints.for(options[:relative_endpoint]).validate + .match?(%r{/claims/(final|interim|transfer|hardship)}) + 'Litigator' + else + 'Advocate' + end + end context 'when london_rates_apply is a string' do before do @@ -246,12 +265,10 @@ end it 'returns an error' do - skip('Only test for LGFS') if claim_user_type == 'Advocate' expect_error_response('london_rates_apply is invalid, london_rates_apply must be true, false or nil') end it 'logs an error' do - skip('Only test for LGFS') if claim_user_type == 'Advocate' expect(LogStuff).to have_received(:send).with(:error, hash_including(type: 'api-error')) end end @@ -263,12 +280,10 @@ end it 'returns an error' do - skip('Only test for LGFS') if claim_user_type == 'Advocate' expect_error_response('london_rates_apply is invalid, london_rates_apply must be true, false or nil') end it 'logs an error' do - skip('Only test for LGFS') if claim_user_type == 'Advocate' expect(LogStuff).to have_received(:send).with(:error, hash_including(type: 'api-error')) end end @@ -340,10 +355,6 @@ expected_owner = User.find_by(email: valid_params[:user_email]) expect(claim.external_user).to eq expected_owner.persona end - - it 'has had the London Rates Apply attribute correctly set' do - expect(claim.london_rates_apply).to eq valid_params[:london_rates_apply] - end end end @@ -366,23 +377,6 @@ end end - context 'when london_rates_apply is invalid' do - before do - valid_params[:london_rates_apply] = 'invalid string' - post_to_create_endpoint - end - - it 'returns an error' do - skip('Only test for LGFS') if claim_user_type == 'Advocate' - expect_error_response('london_rates_apply is invalid, london_rates_apply must be true, false or nil') - end - - it 'does not create a new claim' do - skip('Only test for LGFS') if claim_user_type == 'Advocate' - expect { post_to_create_endpoint }.not_to(change { claim_class.active.count }) - end - end - context 'when expected params are missing' do before { valid_params.delete(:case_number) } @@ -437,6 +431,51 @@ end end +RSpec.shared_examples 'create claim with london rates' do |options| + describe "POST #{ClaimApiEndpoints.for(options[:relative_endpoint]).create}" do + subject(:post_to_create_endpoint) do + post ClaimApiEndpoints.for(options[:relative_endpoint]).create, valid_params, format: :json + end + + let(:claim_user_type) do + if ClaimApiEndpoints.for(options[:relative_endpoint]).validate + .match?(%r{/claims/(final|interim|transfer|hardship)}) + 'Litigator' + else + 'Advocate' + end + end + + context 'when london_rates_apply is valid' do + let(:claim) { claim_class.active.last } + + it 'creates a claim' do + expect { post_to_create_endpoint }.to change { claim_class.active.count }.by(1) + end + + it 'has had the London Rates Apply attribute correctly set' do + post_to_create_endpoint + expect(claim.london_rates_apply).to eq valid_params[:london_rates_apply] + end + end + + context 'when london_rates_apply is invalid' do + before do + valid_params[:london_rates_apply] = 'invalid string' + post_to_create_endpoint + end + + it 'returns an error' do + expect_error_response('london_rates_apply is invalid, london_rates_apply must be true, false or nil') + end + + it 'does not create a new claim' do + expect { post_to_create_endpoint }.not_to(change { claim_class.active.count }) + end + end + end +end + RSpec.shared_examples 'fee validate endpoint' do context 'when the request is valid' do before { post_to_validate_endpoint } From 6edbfc9e0b4450b1beac9203495c4021b415de0e Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Tue, 2 Jul 2024 15:20:53 +0100 Subject: [PATCH 18/25] New migration file to create london_fees column/attribute in Claim model. New attribute is set to be a boolean, with null values enabled to not break compatibility with existing claim entries. --- ...708_add_london_fees_attribute_to_claims.rb | 5 + db/schema.rb | 199 +++++++++--------- 2 files changed, 105 insertions(+), 99 deletions(-) create mode 100644 db/migrate/20240702094708_add_london_fees_attribute_to_claims.rb diff --git a/db/migrate/20240702094708_add_london_fees_attribute_to_claims.rb b/db/migrate/20240702094708_add_london_fees_attribute_to_claims.rb new file mode 100644 index 0000000000..071366366c --- /dev/null +++ b/db/migrate/20240702094708_add_london_fees_attribute_to_claims.rb @@ -0,0 +1,5 @@ +class AddLondonFeesAttributeToClaims < ActiveRecord::Migration[7.0] + def change + add_column :claims, :london_fees, :boolean, null: true + end +end diff --git a/db/schema.rb b/db/schema.rb index 832d46556e..aae67cca18 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2024_04_19_173039) do +ActiveRecord::Schema[7.0].define(version: 2024_07_02_094708) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" enable_extension "uuid-ossp" @@ -20,7 +20,7 @@ t.string "record_type", null: false t.bigint "record_id", null: false t.bigint "blob_id", null: false - t.datetime "created_at", null: false + t.datetime "created_at", precision: nil, null: false t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true end @@ -32,7 +32,7 @@ t.text "metadata" t.bigint "byte_size", null: false t.string "checksum", null: false - t.datetime "created_at", null: false + t.datetime "created_at", precision: nil, null: false t.string "service_name", null: false t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true end @@ -55,8 +55,8 @@ create_table "case_types", id: :serial, force: :cascade do |t| t.string "name" t.boolean "is_fixed_fee" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.boolean "requires_cracked_dates" t.boolean "requires_trial_dates" t.boolean "allow_pcmh_fee_type", default: false @@ -70,18 +70,18 @@ create_table "case_worker_claims", id: :serial, force: :cascade do |t| t.integer "case_worker_id" t.integer "claim_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["case_worker_id"], name: "index_case_worker_claims_on_case_worker_id" t.index ["claim_id"], name: "index_case_worker_claims_on_claim_id" end create_table "case_workers", id: :serial, force: :cascade do |t| - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "location_id" t.string "roles" - t.datetime "deleted_at" + t.datetime "deleted_at", precision: nil t.uuid "uuid", default: -> { "uuid_generate_v4()" } t.index ["location_id"], name: "index_case_workers_on_location_id" end @@ -89,8 +89,8 @@ create_table "certification_types", id: :serial, force: :cascade do |t| t.string "name" t.boolean "pre_may_2015", default: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "roles" t.index ["name"], name: "index_certification_types_on_name" end @@ -99,15 +99,15 @@ t.integer "claim_id" t.string "certified_by" t.date "certification_date" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "certification_type_id" end create_table "claim_intentions", id: :serial, force: :cascade do |t| t.string "form_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.integer "user_id" t.index ["form_id"], name: "index_claim_intentions_on_form_id" end @@ -118,7 +118,7 @@ t.string "event" t.string "from" t.string "to" - t.datetime "created_at" + t.datetime "created_at", precision: nil t.string "reason_code" t.integer "author_id" t.integer "subject_id" @@ -130,7 +130,7 @@ t.text "additional_information" t.boolean "apply_vat" t.string "state" - t.datetime "last_submitted_at" + t.datetime "last_submitted_at", precision: nil t.string "case_number" t.string "advocate_category" t.date "first_day_of_trial" @@ -142,11 +142,11 @@ t.integer "external_user_id" t.integer "court_id" t.integer "offence_id" - t.datetime "created_at" - t.datetime "updated_at" - t.datetime "valid_until" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil + t.datetime "valid_until", precision: nil t.string "cms_number" - t.datetime "authorised_at" + t.datetime "authorised_at", precision: nil t.integer "creator_id" t.text "evidence_notes" t.string "evidence_checklist_ids" @@ -160,7 +160,7 @@ t.uuid "uuid", default: -> { "uuid_generate_v4()" } t.integer "case_type_id" t.string "form_id" - t.datetime "original_submission_date" + t.datetime "original_submission_date", precision: nil t.date "retrial_started_at" t.integer "retrial_estimated_length", default: 0 t.integer "retrial_actual_length", default: 0 @@ -175,8 +175,8 @@ t.string "allocation_type" t.string "transfer_case_number" t.integer "clone_source_id" - t.datetime "last_edited_at" - t.datetime "deleted_at" + t.datetime "last_edited_at", precision: nil + t.datetime "deleted_at", precision: nil t.string "providers_ref" t.boolean "disk_evidence", default: false t.decimal "fees_vat", default: "0.0" @@ -188,6 +188,7 @@ t.boolean "prosecution_evidence" t.bigint "case_stage_id" t.date "main_hearing_date" + t.boolean "london_fees" t.index ["case_number"], name: "index_claims_on_case_number" t.index ["case_stage_id"], name: "index_claims_on_case_stage_id" t.index ["cms_number"], name: "index_claims_on_cms_number" @@ -207,8 +208,8 @@ t.string "code" t.string "name" t.string "court_type" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["code"], name: "index_courts_on_code" t.index ["court_type"], name: "index_courts_on_court_type" t.index ["name"], name: "index_courts_on_name" @@ -216,8 +217,8 @@ create_table "dates_attended", id: :serial, force: :cascade do |t| t.date "date" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.date "date_to" t.uuid "uuid", default: -> { "uuid_generate_v4()" } t.string "attended_item_type" @@ -231,8 +232,8 @@ t.date "date_of_birth" t.boolean "order_for_judicial_apportionment" t.integer "claim_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.uuid "uuid", default: -> { "uuid_generate_v4()" } t.index ["claim_id"], name: "index_defendants_on_claim_id" end @@ -243,8 +244,8 @@ t.decimal "fees", default: "0.0" t.decimal "expenses", default: "0.0" t.decimal "total" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.float "vat_amount", default: 0.0 t.decimal "disbursements", default: "0.0" t.index ["claim_id"], name: "index_determinations_on_claim_id" @@ -252,9 +253,9 @@ create_table "disbursement_types", id: :serial, force: :cascade do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" - t.datetime "deleted_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil + t.datetime "deleted_at", precision: nil t.string "unique_code" t.index ["name"], name: "index_disbursement_types_on_name" t.index ["unique_code"], name: "index_disbursement_types_on_unique_code", unique: true @@ -265,8 +266,8 @@ t.integer "claim_id" t.decimal "net_amount" t.decimal "vat_amount" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.decimal "total", default: "0.0" t.uuid "uuid", default: -> { "uuid_generate_v4()" } t.index ["claim_id"], name: "index_disbursements_on_claim_id" @@ -275,8 +276,8 @@ create_table "documents", id: :serial, force: :cascade do |t| t.integer "claim_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "external_user_id" t.uuid "uuid", default: -> { "uuid_generate_v4()" } t.string "form_id" @@ -293,15 +294,15 @@ t.string "name" t.string "category" t.string "postcode" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["category"], name: "index_establishments_on_category" end create_table "expense_types", id: :serial, force: :cascade do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "roles" t.string "reason_set" t.string "unique_code" @@ -316,8 +317,8 @@ t.float "quantity" t.decimal "rate" t.decimal "amount" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.uuid "uuid", default: -> { "uuid_generate_v4()" } t.integer "reason_id" t.string "reason_text" @@ -334,14 +335,14 @@ end create_table "external_users", id: :serial, force: :cascade do |t| - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "supplier_number" t.uuid "uuid", default: -> { "uuid_generate_v4()" } t.boolean "vat_registered", default: true t.integer "provider_id" t.string "roles" - t.datetime "deleted_at" + t.datetime "deleted_at", precision: nil t.index ["provider_id"], name: "index_external_users_on_provider_id" t.index ["supplier_number"], name: "index_external_users_on_supplier_number" end @@ -349,17 +350,17 @@ create_table "fee_schemes", id: :serial, force: :cascade do |t| t.string "name" t.integer "version" - t.datetime "start_date" - t.datetime "end_date" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "start_date", precision: nil + t.datetime "end_date", precision: nil + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "fee_types", id: :serial, force: :cascade do |t| t.string "description" t.string "code" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.decimal "max_amount" t.boolean "calculated", default: true t.string "type" @@ -378,8 +379,8 @@ t.integer "fee_type_id" t.decimal "quantity" t.decimal "amount" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.uuid "uuid", default: -> { "uuid_generate_v4()" } t.decimal "rate" t.string "type" @@ -397,10 +398,10 @@ create_table "injection_attempts", id: :serial, force: :cascade do |t| t.integer "claim_id" t.boolean "succeeded" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.json "error_messages" - t.datetime "deleted_at" + t.datetime "deleted_at", precision: nil t.index ["claim_id"], name: "index_injection_attempts_on_claim_id" end @@ -414,8 +415,8 @@ create_table "locations", id: :serial, force: :cascade do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["name"], name: "index_locations_on_name" end @@ -423,8 +424,8 @@ t.text "body" t.integer "claim_id" t.integer "sender_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["claim_id"], name: "index_messages_on_claim_id" t.index ["sender_id"], name: "index_messages_on_sender_id" end @@ -442,11 +443,11 @@ t.date "trial_cracked_at" t.date "trial_fixed_at" t.date "trial_fixed_notice_at" - t.datetime "authorised_at" - t.datetime "created_at" - t.datetime "date_last_assessed" - t.datetime "last_submitted_at" - t.datetime "original_submission_date" + t.datetime "authorised_at", precision: nil + t.datetime "created_at", precision: nil + t.datetime "date_last_assessed", precision: nil + t.datetime "last_submitted_at", precision: nil + t.datetime "original_submission_date", precision: nil t.decimal "amount_authorised" t.decimal "amount_claimed" t.decimal "disbursements_total" @@ -496,23 +497,23 @@ t.integer "number" t.string "description" t.integer "offence_category_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["offence_category_id"], name: "index_offence_bands_on_offence_category_id" end create_table "offence_categories", id: :serial, force: :cascade do |t| t.integer "number" t.string "description" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "offence_classes", id: :serial, force: :cascade do |t| t.string "class_letter" t.string "description" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["class_letter"], name: "index_offence_classes_on_class_letter" t.index ["description"], name: "index_offence_classes_on_description" end @@ -527,8 +528,8 @@ create_table "offences", id: :serial, force: :cascade do |t| t.string "description" t.integer "offence_class_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "unique_code", default: "anyoldrubbish", null: false t.integer "offence_band_id" t.string "contrary" @@ -545,8 +546,8 @@ t.boolean "vat_registered" t.uuid "uuid" t.uuid "api_key" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.string "roles" t.index ["firm_agfs_supplier_number"], name: "index_providers_on_firm_agfs_supplier_number" t.index ["name"], name: "index_providers_on_name" @@ -555,8 +556,8 @@ create_table "representation_orders", id: :serial, force: :cascade do |t| t.integer "defendant_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "maat_reference" t.date "representation_order_date" t.uuid "uuid", default: -> { "uuid_generate_v4()" } @@ -566,13 +567,13 @@ create_table "stats_reports", id: :serial, force: :cascade do |t| t.string "report_name" t.string "status" - t.datetime "started_at" - t.datetime "completed_at" + t.datetime "started_at", precision: nil + t.datetime "completed_at", precision: nil end create_table "super_admins", id: :serial, force: :cascade do |t| - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "supplier_numbers", id: :serial, force: :cascade do |t| @@ -595,8 +596,8 @@ t.integer "user_id" t.integer "message_id" t.boolean "read", default: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["message_id"], name: "index_user_message_statuses_on_message_id" t.index ["read"], name: "index_user_message_statuses_on_read" t.index ["user_id"], name: "index_user_message_statuses_on_user_id" @@ -606,26 +607,26 @@ t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false t.string "reset_password_token" - t.datetime "reset_password_sent_at" - t.datetime "remember_created_at" + t.datetime "reset_password_sent_at", precision: nil + t.datetime "remember_created_at", precision: nil t.integer "sign_in_count", default: 0, null: false - t.datetime "current_sign_in_at" - t.datetime "last_sign_in_at" + t.datetime "current_sign_in_at", precision: nil + t.datetime "last_sign_in_at", precision: nil t.inet "current_sign_in_ip" t.inet "last_sign_in_ip" t.string "persona_type" t.integer "persona_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "first_name" t.string "last_name" t.integer "failed_attempts", default: 0, null: false - t.datetime "locked_at" + t.datetime "locked_at", precision: nil t.string "unlock_token" t.text "settings" - t.datetime "deleted_at" + t.datetime "deleted_at", precision: nil t.uuid "api_key", default: -> { "uuid_generate_v4()" } - t.datetime "disabled_at" + t.datetime "disabled_at", precision: nil t.index ["email"], name: "index_users_on_email", unique: true t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true @@ -634,8 +635,8 @@ create_table "vat_rates", id: :serial, force: :cascade do |t| t.integer "rate_base_points" t.date "effective_date" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "versions", id: :serial, force: :cascade do |t| @@ -644,7 +645,7 @@ t.string "event", null: false t.string "whodunnit" t.text "object" - t.datetime "created_at" + t.datetime "created_at", precision: nil t.text "object_changes" t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id" end From 07623b3242668d6764a55698a29e94f673088d9e Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Mon, 12 Aug 2024 13:18:33 +0100 Subject: [PATCH 19/25] Wording for review page null scenario amended ** Wording for review page null scenario reviewed with designer and amended to be a bit vaguer due to high number of potential scenarios. --- config/locales/en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 73e410a8bc..ca3eb51875 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1085,7 +1085,7 @@ en: london_rates: "London fee rates" london_rates_true: "This claim qualifies for London fee rates" london_rates_false: "This claim does not qualify for London fee rates" - london_rates_: "This claim may qualify for London fee rates. This will be assessed by a caseworker" + london_rates_: "This information has not been provided" london_rates_title: "Is the firm based in a London borough?" london_rates_hint: "We need to know this to check the correct rates have been used in your application" offence_select: From 89f3a7939c4cdb6977f04fbb63d5fedbdaa706cd Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Wed, 28 Aug 2024 11:35:45 +0100 Subject: [PATCH 20/25] New request spec for Prices controller ** Request spec set up for Prices Controller, currently only testing london_rates cases --- spec/requests/prices_spec.rb | 79 ++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 spec/requests/prices_spec.rb diff --git a/spec/requests/prices_spec.rb b/spec/requests/prices_spec.rb new file mode 100644 index 0000000000..cc23af7afb --- /dev/null +++ b/spec/requests/prices_spec.rb @@ -0,0 +1,79 @@ +require 'rails_helper' + +RSpec.describe 'calcuate prices' do + describe 'POST /external_users/claims/claim_id/fees/calculate_price.json' do + subject(:calculate_price) { post external_users_claim_fees_calculate_price_url(claim.id, format: :json), params: } + + + + # rubocop:disable RSpec/MultipleMemoizedHelpers + context 'with LGFS Special Preparation fee' do + let(:external_user) { create(:external_user) } + let(:user) { external_user.user } + let(:fee_type) { create(:misc_fee_type, :mispf) } + let(:fee) { create(:misc_fee, fee_type:, claim:, quantity: 1) } + let(:mock_client) { instance_double(LAA::FeeCalculator::Client) } + let(:mock_fee_scheme) { instance_double(LAA::FeeCalculator::FeeScheme) } + let(:params) do + { format: :json, + claim_id: claim.id, + price_type: 'UnitPrice', + fee_type_id: fee.fee_type.id, + fees: { + '0': { fee_type_id: fee.fee_type.id, quantity: fee.quantity } + } } + end + + before do + allow(LAA::FeeCalculator).to receive(:client).and_return(mock_client) + allow(mock_client).to receive(:fee_schemes).and_return(mock_fee_scheme) + allow_any_instance_of(Claims::FeeCalculator::CalculatePrice) + .to receive(:scenario) + .and_return(Struct.new(:id).new('1')) + end + + describe 'with london_rates_apply true' do + let(:claim) { create(:litigator_claim, london_rates_apply: true) } + + before do + allow(mock_fee_scheme).to receive(:prices).with(london_rates_apply: true).and_return({ fee_per_unit: 100 }) + sign_in user + calculate_price + end + + it 'submits a request with the expected parameters' do + expect(mock_fee_scheme).to have_received(:prices).with(hash_including(london_rates_apply: true)) + end + end + + describe 'with london_rates_apply false' do + let(:claim) { create(:litigator_claim, london_rates_apply: false) } + + before do + allow(mock_fee_scheme).to receive(:prices).with(london_rates_apply: false).and_return({ fee_per_unit: 50 }) + sign_in user + calculate_price + end + + it 'submits a request with the expected parameters' do + expect(mock_fee_scheme).to have_received(:prices).with(hash_including(london_rates_apply: false)) + end + end + + describe 'with london_rates_apply not specified' do + let(:claim) { create(:litigator_claim) } + + before do + allow(mock_fee_scheme).to receive(:prices).and_return({}) + sign_in user + calculate_price + end + + it 'submits a request with the expected parameters' do + expect(mock_fee_scheme).to have_received(:prices).with(hash_not_including(:london_rates_apply)) + end + end + end + # rubocop:enable RSpec/MultipleMemoizedHelpers + end +end From 557805c869f98cfc9be0c359c91504311a9fa3f5 Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Wed, 28 Aug 2024 11:36:50 +0100 Subject: [PATCH 21/25] Implement london_rates_apply into Prices controller ** Prices Controller can now submit API requests for london prices when given a claim with London Rates Apply set --- app/controllers/external_users/fees/prices_controller.rb | 1 + app/services/claims/fee_calculator/calculate_price.rb | 1 + app/services/claims/fee_calculator/unit_price.rb | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/app/controllers/external_users/fees/prices_controller.rb b/app/controllers/external_users/fees/prices_controller.rb index d580af86aa..b3dd45a8bf 100644 --- a/app/controllers/external_users/fees/prices_controller.rb +++ b/app/controllers/external_users/fees/prices_controller.rb @@ -40,6 +40,7 @@ def calculator_params :claim_id, :fee_type_id, :advocate_category, + :london_rates_apply, :ppe, :pw, :days, diff --git a/app/services/claims/fee_calculator/calculate_price.rb b/app/services/claims/fee_calculator/calculate_price.rb index 5611f124b1..546fd700f8 100644 --- a/app/services/claims/fee_calculator/calculate_price.rb +++ b/app/services/claims/fee_calculator/calculate_price.rb @@ -64,6 +64,7 @@ def setup(options) @pages_of_prosecuting_evidence = options[:pages_of_prosecuting_evidence] || claim.prosecution_evidence @quantity = options[:quantity] || 1 @current_page_fees = options[:fees].values + @london_rates_apply = claim.london_rates_apply exclusions rescue StandardError raise Exceptions::InsufficientData diff --git a/app/services/claims/fee_calculator/unit_price.rb b/app/services/claims/fee_calculator/unit_price.rb index 3df38b3fde..d2b5c29e02 100644 --- a/app/services/claims/fee_calculator/unit_price.rb +++ b/app/services/claims/fee_calculator/unit_price.rb @@ -44,8 +44,14 @@ def price_options opts[:limit_to] = limit_to opts[:unit] = unit opts.keep_if { |_k, v| v.present? } + # Filter above will filter out false, which is a valid value for london_rates_apply + opts[:london_rates_apply] = @london_rates_apply unless @london_rates_apply.nil? + opts + end + + def unit_price @prices = fee_scheme.prices(**price_options) filter_third_cracked_prices From f663b5d9fd5fc27029933a9b517454d0f93f78bd Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Wed, 28 Aug 2024 15:08:40 +0100 Subject: [PATCH 22/25] Created feature tests for LGFS misc fees ** New feature tests created for london/nonlondon rates on LGFS misc fees --- .../misc_fee_calculator_london.feature | 95 +++++++++++++++++++ .../misc_fee_calculator_nonlondon.feature | 95 +++++++++++++++++++ .../step_definitions/litigator_claim_steps.rb | 9 ++ 3 files changed, 199 insertions(+) create mode 100644 features/fee_calculator/litigator/misc_fee_calculator_london.feature create mode 100644 features/fee_calculator/litigator/misc_fee_calculator_nonlondon.feature diff --git a/features/fee_calculator/litigator/misc_fee_calculator_london.feature b/features/fee_calculator/litigator/misc_fee_calculator_london.feature new file mode 100644 index 0000000000..da90568ccd --- /dev/null +++ b/features/fee_calculator/litigator/misc_fee_calculator_london.feature @@ -0,0 +1,95 @@ +@javascript +@fee_calc_vcr +Feature: litigator completes fixed fee page using calculator + + Scenario: I create a fee scheme 9 fixed fee claim using london rates + + Given I am a signed in litigator + And My provider has supplier numbers + And I am on the 'Your claims' page + And I click 'Start a claim' + And I select the fee scheme 'Litigator final fee' + Then I should be on the litigator new claim page + + When I choose the supplier number '1A222Z' + And I enter a providers reference of 'LGFS test misc fee calculation' + And I select a case type of 'Appeal against conviction' + And I select the court 'Blackfriars' + And I enter a case number of 'A20161298' + And I enter the case concluded date '2018-04-01' + And I select 'true' to London rates + + Then I click "Continue" in the claim form and move to the 'Defendant details' form page + + And I enter defendant, LGFS representation order and MAAT reference + And I add another defendant, LGFS representation order and MAAT reference + + Given I insert the VCR cassette 'features/fee_calculator/litigator/misc_fee_calculator_london' + + Then I click "Continue" in the claim form + And I should be in the 'Fixed fees' form page + + And I fill '2018-11-01' as the fixed fee date + And I fill '1' as the fixed fee quantity + + Then I click "Continue" in the claim form + And I should be in the 'Miscellaneous fees' form page + + When I add a litigator calculated miscellaneous fee 'Special preparation fee' with quantity of '3' + + Then the following govuk fee details should exist: + | section | fee_description | rate | hint | help | + | miscellaneous | Special Preparation fee | 43.12 | Number of hours | true | + + Then I eject the VCR cassette + And I save as draft + + Then I should see 'Draft claim saved' + And Claim 'A20161298' should be listed with a status of 'Draft' and a claimed amount of '£574.60' + + Scenario: I create a fee scheme 10 fixed fee claim using calculated value + + Given the current date is '2022-10-30' + And I am a signed in litigator + And My provider has supplier numbers + And I am on the 'Your claims' page + And I click 'Start a claim' + And I select the fee scheme 'Litigator final fee' + Then I should be on the litigator new claim page + + When I choose the supplier number '1A222Z' + And I enter a providers reference of 'LGFS misc fixed fee calculation' + And I select a case type of 'Appeal against conviction' + And I select the court 'Blackfriars' + And I enter a case number of 'A20161299' + And I enter the case concluded date '2022-10-29' + + Then I click "Continue" in the claim form and move to the 'Defendant details' form page + + And I enter defendant, LGFS Scheme 10 representation order and MAAT reference + And I add another defendant, LGFS Scheme 10 representation order and MAAT reference + + Given I insert the VCR cassette 'features/fee_calculator/litigator/fixed_fee_calculator' + + Then I click "Continue" in the claim form + And I should be in the 'Fixed fees' form page + + And I fill '2022-10-01' as the fixed fee date + And I fill '1' as the fixed fee quantity + + Then I click "Continue" in the claim form + And I should be in the 'Miscellaneous fees' form page + + + When I add a litigator calculated miscellaneous fee 'Special preparation fee' with quantity of '3' + + Then the following govuk fee details should exist: + | section | fee_description | rate | hint | help | + | miscellaneous | Special Preparation fee | 49.59 | Number of hours | true | + + Then I eject the VCR cassette + And I save as draft + + Then I should see 'Draft claim saved' + And Claim 'A20161298' should be listed with a status of 'Draft' and a claimed amount of '£660.79' + diff --git a/features/fee_calculator/litigator/misc_fee_calculator_nonlondon.feature b/features/fee_calculator/litigator/misc_fee_calculator_nonlondon.feature new file mode 100644 index 0000000000..cb59b6d0ee --- /dev/null +++ b/features/fee_calculator/litigator/misc_fee_calculator_nonlondon.feature @@ -0,0 +1,95 @@ +@javascript +@fee_calc_vcr +Feature: litigator completes fixed fee page using calculator + + Scenario: I create a fee scheme 9 fixed fee claim using london rates + + Given I am a signed in litigator + And My provider has supplier numbers + And I am on the 'Your claims' page + And I click 'Start a claim' + And I select the fee scheme 'Litigator final fee' + Then I should be on the litigator new claim page + + When I choose the supplier number '1A222Z' + And I enter a providers reference of 'LGFS test misc fee calculation' + And I select a case type of 'Appeal against conviction' + And I select the court 'Blackfriars' + And I enter a case number of 'A20161298' + And I enter the case concluded date '2018-04-01' + And I select 'true' to London rates + + Then I click "Continue" in the claim form and move to the 'Defendant details' form page + + And I enter defendant, LGFS representation order and MAAT reference + And I add another defendant, LGFS representation order and MAAT reference + + Given I insert the VCR cassette 'features/fee_calculator/litigator/misc_fee_calculator_nonlondon' + + Then I click "Continue" in the claim form + And I should be in the 'Fixed fees' form page + + And I fill '2018-11-01' as the fixed fee date + And I fill '1' as the fixed fee quantity + + Then I click "Continue" in the claim form + And I should be in the 'Miscellaneous fees' form page + + When I add a litigator calculated miscellaneous fee 'Special preparation fee' with quantity of '3' + + Then the following govuk fee details should exist: + | section | fee_description | rate | hint | help | + | miscellaneous | Special Preparation fee | 41.06 | Number of hours | true | + + Then I eject the VCR cassette + And I save as draft + + Then I should see 'Draft claim saved' + And Claim 'A20161298' should be listed with a status of 'Draft' and a claimed amount of '£567.18' + + Scenario: I create a fee scheme 10 fixed fee claim using calculated value + + Given the current date is '2022-10-30' + And I am a signed in litigator + And My provider has supplier numbers + And I am on the 'Your claims' page + And I click 'Start a claim' + And I select the fee scheme 'Litigator final fee' + Then I should be on the litigator new claim page + + When I choose the supplier number '1A222Z' + And I enter a providers reference of 'LGFS misc fixed fee calculation' + And I select a case type of 'Appeal against conviction' + And I select the court 'Blackfriars' + And I enter a case number of 'A20161299' + And I enter the case concluded date '2022-10-29' + + Then I click "Continue" in the claim form and move to the 'Defendant details' form page + + And I enter defendant, LGFS Scheme 10 representation order and MAAT reference + And I add another defendant, LGFS Scheme 10 representation order and MAAT reference + + Given I insert the VCR cassette 'features/fee_calculator/litigator/fixed_fee_calculator' + + Then I click "Continue" in the claim form + And I should be in the 'Fixed fees' form page + + And I fill '2022-10-01' as the fixed fee date + And I fill '1' as the fixed fee quantity + + Then I click "Continue" in the claim form + And I should be in the 'Miscellaneous fees' form page + + + When I add a litigator calculated miscellaneous fee 'Special preparation fee' with quantity of '3' + + Then the following govuk fee details should exist: + | section | fee_description | rate | hint | help | + | miscellaneous | Special Preparation fee | 47.22 | Number of hours | true | + + Then I eject the VCR cassette + And I save as draft + + Then I should see 'Draft claim saved' + And Claim 'A20161298' should be listed with a status of 'Draft' and a claimed amount of '£652.26' + diff --git a/features/step_definitions/litigator_claim_steps.rb b/features/step_definitions/litigator_claim_steps.rb index 32d2ba0103..546aab9e5c 100644 --- a/features/step_definitions/litigator_claim_steps.rb +++ b/features/step_definitions/litigator_claim_steps.rb @@ -81,6 +81,15 @@ @litigator_claim_form_page.miscellaneous_fees.last.amount.set "135.78" end +When(/^I add a litigator calculated miscellaneous fee '(.*?)'(?: with quantity of '(.*?)')$/) do |name, quantity| + quantity = quantity.present? ? quantity : '1' + @litigator_claim_form_page.miscellaneous_fees.last.fee_type.choose(name) + @litigator_claim_form_page.miscellaneous_fees.last.quantity.set quantity + @litigator_claim_form_page.miscellaneous_fees.last.quantity.send_keys(:tab) + wait_for_debounce + wait_for_ajax +end + Then(/^the first miscellaneous fee should have fee types\s*'([^']*)'$/) do |descriptions| descriptions = descriptions.split(',').map(&:strip) expect(@litigator_claim_form_page.miscellaneous_fees.first.fee_type).to be_visible From 15eacc84cf4794413dc719c257efc50f3e8458c9 Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Thu, 29 Aug 2024 13:21:45 +0100 Subject: [PATCH 23/25] Implement API call for LGFS MISC Fees ** Modify LGFS misc fees form to use dropdown, quantity and rate fields ** Modify fee_type_code_for to not return LIT_FEE for LGFS misc fees ** New quantity identifier in LGFSMiscFeeSection --- .../claims/fee_calculator/calculate_price.rb | 5 +- .../litigators/_misc_fee_fields.html.haml | 61 ++++++++++++++----- config/locales/en.yml | 8 +++ .../sections/lgfs_misc_fee_section.rb | 2 + 4 files changed, 61 insertions(+), 15 deletions(-) diff --git a/app/services/claims/fee_calculator/calculate_price.rb b/app/services/claims/fee_calculator/calculate_price.rb index 546fd700f8..e9f93cc8b8 100644 --- a/app/services/claims/fee_calculator/calculate_price.rb +++ b/app/services/claims/fee_calculator/calculate_price.rb @@ -137,7 +137,10 @@ def fee_type_mappings end def fee_type_code_for(fee_type) - return 'LIT_FEE' if lgfs? + + # For LGFS Misc Fees, use fee type mappings. For all other LGFS fees, return LIT_FEE + return 'LIT_FEE' if lgfs? & !fee_type.is_a?(Fee::MiscFeeType) + fee_type = case_uplift_parent if fee_type.case_uplift? fee_type = defendant_uplift_parent if fee_type.defendant_uplift? fee_type_mappings.all[fee_type&.unique_code&.to_sym][:bill_subtype] diff --git a/app/views/external_users/claims/misc_fees/litigators/_misc_fee_fields.html.haml b/app/views/external_users/claims/misc_fees/litigators/_misc_fee_fields.html.haml index 80417c4e5d..ab6fbb77b8 100644 --- a/app/views/external_users/claims/misc_fees/litigators/_misc_fee_fields.html.haml +++ b/app/views/external_users/claims/misc_fees/litigators/_misc_fee_fields.html.haml @@ -1,3 +1,5 @@ +- fee = present(f.object) +- claim = present(f.object.claim) .form-section.misc-fee-group.nested-fields.js-block.fx-do-init.fx-fee-group.fx-numberedList-item{ data: { 'type': 'miscFees', autovat: @claim.apply_vat? ? 'true' : 'false' } } = f.govuk_fieldset legend: { text: t('.misc_fee_html') } do @@ -5,18 +7,49 @@ = link_to_remove_association f, wrapper_class: 'misc-fee-group', class: 'govuk-link govuk-!-display-none fx-numberedList-action' do = t('common.remove_html', context: t('.misc_fee')) - = f.govuk_radio_buttons_fieldset(:fee_type_id, form_group: {class: 'fee-type'}, legend: { size: 's', text: t('.fee_type') }) do - - present_collection(@claim.eligible_misc_fee_types).each do |misc_fee_type| - = f.govuk_radio_button :fee_type_id, - misc_fee_type.id, - label: { text: misc_fee_type.description }, - 'data-unique-code': misc_fee_type.unique_code do - - if misc_fee_type.unique_code.eql?('MIUMO') - = render 'warnings/unused_material_over_3_hours' - - = f.govuk_number_field :amount, - label: { text: t('.net_amount_html', context: t('.misc_fee')) }, - class: 'total fee-rate', + = f.govuk_collection_select :fee_type_id, + claim.eligible_misc_fee_type_options_for_select.map{ |ft| [ft.first, ft.second, { 'data-unique-code': ft.third[:data][:unique_code] }] }, + :second, + :first, + class: 'js-misc-fee-type js-fee-type js-fee-calculator-fee-type fx-misc-fee-calculation', + form_group: { class: 'fee-type fx-autocomplete-wrapper cc-fee-type' }, + label: { text: t('.fee_type_html', context: t('.misc_fee')), size: 's' }, + options: { include_blank: '' } + + -# - if misc_fee_type.unique_code.eql?('MIUMO') + -# = render 'warnings/unused_material_over_3_hours' + + =f.govuk_number_field :quantity, + class: 'quantity fee-quantity js-fee-quantity js-fee-calculator-quantity', + form_group: { class: 'quantity_wrapper' }, + hint: { text: t('.quantity_hint'), hidden: true }, + label: { text: t('.quantity_html', context: t('.misc_fee')), size: 's' }, + value: fee.quantity, + width: 5 + + =f.govuk_number_field :rate, + class: 'rate fee-rate js-fee-calculator-rate', + form_group: { class: 'js-unit-price-effectee calculated-unit-fee' }, + label: { text: t('.rate_html', context: t('.misc_fee')), size: 's' }, prefix_text: '£', - value: number_with_precision(f.object.amount, precision: 2), - width: 'one-quarter' + readonly: f.object.price_calculated?, + value: number_with_precision(f.object.rate, precision: 2), + width: 5 + + = f.govuk_text_field :price_calculated, + form_group: { class: 'js-fee-calculator-success' }, + label: { hidden: true }, + type: 'hidden', + value: f.object.price_calculated? + + .fee-calc-help-wrapper.hidden + = govuk_detail t('.help_how_we_calculate_rate_title') do + = t('.help_how_we_calculate_rate_body') + + = govuk_summary_list_no_border do + = govuk_summary_list_row do + = govuk_summary_list_key do + = t('.net_amount') + + = govuk_summary_list_value(class: 'fee-net-amount currency-indicator total') do + = fee.amount || number_to_currency(0) diff --git a/config/locales/en.yml b/config/locales/en.yml index 0518c0c17b..ee2f9eb9fa 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1534,14 +1534,22 @@ en: or unused materials (over 3 hours) form (opens in new tab) and attach to the claim. misc_fee_fields: + quantity: *quantity + quantity_hint: Enter a quantity + quantity_html: Quantity for %{context} + rate: Rate + rate_html: Rate in pounds for %{context} misc_fee: *miscellaneous_fee misc_fee_html: 'Miscellaneous fees ' fee_type: *fee_type case_numbers: *case_numbers + fee_type_html: Type of fee for %{context} type_of_fee_html: '%{context} for miscellaneous fee ' net_amount: *net_amount net_amount_html: Net amount in pounds for %{context} remove: "Remove" + help_how_we_calculate_rate_title: *how_is_this_calculated_help + help_how_we_calculate_rate_body: We calculate the rate based upon the fee scheme and fee_type. summary: header: *miscellaneous_fees financial_summary: diff --git a/features/page_objects/sections/lgfs_misc_fee_section.rb b/features/page_objects/sections/lgfs_misc_fee_section.rb index d9be6d2cf6..3146626c3c 100644 --- a/features/page_objects/sections/lgfs_misc_fee_section.rb +++ b/features/page_objects/sections/lgfs_misc_fee_section.rb @@ -3,6 +3,7 @@ class FeeTypeSection < SitePrism::Section sections :radios, RadioSection, '.govuk-radios__item' + def radio_labels radios.map { |radio| radio.label.text.gsub(/\n(.*)/, '') } end @@ -13,6 +14,7 @@ def choose(label) end class LGFSMiscFeeSection < SitePrism::Section + element :quantity, "input.quantity" section :fee_type, FeeTypeSection, '.fee-type' element :amount, 'input.total' From d56b838b023fcb72992114722a5985bb0f2b58d1 Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Thu, 29 Aug 2024 17:38:16 +0100 Subject: [PATCH 24/25] Testing cleanup ** Some tweaks and changes to scope to make new misc fee featuretests work ** Recorded VCRs for new misc fee tests ** Fixed unused materials 3 hours warning to new JS version ** Minor rubocop tweaks and some additional comments for code clarity --- .../claims/fee_calculator/calculate_price.rb | 1 - .../claims/fee_calculator/unit_price.rb | 9 +- .../litigators/_misc_fee_fields.html.haml | 7 +- .../misc_fee_calculator_london.feature | 27 +- .../misc_fee_calculator_nonlondon.feature | 27 +- .../page_objects/litigator_claim_form_page.rb | 8 + .../sections/lgfs_misc_fee_section.rb | 6 +- .../step_definitions/litigator_claim_steps.rb | 25 +- spec/requests/prices_spec.rb | 7 +- .../litigator/misc_fee_calculator_london.yml | 1277 +++++++++++++++++ .../misc_fee_calculator_nonlondon.yml | 913 ++++++++++++ 11 files changed, 2256 insertions(+), 51 deletions(-) create mode 100644 vcr/cassettes/features/fee_calculator/litigator/misc_fee_calculator_london.yml create mode 100644 vcr/cassettes/features/fee_calculator/litigator/misc_fee_calculator_nonlondon.yml diff --git a/app/services/claims/fee_calculator/calculate_price.rb b/app/services/claims/fee_calculator/calculate_price.rb index e9f93cc8b8..90aa931eb5 100644 --- a/app/services/claims/fee_calculator/calculate_price.rb +++ b/app/services/claims/fee_calculator/calculate_price.rb @@ -137,7 +137,6 @@ def fee_type_mappings end def fee_type_code_for(fee_type) - # For LGFS Misc Fees, use fee type mappings. For all other LGFS fees, return LIT_FEE return 'LIT_FEE' if lgfs? & !fee_type.is_a?(Fee::MiscFeeType) diff --git a/app/services/claims/fee_calculator/unit_price.rb b/app/services/claims/fee_calculator/unit_price.rb index d2b5c29e02..cc99ba8dc7 100644 --- a/app/services/claims/fee_calculator/unit_price.rb +++ b/app/services/claims/fee_calculator/unit_price.rb @@ -35,8 +35,7 @@ def amount end def price_options - opts = {} - opts[:scenario] = scenario.id + opts = { scenario: scenario.id } opts[:offence_class] = offence_class_or_default opts[:advocate_type] = advocate_type opts[:fee_type_code] = fee_type_code_for(fee_type) @@ -45,13 +44,11 @@ def price_options opts[:unit] = unit opts.keep_if { |_k, v| v.present? } # Filter above will filter out false, which is a valid value for london_rates_apply - opts[:london_rates_apply] = @london_rates_apply unless @london_rates_apply.nil? + # Only send london_rates_apply to requests for Misc Fees where it is not nil + opts[:london_rates_apply] = @london_rates_apply if !@london_rates_apply.nil? && fee_type.is_a?(Fee::MiscFeeType) opts - end - - def unit_price @prices = fee_scheme.prices(**price_options) filter_third_cracked_prices diff --git a/app/views/external_users/claims/misc_fees/litigators/_misc_fee_fields.html.haml b/app/views/external_users/claims/misc_fees/litigators/_misc_fee_fields.html.haml index ab6fbb77b8..9a89639ff9 100644 --- a/app/views/external_users/claims/misc_fees/litigators/_misc_fee_fields.html.haml +++ b/app/views/external_users/claims/misc_fees/litigators/_misc_fee_fields.html.haml @@ -1,6 +1,7 @@ - fee = present(f.object) - claim = present(f.object.claim) -.form-section.misc-fee-group.nested-fields.js-block.fx-do-init.fx-fee-group.fx-numberedList-item{ data: { 'type': 'miscFees', autovat: @claim.apply_vat? ? 'true' : 'false' } } + +.form-section.misc-fee-group.nested-fields.js-block.fx-do-init.fx-fee-group.fx-numberedList-item{ data: { 'type': 'miscFees', autovat: @claim.apply_vat? ? 'true' : 'false', 'block-type': 'FeeBlockCalculator' } } = f.govuk_fieldset legend: { text: t('.misc_fee_html') } do @@ -16,8 +17,8 @@ label: { text: t('.fee_type_html', context: t('.misc_fee')), size: 's' }, options: { include_blank: '' } - -# - if misc_fee_type.unique_code.eql?('MIUMO') - -# = render 'warnings/unused_material_over_3_hours' + .form-group.fx-unused-materials-warning.js-hidden + = render 'warnings/unused_material_over_3_hours' =f.govuk_number_field :quantity, class: 'quantity fee-quantity js-fee-quantity js-fee-calculator-quantity', diff --git a/features/fee_calculator/litigator/misc_fee_calculator_london.feature b/features/fee_calculator/litigator/misc_fee_calculator_london.feature index da90568ccd..2c9a1a23e7 100644 --- a/features/fee_calculator/litigator/misc_fee_calculator_london.feature +++ b/features/fee_calculator/litigator/misc_fee_calculator_london.feature @@ -17,7 +17,7 @@ Feature: litigator completes fixed fee page using calculator And I select the court 'Blackfriars' And I enter a case number of 'A20161298' And I enter the case concluded date '2018-04-01' - And I select 'true' to London rates + And I select 'yes' to London rates Then I click "Continue" in the claim form and move to the 'Defendant details' form page @@ -36,16 +36,12 @@ Feature: litigator completes fixed fee page using calculator And I should be in the 'Miscellaneous fees' form page When I add a litigator calculated miscellaneous fee 'Special preparation fee' with quantity of '3' - - Then the following govuk fee details should exist: - | section | fee_description | rate | hint | help | - | miscellaneous | Special Preparation fee | 43.12 | Number of hours | true | + Then I should see a rate of '43.12' + And I should see a calculated fee net amount of '£129.36' + And I add a litigator miscellaneous fee 'Costs judge application' + And I should see a total calculated miscellaneous fees amount of '£265.14' Then I eject the VCR cassette - And I save as draft - - Then I should see 'Draft claim saved' - And Claim 'A20161298' should be listed with a status of 'Draft' and a claimed amount of '£574.60' Scenario: I create a fee scheme 10 fixed fee claim using calculated value @@ -63,6 +59,7 @@ Feature: litigator completes fixed fee page using calculator And I select the court 'Blackfriars' And I enter a case number of 'A20161299' And I enter the case concluded date '2022-10-29' + And I select 'yes' to London rates Then I click "Continue" in the claim form and move to the 'Defendant details' form page @@ -82,14 +79,10 @@ Feature: litigator completes fixed fee page using calculator When I add a litigator calculated miscellaneous fee 'Special preparation fee' with quantity of '3' - - Then the following govuk fee details should exist: - | section | fee_description | rate | hint | help | - | miscellaneous | Special Preparation fee | 49.59 | Number of hours | true | + Then I should see a rate of '49.59' + And I should see a calculated fee net amount of '£148.77' + And I add a litigator miscellaneous fee 'Costs judge application' + And I should see a total calculated miscellaneous fees amount of '£284.55' Then I eject the VCR cassette - And I save as draft - - Then I should see 'Draft claim saved' - And Claim 'A20161298' should be listed with a status of 'Draft' and a claimed amount of '£660.79' diff --git a/features/fee_calculator/litigator/misc_fee_calculator_nonlondon.feature b/features/fee_calculator/litigator/misc_fee_calculator_nonlondon.feature index cb59b6d0ee..9c93e01bfa 100644 --- a/features/fee_calculator/litigator/misc_fee_calculator_nonlondon.feature +++ b/features/fee_calculator/litigator/misc_fee_calculator_nonlondon.feature @@ -17,7 +17,7 @@ Feature: litigator completes fixed fee page using calculator And I select the court 'Blackfriars' And I enter a case number of 'A20161298' And I enter the case concluded date '2018-04-01' - And I select 'true' to London rates + And I select 'no' to London rates Then I click "Continue" in the claim form and move to the 'Defendant details' form page @@ -36,16 +36,13 @@ Feature: litigator completes fixed fee page using calculator And I should be in the 'Miscellaneous fees' form page When I add a litigator calculated miscellaneous fee 'Special preparation fee' with quantity of '3' - - Then the following govuk fee details should exist: - | section | fee_description | rate | hint | help | - | miscellaneous | Special Preparation fee | 41.06 | Number of hours | true | + Then I should see a rate of '41.06' + And I should see a calculated fee net amount of '£123.18' + And I add a litigator miscellaneous fee 'Costs judge application' + And I should see a total calculated miscellaneous fees amount of '£258.96' Then I eject the VCR cassette - And I save as draft - Then I should see 'Draft claim saved' - And Claim 'A20161298' should be listed with a status of 'Draft' and a claimed amount of '£567.18' Scenario: I create a fee scheme 10 fixed fee claim using calculated value @@ -63,6 +60,7 @@ Feature: litigator completes fixed fee page using calculator And I select the court 'Blackfriars' And I enter a case number of 'A20161299' And I enter the case concluded date '2022-10-29' + And I select 'no' to London rates Then I click "Continue" in the claim form and move to the 'Defendant details' form page @@ -80,16 +78,11 @@ Feature: litigator completes fixed fee page using calculator Then I click "Continue" in the claim form And I should be in the 'Miscellaneous fees' form page - When I add a litigator calculated miscellaneous fee 'Special preparation fee' with quantity of '3' - - Then the following govuk fee details should exist: - | section | fee_description | rate | hint | help | - | miscellaneous | Special Preparation fee | 47.22 | Number of hours | true | + Then I should see a rate of '47.22' + And I should see a calculated fee net amount of '£141.66' + And I add a litigator miscellaneous fee 'Costs judge application' + And I should see a total calculated miscellaneous fees amount of '£277.44' Then I eject the VCR cassette - And I save as draft - - Then I should see 'Draft claim saved' - And Claim 'A20161298' should be listed with a status of 'Draft' and a claimed amount of '£652.26' diff --git a/features/page_objects/litigator_claim_form_page.rb b/features/page_objects/litigator_claim_form_page.rb index 99e0214a3b..2d0afb4b62 100644 --- a/features/page_objects/litigator_claim_form_page.rb +++ b/features/page_objects/litigator_claim_form_page.rb @@ -23,6 +23,7 @@ class LitigatorClaimFormPage < ClaimFormPage element :ppe_total, "input.quantity" element :actual_trial_length, ".js-fee-calculator-days" section :graduated_fee_date, GOVUKDateSection, "div.graduated-fee-group" + element :sidebar_misc_amount, '.total-miscFees' def select_supplier_number(number) select number, from: "claim_supplier_number", autocomplete: false @@ -37,4 +38,11 @@ def add_disbursement_if_required add_another_disbursement.click end end + + def add_govuk_misc_fee_if_required + if miscellaneous_fees.last.govuk_fee_type_autocomplete_input.value.present? + add_another_miscellaneous_fee.click + end + end + end diff --git a/features/page_objects/sections/lgfs_misc_fee_section.rb b/features/page_objects/sections/lgfs_misc_fee_section.rb index 3146626c3c..859ca16c5a 100644 --- a/features/page_objects/sections/lgfs_misc_fee_section.rb +++ b/features/page_objects/sections/lgfs_misc_fee_section.rb @@ -14,9 +14,13 @@ def choose(label) end class LGFSMiscFeeSection < SitePrism::Section + section :govuk_fee_type_autocomplete, CommonAutocomplete, ".cc-fee-type" + element :govuk_fee_type_autocomplete_input, ".cc-fee-type input", visible: true element :quantity, "input.quantity" + element :rate, "input.rate" section :fee_type, FeeTypeSection, '.fee-type' - element :amount, 'input.total' + element :net_amount, '.fee-net-amount' + def populated? amount.value.size > 0 diff --git a/features/step_definitions/litigator_claim_steps.rb b/features/step_definitions/litigator_claim_steps.rb index 546aab9e5c..674b16335d 100644 --- a/features/step_definitions/litigator_claim_steps.rb +++ b/features/step_definitions/litigator_claim_steps.rb @@ -76,20 +76,37 @@ end And(/^I add a litigator miscellaneous fee '(.*)'$/) do |name| - @litigator_claim_form_page.add_misc_fee_if_required - @litigator_claim_form_page.all('label', text: name).last.click - @litigator_claim_form_page.miscellaneous_fees.last.amount.set "135.78" + @litigator_claim_form_page.add_govuk_misc_fee_if_required + @litigator_claim_form_page.miscellaneous_fees.last.govuk_fee_type_autocomplete.choose_autocomplete_option(name) + @litigator_claim_form_page.miscellaneous_fees.last.govuk_fee_type_autocomplete_input.send_keys(:tab) + @litigator_claim_form_page.miscellaneous_fees.last.quantity.set "1" + @litigator_claim_form_page.miscellaneous_fees.last.rate.set "135.78" +end + +And(/^I should see a calculated fee net amount of '(.*)'$/) do |amount| + expect(@litigator_claim_form_page.miscellaneous_fees.last.net_amount.text).to eq(amount) +end + +And(/^I should see a total calculated miscellaneous fees amount of '(.*)'$/) do |amount| + expect(@litigator_claim_form_page.sidebar_misc_amount.text).to eq(amount) end When(/^I add a litigator calculated miscellaneous fee '(.*?)'(?: with quantity of '(.*?)')$/) do |name, quantity| quantity = quantity.present? ? quantity : '1' - @litigator_claim_form_page.miscellaneous_fees.last.fee_type.choose(name) + @litigator_claim_form_page.miscellaneous_fees.last.govuk_fee_type_autocomplete.choose_autocomplete_option(name) + @litigator_claim_form_page.miscellaneous_fees.last.govuk_fee_type_autocomplete_input.send_keys(:tab) + wait_for_debounce + wait_for_ajax @litigator_claim_form_page.miscellaneous_fees.last.quantity.set quantity @litigator_claim_form_page.miscellaneous_fees.last.quantity.send_keys(:tab) wait_for_debounce wait_for_ajax end +Then(/^I should see a rate of '(.*?)'$/) do |rate| + expect(@litigator_claim_form_page.miscellaneous_fees.last.rate.value).to eq(rate) +end + Then(/^the first miscellaneous fee should have fee types\s*'([^']*)'$/) do |descriptions| descriptions = descriptions.split(',').map(&:strip) expect(@litigator_claim_form_page.miscellaneous_fees.first.fee_type).to be_visible diff --git a/spec/requests/prices_spec.rb b/spec/requests/prices_spec.rb index cc23af7afb..84caeea048 100644 --- a/spec/requests/prices_spec.rb +++ b/spec/requests/prices_spec.rb @@ -4,8 +4,6 @@ describe 'POST /external_users/claims/claim_id/fees/calculate_price.json' do subject(:calculate_price) { post external_users_claim_fees_calculate_price_url(claim.id, format: :json), params: } - - # rubocop:disable RSpec/MultipleMemoizedHelpers context 'with LGFS Special Preparation fee' do let(:external_user) { create(:external_user) } @@ -27,9 +25,14 @@ before do allow(LAA::FeeCalculator).to receive(:client).and_return(mock_client) allow(mock_client).to receive(:fee_schemes).and_return(mock_fee_scheme) + + # Rubocop doesn't like this but without it, execution fails as + # CalculatePrice needs to call its own Scenario method + # rubocop:disable RSpec/AnyInstance allow_any_instance_of(Claims::FeeCalculator::CalculatePrice) .to receive(:scenario) .and_return(Struct.new(:id).new('1')) + # rubocop:enable RSpec/AnyInstance end describe 'with london_rates_apply true' do diff --git a/vcr/cassettes/features/fee_calculator/litigator/misc_fee_calculator_london.yml b/vcr/cassettes/features/fee_calculator/litigator/misc_fee_calculator_london.yml new file mode 100644 index 0000000000..134a55ee38 --- /dev/null +++ b/vcr/cassettes/features/fee_calculator/litigator/misc_fee_calculator_london.yml @@ -0,0 +1,1277 @@ +--- +http_interactions: +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/?case_date=2016-04-01&main_hearing_date&type=LGFS + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:19 GMT + Content-Type: + - application/json + Content-Length: + - '198' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":2,"start_date":"2016-04-01","end_date":"2022-09-29","earliest_main_hearing_date":null,"type":"LGFS","description":"LGFS + Fee Scheme 2016-04"}]}' + recorded_at: Thu, 29 Aug 2024 15:08:19 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/scenarios/ + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:19 GMT + Content-Type: + - application/json + Content-Length: + - '4119' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":51,"next":null,"previous":null,"results":[{"id":1,"name":"Discontinuance","code":"ST1TS0T1"},{"id":2,"name":"Guilty + plea","code":"ST1TS0T2"},{"id":3,"name":"Cracked trial","code":"ST1TS0T3"},{"id":4,"name":"Trial","code":"ST1TS0T4"},{"id":5,"name":"Appeal + against conviction","code":"ST1TS0T5"},{"id":6,"name":"Appeal against sentence","code":"ST1TS0T6"},{"id":7,"name":"Committal + for sentence","code":"ST1TS0T7"},{"id":8,"name":"Contempt","code":"ST1TS0T8"},{"id":9,"name":"Breach + of crown court order","code":"ST3TS3TB"},{"id":10,"name":"Cracked before retrial","code":"ST1TS0T9"},{"id":11,"name":"Retrial","code":"ST1TS0TA"},{"id":12,"name":"Elected + case not proceeded","code":"ST4TS0T1"},{"id":17,"name":"Up to and including + PCMH transfer (original solicitor) - cracked trial","code":"ST2TS1T0"},{"id":18,"name":"Up + to and including PCMH transfer (new solicitor) - guilty plea","code":"ST3TS1T2"},{"id":19,"name":"Up + to and including PCMH transfer (new solicitor) - cracked trial","code":"ST3TS1T3"},{"id":20,"name":"Up + to and including PCMH transfer (new solicitor) - trial","code":"ST3TS1T4"},{"id":21,"name":"Before + trial transfer (original solicitor) - cracked trial","code":"ST2TS2T0"},{"id":22,"name":"Before + trial transfer (new solicitor) - cracked trial","code":"ST3TS2T3"},{"id":23,"name":"Before + trial transfer (new solicitor) - trial","code":"ST3TS2T4"},{"id":24,"name":"During + trial transfer (original solicitor) - trial","code":"ST2TS3T0"},{"id":25,"name":"During + trial transfer (new solicitor) - trial","code":"ST3TS3T4"},{"id":26,"name":"During + trial transfer (new solicitor) - retrial","code":"ST3TS3TA"},{"id":27,"name":"Transfer + before retrial (original solicitor) - retrial","code":"ST2TS4T0"},{"id":28,"name":"Transfer + before retrial (new solicitor) - cracked retrial","code":"ST3TS4T9"},{"id":29,"name":"Transfer + before retrial (new solicitor) - retrial","code":"ST3TS4TA"},{"id":30,"name":"Transfer + during retrial (original solicitor) - retrial","code":"ST2TS5T0"},{"id":31,"name":"Transfer + during retrial (new solicitor) - retrial","code":"ST3TS5TA"},{"id":32,"name":"Hearing + subsequent to sentence","code":"ST1TS0TC"},{"id":33,"name":"Transfer after + retrial and before sentencing (original)","code":"ST2TS6TA"},{"id":34,"name":"Transfer + after retrial and before sentencing (new)","code":"ST3TS6TA"},{"id":35,"name":"Transfer + after trial and before sentencing (original)","code":"ST2TS7T4"},{"id":36,"name":"Transfer + after trial and before sentencing (new)","code":"ST3TS7T4"},{"id":37,"name":"Elected + case not proceeded - up to and including PCMH (original solicitor)","code":"ST4TS0T2"},{"id":38,"name":"Elected + case not proceeded - up to and including PCMH (new solicitor)","code":"ST4TS0T3"},{"id":39,"name":"Elected + case not proceeded - before trial transfer (original solicitor)","code":"ST4TS0T4"},{"id":40,"name":"Elected + case not proceeded - before trial transfer (new solicitor)","code":"ST4TS0T5"},{"id":41,"name":"Elected + case not proceeded - transfer before retrial (original solicitor)","code":"ST4TS0T6"},{"id":42,"name":"Elected + case not proceeded - transfer before retrial (new solicitor)","code":"ST4TS0T7"},{"id":43,"name":"Interim + payment - effective PCMH","code":"ST1TS0T0"},{"id":44,"name":"Interim payment + - trial start","code":"ST1TS1T0"},{"id":45,"name":"Interim payment - retrial + (new solicitor)","code":"ST1TS2T0"},{"id":46,"name":"Interim payment - retrial + start","code":"ST1TS3T0"},{"id":48,"name":"Warrant issued - trial (before + plea hearing)","code":null},{"id":49,"name":"Warrant issued - trial (after + plea hearing)","code":null},{"id":50,"name":"Warrant issued - trial (after + trial start)","code":null},{"id":51,"name":"Warrant issued - appeal against + conviction","code":null},{"id":52,"name":"Warrant issued - appeal against + sentence","code":null},{"id":53,"name":"Warrant issued - committal for sentence","code":null},{"id":54,"name":"Warrant + issued - breach of crown court order","code":null},{"id":55,"name":"Warrant + issued - retrial (after plea hearing)","code":null},{"id":56,"name":"Warrant + issued - retrial (after trial start)","code":null}]}' + recorded_at: Thu, 29 Aug 2024 15:08:19 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/prices/?fee_type_code=LIT_FEE&limit_from=0&offence_class=H&scenario=5 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:20 GMT + Content-Type: + - application/json + Content-Length: + - '298' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":58843,"scenario":5,"advocate_type":null,"fee_type":54,"offence_class":"H","scheme":2,"unit":"DAY","london_rates_apply":null,"fee_per_unit":"0.00000","fixed_fee":"349.47000","limit_from":0,"limit_to":null,"modifiers":[],"strict_range":false}]}' + recorded_at: Thu, 29 Aug 2024 15:08:20 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/?case_date=2016-04-01&main_hearing_date&type=LGFS + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:21 GMT + Content-Type: + - application/json + Content-Length: + - '198' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":2,"start_date":"2016-04-01","end_date":"2022-09-29","earliest_main_hearing_date":null,"type":"LGFS","description":"LGFS + Fee Scheme 2016-04"}]}' + recorded_at: Thu, 29 Aug 2024 15:08:21 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/scenarios/ + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:21 GMT + Content-Type: + - application/json + Content-Length: + - '4119' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":51,"next":null,"previous":null,"results":[{"id":1,"name":"Discontinuance","code":"ST1TS0T1"},{"id":2,"name":"Guilty + plea","code":"ST1TS0T2"},{"id":3,"name":"Cracked trial","code":"ST1TS0T3"},{"id":4,"name":"Trial","code":"ST1TS0T4"},{"id":5,"name":"Appeal + against conviction","code":"ST1TS0T5"},{"id":6,"name":"Appeal against sentence","code":"ST1TS0T6"},{"id":7,"name":"Committal + for sentence","code":"ST1TS0T7"},{"id":8,"name":"Contempt","code":"ST1TS0T8"},{"id":9,"name":"Breach + of crown court order","code":"ST3TS3TB"},{"id":10,"name":"Cracked before retrial","code":"ST1TS0T9"},{"id":11,"name":"Retrial","code":"ST1TS0TA"},{"id":12,"name":"Elected + case not proceeded","code":"ST4TS0T1"},{"id":17,"name":"Up to and including + PCMH transfer (original solicitor) - cracked trial","code":"ST2TS1T0"},{"id":18,"name":"Up + to and including PCMH transfer (new solicitor) - guilty plea","code":"ST3TS1T2"},{"id":19,"name":"Up + to and including PCMH transfer (new solicitor) - cracked trial","code":"ST3TS1T3"},{"id":20,"name":"Up + to and including PCMH transfer (new solicitor) - trial","code":"ST3TS1T4"},{"id":21,"name":"Before + trial transfer (original solicitor) - cracked trial","code":"ST2TS2T0"},{"id":22,"name":"Before + trial transfer (new solicitor) - cracked trial","code":"ST3TS2T3"},{"id":23,"name":"Before + trial transfer (new solicitor) - trial","code":"ST3TS2T4"},{"id":24,"name":"During + trial transfer (original solicitor) - trial","code":"ST2TS3T0"},{"id":25,"name":"During + trial transfer (new solicitor) - trial","code":"ST3TS3T4"},{"id":26,"name":"During + trial transfer (new solicitor) - retrial","code":"ST3TS3TA"},{"id":27,"name":"Transfer + before retrial (original solicitor) - retrial","code":"ST2TS4T0"},{"id":28,"name":"Transfer + before retrial (new solicitor) - cracked retrial","code":"ST3TS4T9"},{"id":29,"name":"Transfer + before retrial (new solicitor) - retrial","code":"ST3TS4TA"},{"id":30,"name":"Transfer + during retrial (original solicitor) - retrial","code":"ST2TS5T0"},{"id":31,"name":"Transfer + during retrial (new solicitor) - retrial","code":"ST3TS5TA"},{"id":32,"name":"Hearing + subsequent to sentence","code":"ST1TS0TC"},{"id":33,"name":"Transfer after + retrial and before sentencing (original)","code":"ST2TS6TA"},{"id":34,"name":"Transfer + after retrial and before sentencing (new)","code":"ST3TS6TA"},{"id":35,"name":"Transfer + after trial and before sentencing (original)","code":"ST2TS7T4"},{"id":36,"name":"Transfer + after trial and before sentencing (new)","code":"ST3TS7T4"},{"id":37,"name":"Elected + case not proceeded - up to and including PCMH (original solicitor)","code":"ST4TS0T2"},{"id":38,"name":"Elected + case not proceeded - up to and including PCMH (new solicitor)","code":"ST4TS0T3"},{"id":39,"name":"Elected + case not proceeded - before trial transfer (original solicitor)","code":"ST4TS0T4"},{"id":40,"name":"Elected + case not proceeded - before trial transfer (new solicitor)","code":"ST4TS0T5"},{"id":41,"name":"Elected + case not proceeded - transfer before retrial (original solicitor)","code":"ST4TS0T6"},{"id":42,"name":"Elected + case not proceeded - transfer before retrial (new solicitor)","code":"ST4TS0T7"},{"id":43,"name":"Interim + payment - effective PCMH","code":"ST1TS0T0"},{"id":44,"name":"Interim payment + - trial start","code":"ST1TS1T0"},{"id":45,"name":"Interim payment - retrial + (new solicitor)","code":"ST1TS2T0"},{"id":46,"name":"Interim payment - retrial + start","code":"ST1TS3T0"},{"id":48,"name":"Warrant issued - trial (before + plea hearing)","code":null},{"id":49,"name":"Warrant issued - trial (after + plea hearing)","code":null},{"id":50,"name":"Warrant issued - trial (after + trial start)","code":null},{"id":51,"name":"Warrant issued - appeal against + conviction","code":null},{"id":52,"name":"Warrant issued - appeal against + sentence","code":null},{"id":53,"name":"Warrant issued - committal for sentence","code":null},{"id":54,"name":"Warrant + issued - breach of crown court order","code":null},{"id":55,"name":"Warrant + issued - retrial (after plea hearing)","code":null},{"id":56,"name":"Warrant + issued - retrial (after trial start)","code":null}]}' + recorded_at: Thu, 29 Aug 2024 15:08:21 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/prices/?fee_type_code=LIT_FEE&limit_from=0&offence_class=H&scenario=5 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:21 GMT + Content-Type: + - application/json + Content-Length: + - '298' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":58843,"scenario":5,"advocate_type":null,"fee_type":54,"offence_class":"H","scheme":2,"unit":"DAY","london_rates_apply":null,"fee_per_unit":"0.00000","fixed_fee":"349.47000","limit_from":0,"limit_to":null,"modifiers":[],"strict_range":false}]}' + recorded_at: Thu, 29 Aug 2024 15:08:21 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/?case_date=2016-04-01&main_hearing_date&type=LGFS + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:22 GMT + Content-Type: + - application/json + Content-Length: + - '198' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":2,"start_date":"2016-04-01","end_date":"2022-09-29","earliest_main_hearing_date":null,"type":"LGFS","description":"LGFS + Fee Scheme 2016-04"}]}' + recorded_at: Thu, 29 Aug 2024 15:08:22 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/scenarios/ + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:22 GMT + Content-Type: + - application/json + Content-Length: + - '4119' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":51,"next":null,"previous":null,"results":[{"id":1,"name":"Discontinuance","code":"ST1TS0T1"},{"id":2,"name":"Guilty + plea","code":"ST1TS0T2"},{"id":3,"name":"Cracked trial","code":"ST1TS0T3"},{"id":4,"name":"Trial","code":"ST1TS0T4"},{"id":5,"name":"Appeal + against conviction","code":"ST1TS0T5"},{"id":6,"name":"Appeal against sentence","code":"ST1TS0T6"},{"id":7,"name":"Committal + for sentence","code":"ST1TS0T7"},{"id":8,"name":"Contempt","code":"ST1TS0T8"},{"id":9,"name":"Breach + of crown court order","code":"ST3TS3TB"},{"id":10,"name":"Cracked before retrial","code":"ST1TS0T9"},{"id":11,"name":"Retrial","code":"ST1TS0TA"},{"id":12,"name":"Elected + case not proceeded","code":"ST4TS0T1"},{"id":17,"name":"Up to and including + PCMH transfer (original solicitor) - cracked trial","code":"ST2TS1T0"},{"id":18,"name":"Up + to and including PCMH transfer (new solicitor) - guilty plea","code":"ST3TS1T2"},{"id":19,"name":"Up + to and including PCMH transfer (new solicitor) - cracked trial","code":"ST3TS1T3"},{"id":20,"name":"Up + to and including PCMH transfer (new solicitor) - trial","code":"ST3TS1T4"},{"id":21,"name":"Before + trial transfer (original solicitor) - cracked trial","code":"ST2TS2T0"},{"id":22,"name":"Before + trial transfer (new solicitor) - cracked trial","code":"ST3TS2T3"},{"id":23,"name":"Before + trial transfer (new solicitor) - trial","code":"ST3TS2T4"},{"id":24,"name":"During + trial transfer (original solicitor) - trial","code":"ST2TS3T0"},{"id":25,"name":"During + trial transfer (new solicitor) - trial","code":"ST3TS3T4"},{"id":26,"name":"During + trial transfer (new solicitor) - retrial","code":"ST3TS3TA"},{"id":27,"name":"Transfer + before retrial (original solicitor) - retrial","code":"ST2TS4T0"},{"id":28,"name":"Transfer + before retrial (new solicitor) - cracked retrial","code":"ST3TS4T9"},{"id":29,"name":"Transfer + before retrial (new solicitor) - retrial","code":"ST3TS4TA"},{"id":30,"name":"Transfer + during retrial (original solicitor) - retrial","code":"ST2TS5T0"},{"id":31,"name":"Transfer + during retrial (new solicitor) - retrial","code":"ST3TS5TA"},{"id":32,"name":"Hearing + subsequent to sentence","code":"ST1TS0TC"},{"id":33,"name":"Transfer after + retrial and before sentencing (original)","code":"ST2TS6TA"},{"id":34,"name":"Transfer + after retrial and before sentencing (new)","code":"ST3TS6TA"},{"id":35,"name":"Transfer + after trial and before sentencing (original)","code":"ST2TS7T4"},{"id":36,"name":"Transfer + after trial and before sentencing (new)","code":"ST3TS7T4"},{"id":37,"name":"Elected + case not proceeded - up to and including PCMH (original solicitor)","code":"ST4TS0T2"},{"id":38,"name":"Elected + case not proceeded - up to and including PCMH (new solicitor)","code":"ST4TS0T3"},{"id":39,"name":"Elected + case not proceeded - before trial transfer (original solicitor)","code":"ST4TS0T4"},{"id":40,"name":"Elected + case not proceeded - before trial transfer (new solicitor)","code":"ST4TS0T5"},{"id":41,"name":"Elected + case not proceeded - transfer before retrial (original solicitor)","code":"ST4TS0T6"},{"id":42,"name":"Elected + case not proceeded - transfer before retrial (new solicitor)","code":"ST4TS0T7"},{"id":43,"name":"Interim + payment - effective PCMH","code":"ST1TS0T0"},{"id":44,"name":"Interim payment + - trial start","code":"ST1TS1T0"},{"id":45,"name":"Interim payment - retrial + (new solicitor)","code":"ST1TS2T0"},{"id":46,"name":"Interim payment - retrial + start","code":"ST1TS3T0"},{"id":48,"name":"Warrant issued - trial (before + plea hearing)","code":null},{"id":49,"name":"Warrant issued - trial (after + plea hearing)","code":null},{"id":50,"name":"Warrant issued - trial (after + trial start)","code":null},{"id":51,"name":"Warrant issued - appeal against + conviction","code":null},{"id":52,"name":"Warrant issued - appeal against + sentence","code":null},{"id":53,"name":"Warrant issued - committal for sentence","code":null},{"id":54,"name":"Warrant + issued - breach of crown court order","code":null},{"id":55,"name":"Warrant + issued - retrial (after plea hearing)","code":null},{"id":56,"name":"Warrant + issued - retrial (after trial start)","code":null}]}' + recorded_at: Thu, 29 Aug 2024 15:08:22 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/prices/?fee_type_code=LIT_FEE&limit_from=0&offence_class=H&scenario=5 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:22 GMT + Content-Type: + - application/json + Content-Length: + - '298' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":58843,"scenario":5,"advocate_type":null,"fee_type":54,"offence_class":"H","scheme":2,"unit":"DAY","london_rates_apply":null,"fee_per_unit":"0.00000","fixed_fee":"349.47000","limit_from":0,"limit_to":null,"modifiers":[],"strict_range":false}]}' + recorded_at: Thu, 29 Aug 2024 15:08:22 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/?case_date=2016-04-01&main_hearing_date&type=LGFS + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:24 GMT + Content-Type: + - application/json + Content-Length: + - '198' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":2,"start_date":"2016-04-01","end_date":"2022-09-29","earliest_main_hearing_date":null,"type":"LGFS","description":"LGFS + Fee Scheme 2016-04"}]}' + recorded_at: Thu, 29 Aug 2024 15:08:24 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/?case_date=2016-04-01&main_hearing_date&type=LGFS + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:24 GMT + Content-Type: + - application/json + Content-Length: + - '198' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":2,"start_date":"2016-04-01","end_date":"2022-09-29","earliest_main_hearing_date":null,"type":"LGFS","description":"LGFS + Fee Scheme 2016-04"}]}' + recorded_at: Thu, 29 Aug 2024 15:08:24 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/scenarios/ + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:24 GMT + Content-Type: + - application/json + Content-Length: + - '4119' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":51,"next":null,"previous":null,"results":[{"id":1,"name":"Discontinuance","code":"ST1TS0T1"},{"id":2,"name":"Guilty + plea","code":"ST1TS0T2"},{"id":3,"name":"Cracked trial","code":"ST1TS0T3"},{"id":4,"name":"Trial","code":"ST1TS0T4"},{"id":5,"name":"Appeal + against conviction","code":"ST1TS0T5"},{"id":6,"name":"Appeal against sentence","code":"ST1TS0T6"},{"id":7,"name":"Committal + for sentence","code":"ST1TS0T7"},{"id":8,"name":"Contempt","code":"ST1TS0T8"},{"id":9,"name":"Breach + of crown court order","code":"ST3TS3TB"},{"id":10,"name":"Cracked before retrial","code":"ST1TS0T9"},{"id":11,"name":"Retrial","code":"ST1TS0TA"},{"id":12,"name":"Elected + case not proceeded","code":"ST4TS0T1"},{"id":17,"name":"Up to and including + PCMH transfer (original solicitor) - cracked trial","code":"ST2TS1T0"},{"id":18,"name":"Up + to and including PCMH transfer (new solicitor) - guilty plea","code":"ST3TS1T2"},{"id":19,"name":"Up + to and including PCMH transfer (new solicitor) - cracked trial","code":"ST3TS1T3"},{"id":20,"name":"Up + to and including PCMH transfer (new solicitor) - trial","code":"ST3TS1T4"},{"id":21,"name":"Before + trial transfer (original solicitor) - cracked trial","code":"ST2TS2T0"},{"id":22,"name":"Before + trial transfer (new solicitor) - cracked trial","code":"ST3TS2T3"},{"id":23,"name":"Before + trial transfer (new solicitor) - trial","code":"ST3TS2T4"},{"id":24,"name":"During + trial transfer (original solicitor) - trial","code":"ST2TS3T0"},{"id":25,"name":"During + trial transfer (new solicitor) - trial","code":"ST3TS3T4"},{"id":26,"name":"During + trial transfer (new solicitor) - retrial","code":"ST3TS3TA"},{"id":27,"name":"Transfer + before retrial (original solicitor) - retrial","code":"ST2TS4T0"},{"id":28,"name":"Transfer + before retrial (new solicitor) - cracked retrial","code":"ST3TS4T9"},{"id":29,"name":"Transfer + before retrial (new solicitor) - retrial","code":"ST3TS4TA"},{"id":30,"name":"Transfer + during retrial (original solicitor) - retrial","code":"ST2TS5T0"},{"id":31,"name":"Transfer + during retrial (new solicitor) - retrial","code":"ST3TS5TA"},{"id":32,"name":"Hearing + subsequent to sentence","code":"ST1TS0TC"},{"id":33,"name":"Transfer after + retrial and before sentencing (original)","code":"ST2TS6TA"},{"id":34,"name":"Transfer + after retrial and before sentencing (new)","code":"ST3TS6TA"},{"id":35,"name":"Transfer + after trial and before sentencing (original)","code":"ST2TS7T4"},{"id":36,"name":"Transfer + after trial and before sentencing (new)","code":"ST3TS7T4"},{"id":37,"name":"Elected + case not proceeded - up to and including PCMH (original solicitor)","code":"ST4TS0T2"},{"id":38,"name":"Elected + case not proceeded - up to and including PCMH (new solicitor)","code":"ST4TS0T3"},{"id":39,"name":"Elected + case not proceeded - before trial transfer (original solicitor)","code":"ST4TS0T4"},{"id":40,"name":"Elected + case not proceeded - before trial transfer (new solicitor)","code":"ST4TS0T5"},{"id":41,"name":"Elected + case not proceeded - transfer before retrial (original solicitor)","code":"ST4TS0T6"},{"id":42,"name":"Elected + case not proceeded - transfer before retrial (new solicitor)","code":"ST4TS0T7"},{"id":43,"name":"Interim + payment - effective PCMH","code":"ST1TS0T0"},{"id":44,"name":"Interim payment + - trial start","code":"ST1TS1T0"},{"id":45,"name":"Interim payment - retrial + (new solicitor)","code":"ST1TS2T0"},{"id":46,"name":"Interim payment - retrial + start","code":"ST1TS3T0"},{"id":48,"name":"Warrant issued - trial (before + plea hearing)","code":null},{"id":49,"name":"Warrant issued - trial (after + plea hearing)","code":null},{"id":50,"name":"Warrant issued - trial (after + trial start)","code":null},{"id":51,"name":"Warrant issued - appeal against + conviction","code":null},{"id":52,"name":"Warrant issued - appeal against + sentence","code":null},{"id":53,"name":"Warrant issued - committal for sentence","code":null},{"id":54,"name":"Warrant + issued - breach of crown court order","code":null},{"id":55,"name":"Warrant + issued - retrial (after plea hearing)","code":null},{"id":56,"name":"Warrant + issued - retrial (after trial start)","code":null}]}' + recorded_at: Thu, 29 Aug 2024 15:08:24 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/scenarios/ + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:25 GMT + Content-Type: + - application/json + Content-Length: + - '4119' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":51,"next":null,"previous":null,"results":[{"id":1,"name":"Discontinuance","code":"ST1TS0T1"},{"id":2,"name":"Guilty + plea","code":"ST1TS0T2"},{"id":3,"name":"Cracked trial","code":"ST1TS0T3"},{"id":4,"name":"Trial","code":"ST1TS0T4"},{"id":5,"name":"Appeal + against conviction","code":"ST1TS0T5"},{"id":6,"name":"Appeal against sentence","code":"ST1TS0T6"},{"id":7,"name":"Committal + for sentence","code":"ST1TS0T7"},{"id":8,"name":"Contempt","code":"ST1TS0T8"},{"id":9,"name":"Breach + of crown court order","code":"ST3TS3TB"},{"id":10,"name":"Cracked before retrial","code":"ST1TS0T9"},{"id":11,"name":"Retrial","code":"ST1TS0TA"},{"id":12,"name":"Elected + case not proceeded","code":"ST4TS0T1"},{"id":17,"name":"Up to and including + PCMH transfer (original solicitor) - cracked trial","code":"ST2TS1T0"},{"id":18,"name":"Up + to and including PCMH transfer (new solicitor) - guilty plea","code":"ST3TS1T2"},{"id":19,"name":"Up + to and including PCMH transfer (new solicitor) - cracked trial","code":"ST3TS1T3"},{"id":20,"name":"Up + to and including PCMH transfer (new solicitor) - trial","code":"ST3TS1T4"},{"id":21,"name":"Before + trial transfer (original solicitor) - cracked trial","code":"ST2TS2T0"},{"id":22,"name":"Before + trial transfer (new solicitor) - cracked trial","code":"ST3TS2T3"},{"id":23,"name":"Before + trial transfer (new solicitor) - trial","code":"ST3TS2T4"},{"id":24,"name":"During + trial transfer (original solicitor) - trial","code":"ST2TS3T0"},{"id":25,"name":"During + trial transfer (new solicitor) - trial","code":"ST3TS3T4"},{"id":26,"name":"During + trial transfer (new solicitor) - retrial","code":"ST3TS3TA"},{"id":27,"name":"Transfer + before retrial (original solicitor) - retrial","code":"ST2TS4T0"},{"id":28,"name":"Transfer + before retrial (new solicitor) - cracked retrial","code":"ST3TS4T9"},{"id":29,"name":"Transfer + before retrial (new solicitor) - retrial","code":"ST3TS4TA"},{"id":30,"name":"Transfer + during retrial (original solicitor) - retrial","code":"ST2TS5T0"},{"id":31,"name":"Transfer + during retrial (new solicitor) - retrial","code":"ST3TS5TA"},{"id":32,"name":"Hearing + subsequent to sentence","code":"ST1TS0TC"},{"id":33,"name":"Transfer after + retrial and before sentencing (original)","code":"ST2TS6TA"},{"id":34,"name":"Transfer + after retrial and before sentencing (new)","code":"ST3TS6TA"},{"id":35,"name":"Transfer + after trial and before sentencing (original)","code":"ST2TS7T4"},{"id":36,"name":"Transfer + after trial and before sentencing (new)","code":"ST3TS7T4"},{"id":37,"name":"Elected + case not proceeded - up to and including PCMH (original solicitor)","code":"ST4TS0T2"},{"id":38,"name":"Elected + case not proceeded - up to and including PCMH (new solicitor)","code":"ST4TS0T3"},{"id":39,"name":"Elected + case not proceeded - before trial transfer (original solicitor)","code":"ST4TS0T4"},{"id":40,"name":"Elected + case not proceeded - before trial transfer (new solicitor)","code":"ST4TS0T5"},{"id":41,"name":"Elected + case not proceeded - transfer before retrial (original solicitor)","code":"ST4TS0T6"},{"id":42,"name":"Elected + case not proceeded - transfer before retrial (new solicitor)","code":"ST4TS0T7"},{"id":43,"name":"Interim + payment - effective PCMH","code":"ST1TS0T0"},{"id":44,"name":"Interim payment + - trial start","code":"ST1TS1T0"},{"id":45,"name":"Interim payment - retrial + (new solicitor)","code":"ST1TS2T0"},{"id":46,"name":"Interim payment - retrial + start","code":"ST1TS3T0"},{"id":48,"name":"Warrant issued - trial (before + plea hearing)","code":null},{"id":49,"name":"Warrant issued - trial (after + plea hearing)","code":null},{"id":50,"name":"Warrant issued - trial (after + trial start)","code":null},{"id":51,"name":"Warrant issued - appeal against + conviction","code":null},{"id":52,"name":"Warrant issued - appeal against + sentence","code":null},{"id":53,"name":"Warrant issued - committal for sentence","code":null},{"id":54,"name":"Warrant + issued - breach of crown court order","code":null},{"id":55,"name":"Warrant + issued - retrial (after plea hearing)","code":null},{"id":56,"name":"Warrant + issued - retrial (after trial start)","code":null}]}' + recorded_at: Thu, 29 Aug 2024 15:08:24 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/prices/?fee_type_code=AGFS_SPCL_PREP&limit_from=0&london_rates_apply=true&offence_class=H&scenario=5 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:25 GMT + Content-Type: + - application/json + Content-Length: + - '300' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":265657,"scenario":5,"advocate_type":null,"fee_type":29,"offence_class":null,"scheme":2,"unit":"HOUR","london_rates_apply":true,"fee_per_unit":"43.12000","fixed_fee":"0.00000","limit_from":0,"limit_to":null,"modifiers":[],"strict_range":false}]}' + recorded_at: Thu, 29 Aug 2024 15:08:25 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/prices/?fee_type_code=AGFS_SPCL_PREP&limit_from=0&london_rates_apply=true&offence_class=H&scenario=5 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:25 GMT + Content-Type: + - application/json + Content-Length: + - '300' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":265657,"scenario":5,"advocate_type":null,"fee_type":29,"offence_class":null,"scheme":2,"unit":"HOUR","london_rates_apply":true,"fee_per_unit":"43.12000","fixed_fee":"0.00000","limit_from":0,"limit_to":null,"modifiers":[],"strict_range":false}]}' + recorded_at: Thu, 29 Aug 2024 15:08:25 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/?case_date=2016-04-01&main_hearing_date&type=LGFS + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:25 GMT + Content-Type: + - application/json + Content-Length: + - '198' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":2,"start_date":"2016-04-01","end_date":"2022-09-29","earliest_main_hearing_date":null,"type":"LGFS","description":"LGFS + Fee Scheme 2016-04"}]}' + recorded_at: Thu, 29 Aug 2024 15:08:25 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/?case_date=2016-04-01&main_hearing_date&type=LGFS + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:25 GMT + Content-Type: + - application/json + Content-Length: + - '198' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":2,"start_date":"2016-04-01","end_date":"2022-09-29","earliest_main_hearing_date":null,"type":"LGFS","description":"LGFS + Fee Scheme 2016-04"}]}' + recorded_at: Thu, 29 Aug 2024 15:08:25 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/scenarios/ + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:26 GMT + Content-Type: + - application/json + Content-Length: + - '4119' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":51,"next":null,"previous":null,"results":[{"id":1,"name":"Discontinuance","code":"ST1TS0T1"},{"id":2,"name":"Guilty + plea","code":"ST1TS0T2"},{"id":3,"name":"Cracked trial","code":"ST1TS0T3"},{"id":4,"name":"Trial","code":"ST1TS0T4"},{"id":5,"name":"Appeal + against conviction","code":"ST1TS0T5"},{"id":6,"name":"Appeal against sentence","code":"ST1TS0T6"},{"id":7,"name":"Committal + for sentence","code":"ST1TS0T7"},{"id":8,"name":"Contempt","code":"ST1TS0T8"},{"id":9,"name":"Breach + of crown court order","code":"ST3TS3TB"},{"id":10,"name":"Cracked before retrial","code":"ST1TS0T9"},{"id":11,"name":"Retrial","code":"ST1TS0TA"},{"id":12,"name":"Elected + case not proceeded","code":"ST4TS0T1"},{"id":17,"name":"Up to and including + PCMH transfer (original solicitor) - cracked trial","code":"ST2TS1T0"},{"id":18,"name":"Up + to and including PCMH transfer (new solicitor) - guilty plea","code":"ST3TS1T2"},{"id":19,"name":"Up + to and including PCMH transfer (new solicitor) - cracked trial","code":"ST3TS1T3"},{"id":20,"name":"Up + to and including PCMH transfer (new solicitor) - trial","code":"ST3TS1T4"},{"id":21,"name":"Before + trial transfer (original solicitor) - cracked trial","code":"ST2TS2T0"},{"id":22,"name":"Before + trial transfer (new solicitor) - cracked trial","code":"ST3TS2T3"},{"id":23,"name":"Before + trial transfer (new solicitor) - trial","code":"ST3TS2T4"},{"id":24,"name":"During + trial transfer (original solicitor) - trial","code":"ST2TS3T0"},{"id":25,"name":"During + trial transfer (new solicitor) - trial","code":"ST3TS3T4"},{"id":26,"name":"During + trial transfer (new solicitor) - retrial","code":"ST3TS3TA"},{"id":27,"name":"Transfer + before retrial (original solicitor) - retrial","code":"ST2TS4T0"},{"id":28,"name":"Transfer + before retrial (new solicitor) - cracked retrial","code":"ST3TS4T9"},{"id":29,"name":"Transfer + before retrial (new solicitor) - retrial","code":"ST3TS4TA"},{"id":30,"name":"Transfer + during retrial (original solicitor) - retrial","code":"ST2TS5T0"},{"id":31,"name":"Transfer + during retrial (new solicitor) - retrial","code":"ST3TS5TA"},{"id":32,"name":"Hearing + subsequent to sentence","code":"ST1TS0TC"},{"id":33,"name":"Transfer after + retrial and before sentencing (original)","code":"ST2TS6TA"},{"id":34,"name":"Transfer + after retrial and before sentencing (new)","code":"ST3TS6TA"},{"id":35,"name":"Transfer + after trial and before sentencing (original)","code":"ST2TS7T4"},{"id":36,"name":"Transfer + after trial and before sentencing (new)","code":"ST3TS7T4"},{"id":37,"name":"Elected + case not proceeded - up to and including PCMH (original solicitor)","code":"ST4TS0T2"},{"id":38,"name":"Elected + case not proceeded - up to and including PCMH (new solicitor)","code":"ST4TS0T3"},{"id":39,"name":"Elected + case not proceeded - before trial transfer (original solicitor)","code":"ST4TS0T4"},{"id":40,"name":"Elected + case not proceeded - before trial transfer (new solicitor)","code":"ST4TS0T5"},{"id":41,"name":"Elected + case not proceeded - transfer before retrial (original solicitor)","code":"ST4TS0T6"},{"id":42,"name":"Elected + case not proceeded - transfer before retrial (new solicitor)","code":"ST4TS0T7"},{"id":43,"name":"Interim + payment - effective PCMH","code":"ST1TS0T0"},{"id":44,"name":"Interim payment + - trial start","code":"ST1TS1T0"},{"id":45,"name":"Interim payment - retrial + (new solicitor)","code":"ST1TS2T0"},{"id":46,"name":"Interim payment - retrial + start","code":"ST1TS3T0"},{"id":48,"name":"Warrant issued - trial (before + plea hearing)","code":null},{"id":49,"name":"Warrant issued - trial (after + plea hearing)","code":null},{"id":50,"name":"Warrant issued - trial (after + trial start)","code":null},{"id":51,"name":"Warrant issued - appeal against + conviction","code":null},{"id":52,"name":"Warrant issued - appeal against + sentence","code":null},{"id":53,"name":"Warrant issued - committal for sentence","code":null},{"id":54,"name":"Warrant + issued - breach of crown court order","code":null},{"id":55,"name":"Warrant + issued - retrial (after plea hearing)","code":null},{"id":56,"name":"Warrant + issued - retrial (after trial start)","code":null}]}' + recorded_at: Thu, 29 Aug 2024 15:08:26 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/scenarios/ + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:26 GMT + Content-Type: + - application/json + Content-Length: + - '4119' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":51,"next":null,"previous":null,"results":[{"id":1,"name":"Discontinuance","code":"ST1TS0T1"},{"id":2,"name":"Guilty + plea","code":"ST1TS0T2"},{"id":3,"name":"Cracked trial","code":"ST1TS0T3"},{"id":4,"name":"Trial","code":"ST1TS0T4"},{"id":5,"name":"Appeal + against conviction","code":"ST1TS0T5"},{"id":6,"name":"Appeal against sentence","code":"ST1TS0T6"},{"id":7,"name":"Committal + for sentence","code":"ST1TS0T7"},{"id":8,"name":"Contempt","code":"ST1TS0T8"},{"id":9,"name":"Breach + of crown court order","code":"ST3TS3TB"},{"id":10,"name":"Cracked before retrial","code":"ST1TS0T9"},{"id":11,"name":"Retrial","code":"ST1TS0TA"},{"id":12,"name":"Elected + case not proceeded","code":"ST4TS0T1"},{"id":17,"name":"Up to and including + PCMH transfer (original solicitor) - cracked trial","code":"ST2TS1T0"},{"id":18,"name":"Up + to and including PCMH transfer (new solicitor) - guilty plea","code":"ST3TS1T2"},{"id":19,"name":"Up + to and including PCMH transfer (new solicitor) - cracked trial","code":"ST3TS1T3"},{"id":20,"name":"Up + to and including PCMH transfer (new solicitor) - trial","code":"ST3TS1T4"},{"id":21,"name":"Before + trial transfer (original solicitor) - cracked trial","code":"ST2TS2T0"},{"id":22,"name":"Before + trial transfer (new solicitor) - cracked trial","code":"ST3TS2T3"},{"id":23,"name":"Before + trial transfer (new solicitor) - trial","code":"ST3TS2T4"},{"id":24,"name":"During + trial transfer (original solicitor) - trial","code":"ST2TS3T0"},{"id":25,"name":"During + trial transfer (new solicitor) - trial","code":"ST3TS3T4"},{"id":26,"name":"During + trial transfer (new solicitor) - retrial","code":"ST3TS3TA"},{"id":27,"name":"Transfer + before retrial (original solicitor) - retrial","code":"ST2TS4T0"},{"id":28,"name":"Transfer + before retrial (new solicitor) - cracked retrial","code":"ST3TS4T9"},{"id":29,"name":"Transfer + before retrial (new solicitor) - retrial","code":"ST3TS4TA"},{"id":30,"name":"Transfer + during retrial (original solicitor) - retrial","code":"ST2TS5T0"},{"id":31,"name":"Transfer + during retrial (new solicitor) - retrial","code":"ST3TS5TA"},{"id":32,"name":"Hearing + subsequent to sentence","code":"ST1TS0TC"},{"id":33,"name":"Transfer after + retrial and before sentencing (original)","code":"ST2TS6TA"},{"id":34,"name":"Transfer + after retrial and before sentencing (new)","code":"ST3TS6TA"},{"id":35,"name":"Transfer + after trial and before sentencing (original)","code":"ST2TS7T4"},{"id":36,"name":"Transfer + after trial and before sentencing (new)","code":"ST3TS7T4"},{"id":37,"name":"Elected + case not proceeded - up to and including PCMH (original solicitor)","code":"ST4TS0T2"},{"id":38,"name":"Elected + case not proceeded - up to and including PCMH (new solicitor)","code":"ST4TS0T3"},{"id":39,"name":"Elected + case not proceeded - before trial transfer (original solicitor)","code":"ST4TS0T4"},{"id":40,"name":"Elected + case not proceeded - before trial transfer (new solicitor)","code":"ST4TS0T5"},{"id":41,"name":"Elected + case not proceeded - transfer before retrial (original solicitor)","code":"ST4TS0T6"},{"id":42,"name":"Elected + case not proceeded - transfer before retrial (new solicitor)","code":"ST4TS0T7"},{"id":43,"name":"Interim + payment - effective PCMH","code":"ST1TS0T0"},{"id":44,"name":"Interim payment + - trial start","code":"ST1TS1T0"},{"id":45,"name":"Interim payment - retrial + (new solicitor)","code":"ST1TS2T0"},{"id":46,"name":"Interim payment - retrial + start","code":"ST1TS3T0"},{"id":48,"name":"Warrant issued - trial (before + plea hearing)","code":null},{"id":49,"name":"Warrant issued - trial (after + plea hearing)","code":null},{"id":50,"name":"Warrant issued - trial (after + trial start)","code":null},{"id":51,"name":"Warrant issued - appeal against + conviction","code":null},{"id":52,"name":"Warrant issued - appeal against + sentence","code":null},{"id":53,"name":"Warrant issued - committal for sentence","code":null},{"id":54,"name":"Warrant + issued - breach of crown court order","code":null},{"id":55,"name":"Warrant + issued - retrial (after plea hearing)","code":null},{"id":56,"name":"Warrant + issued - retrial (after trial start)","code":null}]}' + recorded_at: Thu, 29 Aug 2024 15:08:26 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/prices/?fee_type_code=AGFS_SPCL_PREP&limit_from=0&london_rates_apply=true&offence_class=H&scenario=5 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:26 GMT + Content-Type: + - application/json + Content-Length: + - '300' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":265657,"scenario":5,"advocate_type":null,"fee_type":29,"offence_class":null,"scheme":2,"unit":"HOUR","london_rates_apply":true,"fee_per_unit":"43.12000","fixed_fee":"0.00000","limit_from":0,"limit_to":null,"modifiers":[],"strict_range":false}]}' + recorded_at: Thu, 29 Aug 2024 15:08:26 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/prices/?fee_type_code=AGFS_SPCL_PREP&limit_from=0&london_rates_apply=true&offence_class=H&scenario=5 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 15:08:26 GMT + Content-Type: + - application/json + Content-Length: + - '300' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":265657,"scenario":5,"advocate_type":null,"fee_type":29,"offence_class":null,"scheme":2,"unit":"HOUR","london_rates_apply":true,"fee_per_unit":"43.12000","fixed_fee":"0.00000","limit_from":0,"limit_to":null,"modifiers":[],"strict_range":false}]}' + recorded_at: Thu, 29 Aug 2024 15:08:26 GMT +recorded_with: VCR 6.2.0 diff --git a/vcr/cassettes/features/fee_calculator/litigator/misc_fee_calculator_nonlondon.yml b/vcr/cassettes/features/fee_calculator/litigator/misc_fee_calculator_nonlondon.yml new file mode 100644 index 0000000000..a2b263c6d3 --- /dev/null +++ b/vcr/cassettes/features/fee_calculator/litigator/misc_fee_calculator_nonlondon.yml @@ -0,0 +1,913 @@ +--- +http_interactions: +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/?case_date=2016-04-01&main_hearing_date&type=LGFS + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 16:33:08 GMT + Content-Type: + - application/json + Content-Length: + - '198' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":2,"start_date":"2016-04-01","end_date":"2022-09-29","earliest_main_hearing_date":null,"type":"LGFS","description":"LGFS + Fee Scheme 2016-04"}]}' + recorded_at: Thu, 29 Aug 2024 16:33:08 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/scenarios/ + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 16:33:08 GMT + Content-Type: + - application/json + Content-Length: + - '4119' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":51,"next":null,"previous":null,"results":[{"id":1,"name":"Discontinuance","code":"ST1TS0T1"},{"id":2,"name":"Guilty + plea","code":"ST1TS0T2"},{"id":3,"name":"Cracked trial","code":"ST1TS0T3"},{"id":4,"name":"Trial","code":"ST1TS0T4"},{"id":5,"name":"Appeal + against conviction","code":"ST1TS0T5"},{"id":6,"name":"Appeal against sentence","code":"ST1TS0T6"},{"id":7,"name":"Committal + for sentence","code":"ST1TS0T7"},{"id":8,"name":"Contempt","code":"ST1TS0T8"},{"id":9,"name":"Breach + of crown court order","code":"ST3TS3TB"},{"id":10,"name":"Cracked before retrial","code":"ST1TS0T9"},{"id":11,"name":"Retrial","code":"ST1TS0TA"},{"id":12,"name":"Elected + case not proceeded","code":"ST4TS0T1"},{"id":17,"name":"Up to and including + PCMH transfer (original solicitor) - cracked trial","code":"ST2TS1T0"},{"id":18,"name":"Up + to and including PCMH transfer (new solicitor) - guilty plea","code":"ST3TS1T2"},{"id":19,"name":"Up + to and including PCMH transfer (new solicitor) - cracked trial","code":"ST3TS1T3"},{"id":20,"name":"Up + to and including PCMH transfer (new solicitor) - trial","code":"ST3TS1T4"},{"id":21,"name":"Before + trial transfer (original solicitor) - cracked trial","code":"ST2TS2T0"},{"id":22,"name":"Before + trial transfer (new solicitor) - cracked trial","code":"ST3TS2T3"},{"id":23,"name":"Before + trial transfer (new solicitor) - trial","code":"ST3TS2T4"},{"id":24,"name":"During + trial transfer (original solicitor) - trial","code":"ST2TS3T0"},{"id":25,"name":"During + trial transfer (new solicitor) - trial","code":"ST3TS3T4"},{"id":26,"name":"During + trial transfer (new solicitor) - retrial","code":"ST3TS3TA"},{"id":27,"name":"Transfer + before retrial (original solicitor) - retrial","code":"ST2TS4T0"},{"id":28,"name":"Transfer + before retrial (new solicitor) - cracked retrial","code":"ST3TS4T9"},{"id":29,"name":"Transfer + before retrial (new solicitor) - retrial","code":"ST3TS4TA"},{"id":30,"name":"Transfer + during retrial (original solicitor) - retrial","code":"ST2TS5T0"},{"id":31,"name":"Transfer + during retrial (new solicitor) - retrial","code":"ST3TS5TA"},{"id":32,"name":"Hearing + subsequent to sentence","code":"ST1TS0TC"},{"id":33,"name":"Transfer after + retrial and before sentencing (original)","code":"ST2TS6TA"},{"id":34,"name":"Transfer + after retrial and before sentencing (new)","code":"ST3TS6TA"},{"id":35,"name":"Transfer + after trial and before sentencing (original)","code":"ST2TS7T4"},{"id":36,"name":"Transfer + after trial and before sentencing (new)","code":"ST3TS7T4"},{"id":37,"name":"Elected + case not proceeded - up to and including PCMH (original solicitor)","code":"ST4TS0T2"},{"id":38,"name":"Elected + case not proceeded - up to and including PCMH (new solicitor)","code":"ST4TS0T3"},{"id":39,"name":"Elected + case not proceeded - before trial transfer (original solicitor)","code":"ST4TS0T4"},{"id":40,"name":"Elected + case not proceeded - before trial transfer (new solicitor)","code":"ST4TS0T5"},{"id":41,"name":"Elected + case not proceeded - transfer before retrial (original solicitor)","code":"ST4TS0T6"},{"id":42,"name":"Elected + case not proceeded - transfer before retrial (new solicitor)","code":"ST4TS0T7"},{"id":43,"name":"Interim + payment - effective PCMH","code":"ST1TS0T0"},{"id":44,"name":"Interim payment + - trial start","code":"ST1TS1T0"},{"id":45,"name":"Interim payment - retrial + (new solicitor)","code":"ST1TS2T0"},{"id":46,"name":"Interim payment - retrial + start","code":"ST1TS3T0"},{"id":48,"name":"Warrant issued - trial (before + plea hearing)","code":null},{"id":49,"name":"Warrant issued - trial (after + plea hearing)","code":null},{"id":50,"name":"Warrant issued - trial (after + trial start)","code":null},{"id":51,"name":"Warrant issued - appeal against + conviction","code":null},{"id":52,"name":"Warrant issued - appeal against + sentence","code":null},{"id":53,"name":"Warrant issued - committal for sentence","code":null},{"id":54,"name":"Warrant + issued - breach of crown court order","code":null},{"id":55,"name":"Warrant + issued - retrial (after plea hearing)","code":null},{"id":56,"name":"Warrant + issued - retrial (after trial start)","code":null}]}' + recorded_at: Thu, 29 Aug 2024 16:33:08 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/prices/?fee_type_code=LIT_FEE&limit_from=0&offence_class=H&scenario=5 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 16:33:09 GMT + Content-Type: + - application/json + Content-Length: + - '298' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":58843,"scenario":5,"advocate_type":null,"fee_type":54,"offence_class":"H","scheme":2,"unit":"DAY","london_rates_apply":null,"fee_per_unit":"0.00000","fixed_fee":"349.47000","limit_from":0,"limit_to":null,"modifiers":[],"strict_range":false}]}' + recorded_at: Thu, 29 Aug 2024 16:33:08 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/?case_date=2016-04-01&main_hearing_date&type=LGFS + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 16:33:11 GMT + Content-Type: + - application/json + Content-Length: + - '198' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":2,"start_date":"2016-04-01","end_date":"2022-09-29","earliest_main_hearing_date":null,"type":"LGFS","description":"LGFS + Fee Scheme 2016-04"}]}' + recorded_at: Thu, 29 Aug 2024 16:33:11 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/?case_date=2016-04-01&main_hearing_date&type=LGFS + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 16:33:11 GMT + Content-Type: + - application/json + Content-Length: + - '198' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":2,"start_date":"2016-04-01","end_date":"2022-09-29","earliest_main_hearing_date":null,"type":"LGFS","description":"LGFS + Fee Scheme 2016-04"}]}' + recorded_at: Thu, 29 Aug 2024 16:33:11 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/scenarios/ + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 16:33:11 GMT + Content-Type: + - application/json + Content-Length: + - '4119' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":51,"next":null,"previous":null,"results":[{"id":1,"name":"Discontinuance","code":"ST1TS0T1"},{"id":2,"name":"Guilty + plea","code":"ST1TS0T2"},{"id":3,"name":"Cracked trial","code":"ST1TS0T3"},{"id":4,"name":"Trial","code":"ST1TS0T4"},{"id":5,"name":"Appeal + against conviction","code":"ST1TS0T5"},{"id":6,"name":"Appeal against sentence","code":"ST1TS0T6"},{"id":7,"name":"Committal + for sentence","code":"ST1TS0T7"},{"id":8,"name":"Contempt","code":"ST1TS0T8"},{"id":9,"name":"Breach + of crown court order","code":"ST3TS3TB"},{"id":10,"name":"Cracked before retrial","code":"ST1TS0T9"},{"id":11,"name":"Retrial","code":"ST1TS0TA"},{"id":12,"name":"Elected + case not proceeded","code":"ST4TS0T1"},{"id":17,"name":"Up to and including + PCMH transfer (original solicitor) - cracked trial","code":"ST2TS1T0"},{"id":18,"name":"Up + to and including PCMH transfer (new solicitor) - guilty plea","code":"ST3TS1T2"},{"id":19,"name":"Up + to and including PCMH transfer (new solicitor) - cracked trial","code":"ST3TS1T3"},{"id":20,"name":"Up + to and including PCMH transfer (new solicitor) - trial","code":"ST3TS1T4"},{"id":21,"name":"Before + trial transfer (original solicitor) - cracked trial","code":"ST2TS2T0"},{"id":22,"name":"Before + trial transfer (new solicitor) - cracked trial","code":"ST3TS2T3"},{"id":23,"name":"Before + trial transfer (new solicitor) - trial","code":"ST3TS2T4"},{"id":24,"name":"During + trial transfer (original solicitor) - trial","code":"ST2TS3T0"},{"id":25,"name":"During + trial transfer (new solicitor) - trial","code":"ST3TS3T4"},{"id":26,"name":"During + trial transfer (new solicitor) - retrial","code":"ST3TS3TA"},{"id":27,"name":"Transfer + before retrial (original solicitor) - retrial","code":"ST2TS4T0"},{"id":28,"name":"Transfer + before retrial (new solicitor) - cracked retrial","code":"ST3TS4T9"},{"id":29,"name":"Transfer + before retrial (new solicitor) - retrial","code":"ST3TS4TA"},{"id":30,"name":"Transfer + during retrial (original solicitor) - retrial","code":"ST2TS5T0"},{"id":31,"name":"Transfer + during retrial (new solicitor) - retrial","code":"ST3TS5TA"},{"id":32,"name":"Hearing + subsequent to sentence","code":"ST1TS0TC"},{"id":33,"name":"Transfer after + retrial and before sentencing (original)","code":"ST2TS6TA"},{"id":34,"name":"Transfer + after retrial and before sentencing (new)","code":"ST3TS6TA"},{"id":35,"name":"Transfer + after trial and before sentencing (original)","code":"ST2TS7T4"},{"id":36,"name":"Transfer + after trial and before sentencing (new)","code":"ST3TS7T4"},{"id":37,"name":"Elected + case not proceeded - up to and including PCMH (original solicitor)","code":"ST4TS0T2"},{"id":38,"name":"Elected + case not proceeded - up to and including PCMH (new solicitor)","code":"ST4TS0T3"},{"id":39,"name":"Elected + case not proceeded - before trial transfer (original solicitor)","code":"ST4TS0T4"},{"id":40,"name":"Elected + case not proceeded - before trial transfer (new solicitor)","code":"ST4TS0T5"},{"id":41,"name":"Elected + case not proceeded - transfer before retrial (original solicitor)","code":"ST4TS0T6"},{"id":42,"name":"Elected + case not proceeded - transfer before retrial (new solicitor)","code":"ST4TS0T7"},{"id":43,"name":"Interim + payment - effective PCMH","code":"ST1TS0T0"},{"id":44,"name":"Interim payment + - trial start","code":"ST1TS1T0"},{"id":45,"name":"Interim payment - retrial + (new solicitor)","code":"ST1TS2T0"},{"id":46,"name":"Interim payment - retrial + start","code":"ST1TS3T0"},{"id":48,"name":"Warrant issued - trial (before + plea hearing)","code":null},{"id":49,"name":"Warrant issued - trial (after + plea hearing)","code":null},{"id":50,"name":"Warrant issued - trial (after + trial start)","code":null},{"id":51,"name":"Warrant issued - appeal against + conviction","code":null},{"id":52,"name":"Warrant issued - appeal against + sentence","code":null},{"id":53,"name":"Warrant issued - committal for sentence","code":null},{"id":54,"name":"Warrant + issued - breach of crown court order","code":null},{"id":55,"name":"Warrant + issued - retrial (after plea hearing)","code":null},{"id":56,"name":"Warrant + issued - retrial (after trial start)","code":null}]}' + recorded_at: Thu, 29 Aug 2024 16:33:11 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/prices/?fee_type_code=AGFS_SPCL_PREP&limit_from=0&london_rates_apply=false&offence_class=H&scenario=5 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 16:33:11 GMT + Content-Type: + - application/json + Content-Length: + - '301' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":265656,"scenario":5,"advocate_type":null,"fee_type":29,"offence_class":null,"scheme":2,"unit":"HOUR","london_rates_apply":false,"fee_per_unit":"41.06000","fixed_fee":"0.00000","limit_from":0,"limit_to":null,"modifiers":[],"strict_range":false}]}' + recorded_at: Thu, 29 Aug 2024 16:33:11 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/scenarios/ + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 16:33:11 GMT + Content-Type: + - application/json + Content-Length: + - '4119' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":51,"next":null,"previous":null,"results":[{"id":1,"name":"Discontinuance","code":"ST1TS0T1"},{"id":2,"name":"Guilty + plea","code":"ST1TS0T2"},{"id":3,"name":"Cracked trial","code":"ST1TS0T3"},{"id":4,"name":"Trial","code":"ST1TS0T4"},{"id":5,"name":"Appeal + against conviction","code":"ST1TS0T5"},{"id":6,"name":"Appeal against sentence","code":"ST1TS0T6"},{"id":7,"name":"Committal + for sentence","code":"ST1TS0T7"},{"id":8,"name":"Contempt","code":"ST1TS0T8"},{"id":9,"name":"Breach + of crown court order","code":"ST3TS3TB"},{"id":10,"name":"Cracked before retrial","code":"ST1TS0T9"},{"id":11,"name":"Retrial","code":"ST1TS0TA"},{"id":12,"name":"Elected + case not proceeded","code":"ST4TS0T1"},{"id":17,"name":"Up to and including + PCMH transfer (original solicitor) - cracked trial","code":"ST2TS1T0"},{"id":18,"name":"Up + to and including PCMH transfer (new solicitor) - guilty plea","code":"ST3TS1T2"},{"id":19,"name":"Up + to and including PCMH transfer (new solicitor) - cracked trial","code":"ST3TS1T3"},{"id":20,"name":"Up + to and including PCMH transfer (new solicitor) - trial","code":"ST3TS1T4"},{"id":21,"name":"Before + trial transfer (original solicitor) - cracked trial","code":"ST2TS2T0"},{"id":22,"name":"Before + trial transfer (new solicitor) - cracked trial","code":"ST3TS2T3"},{"id":23,"name":"Before + trial transfer (new solicitor) - trial","code":"ST3TS2T4"},{"id":24,"name":"During + trial transfer (original solicitor) - trial","code":"ST2TS3T0"},{"id":25,"name":"During + trial transfer (new solicitor) - trial","code":"ST3TS3T4"},{"id":26,"name":"During + trial transfer (new solicitor) - retrial","code":"ST3TS3TA"},{"id":27,"name":"Transfer + before retrial (original solicitor) - retrial","code":"ST2TS4T0"},{"id":28,"name":"Transfer + before retrial (new solicitor) - cracked retrial","code":"ST3TS4T9"},{"id":29,"name":"Transfer + before retrial (new solicitor) - retrial","code":"ST3TS4TA"},{"id":30,"name":"Transfer + during retrial (original solicitor) - retrial","code":"ST2TS5T0"},{"id":31,"name":"Transfer + during retrial (new solicitor) - retrial","code":"ST3TS5TA"},{"id":32,"name":"Hearing + subsequent to sentence","code":"ST1TS0TC"},{"id":33,"name":"Transfer after + retrial and before sentencing (original)","code":"ST2TS6TA"},{"id":34,"name":"Transfer + after retrial and before sentencing (new)","code":"ST3TS6TA"},{"id":35,"name":"Transfer + after trial and before sentencing (original)","code":"ST2TS7T4"},{"id":36,"name":"Transfer + after trial and before sentencing (new)","code":"ST3TS7T4"},{"id":37,"name":"Elected + case not proceeded - up to and including PCMH (original solicitor)","code":"ST4TS0T2"},{"id":38,"name":"Elected + case not proceeded - up to and including PCMH (new solicitor)","code":"ST4TS0T3"},{"id":39,"name":"Elected + case not proceeded - before trial transfer (original solicitor)","code":"ST4TS0T4"},{"id":40,"name":"Elected + case not proceeded - before trial transfer (new solicitor)","code":"ST4TS0T5"},{"id":41,"name":"Elected + case not proceeded - transfer before retrial (original solicitor)","code":"ST4TS0T6"},{"id":42,"name":"Elected + case not proceeded - transfer before retrial (new solicitor)","code":"ST4TS0T7"},{"id":43,"name":"Interim + payment - effective PCMH","code":"ST1TS0T0"},{"id":44,"name":"Interim payment + - trial start","code":"ST1TS1T0"},{"id":45,"name":"Interim payment - retrial + (new solicitor)","code":"ST1TS2T0"},{"id":46,"name":"Interim payment - retrial + start","code":"ST1TS3T0"},{"id":48,"name":"Warrant issued - trial (before + plea hearing)","code":null},{"id":49,"name":"Warrant issued - trial (after + plea hearing)","code":null},{"id":50,"name":"Warrant issued - trial (after + trial start)","code":null},{"id":51,"name":"Warrant issued - appeal against + conviction","code":null},{"id":52,"name":"Warrant issued - appeal against + sentence","code":null},{"id":53,"name":"Warrant issued - committal for sentence","code":null},{"id":54,"name":"Warrant + issued - breach of crown court order","code":null},{"id":55,"name":"Warrant + issued - retrial (after plea hearing)","code":null},{"id":56,"name":"Warrant + issued - retrial (after trial start)","code":null}]}' + recorded_at: Thu, 29 Aug 2024 16:33:11 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/prices/?fee_type_code=AGFS_SPCL_PREP&limit_from=0&london_rates_apply=false&offence_class=H&scenario=5 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 16:33:11 GMT + Content-Type: + - application/json + Content-Length: + - '301' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":265656,"scenario":5,"advocate_type":null,"fee_type":29,"offence_class":null,"scheme":2,"unit":"HOUR","london_rates_apply":false,"fee_per_unit":"41.06000","fixed_fee":"0.00000","limit_from":0,"limit_to":null,"modifiers":[],"strict_range":false}]}' + recorded_at: Thu, 29 Aug 2024 16:33:11 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/?case_date=2016-04-01&main_hearing_date&type=LGFS + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 16:33:12 GMT + Content-Type: + - application/json + Content-Length: + - '198' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":2,"start_date":"2016-04-01","end_date":"2022-09-29","earliest_main_hearing_date":null,"type":"LGFS","description":"LGFS + Fee Scheme 2016-04"}]}' + recorded_at: Thu, 29 Aug 2024 16:33:12 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/?case_date=2016-04-01&main_hearing_date&type=LGFS + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 16:33:12 GMT + Content-Type: + - application/json + Content-Length: + - '198' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":2,"start_date":"2016-04-01","end_date":"2022-09-29","earliest_main_hearing_date":null,"type":"LGFS","description":"LGFS + Fee Scheme 2016-04"}]}' + recorded_at: Thu, 29 Aug 2024 16:33:12 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/scenarios/ + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 16:33:12 GMT + Content-Type: + - application/json + Content-Length: + - '4119' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":51,"next":null,"previous":null,"results":[{"id":1,"name":"Discontinuance","code":"ST1TS0T1"},{"id":2,"name":"Guilty + plea","code":"ST1TS0T2"},{"id":3,"name":"Cracked trial","code":"ST1TS0T3"},{"id":4,"name":"Trial","code":"ST1TS0T4"},{"id":5,"name":"Appeal + against conviction","code":"ST1TS0T5"},{"id":6,"name":"Appeal against sentence","code":"ST1TS0T6"},{"id":7,"name":"Committal + for sentence","code":"ST1TS0T7"},{"id":8,"name":"Contempt","code":"ST1TS0T8"},{"id":9,"name":"Breach + of crown court order","code":"ST3TS3TB"},{"id":10,"name":"Cracked before retrial","code":"ST1TS0T9"},{"id":11,"name":"Retrial","code":"ST1TS0TA"},{"id":12,"name":"Elected + case not proceeded","code":"ST4TS0T1"},{"id":17,"name":"Up to and including + PCMH transfer (original solicitor) - cracked trial","code":"ST2TS1T0"},{"id":18,"name":"Up + to and including PCMH transfer (new solicitor) - guilty plea","code":"ST3TS1T2"},{"id":19,"name":"Up + to and including PCMH transfer (new solicitor) - cracked trial","code":"ST3TS1T3"},{"id":20,"name":"Up + to and including PCMH transfer (new solicitor) - trial","code":"ST3TS1T4"},{"id":21,"name":"Before + trial transfer (original solicitor) - cracked trial","code":"ST2TS2T0"},{"id":22,"name":"Before + trial transfer (new solicitor) - cracked trial","code":"ST3TS2T3"},{"id":23,"name":"Before + trial transfer (new solicitor) - trial","code":"ST3TS2T4"},{"id":24,"name":"During + trial transfer (original solicitor) - trial","code":"ST2TS3T0"},{"id":25,"name":"During + trial transfer (new solicitor) - trial","code":"ST3TS3T4"},{"id":26,"name":"During + trial transfer (new solicitor) - retrial","code":"ST3TS3TA"},{"id":27,"name":"Transfer + before retrial (original solicitor) - retrial","code":"ST2TS4T0"},{"id":28,"name":"Transfer + before retrial (new solicitor) - cracked retrial","code":"ST3TS4T9"},{"id":29,"name":"Transfer + before retrial (new solicitor) - retrial","code":"ST3TS4TA"},{"id":30,"name":"Transfer + during retrial (original solicitor) - retrial","code":"ST2TS5T0"},{"id":31,"name":"Transfer + during retrial (new solicitor) - retrial","code":"ST3TS5TA"},{"id":32,"name":"Hearing + subsequent to sentence","code":"ST1TS0TC"},{"id":33,"name":"Transfer after + retrial and before sentencing (original)","code":"ST2TS6TA"},{"id":34,"name":"Transfer + after retrial and before sentencing (new)","code":"ST3TS6TA"},{"id":35,"name":"Transfer + after trial and before sentencing (original)","code":"ST2TS7T4"},{"id":36,"name":"Transfer + after trial and before sentencing (new)","code":"ST3TS7T4"},{"id":37,"name":"Elected + case not proceeded - up to and including PCMH (original solicitor)","code":"ST4TS0T2"},{"id":38,"name":"Elected + case not proceeded - up to and including PCMH (new solicitor)","code":"ST4TS0T3"},{"id":39,"name":"Elected + case not proceeded - before trial transfer (original solicitor)","code":"ST4TS0T4"},{"id":40,"name":"Elected + case not proceeded - before trial transfer (new solicitor)","code":"ST4TS0T5"},{"id":41,"name":"Elected + case not proceeded - transfer before retrial (original solicitor)","code":"ST4TS0T6"},{"id":42,"name":"Elected + case not proceeded - transfer before retrial (new solicitor)","code":"ST4TS0T7"},{"id":43,"name":"Interim + payment - effective PCMH","code":"ST1TS0T0"},{"id":44,"name":"Interim payment + - trial start","code":"ST1TS1T0"},{"id":45,"name":"Interim payment - retrial + (new solicitor)","code":"ST1TS2T0"},{"id":46,"name":"Interim payment - retrial + start","code":"ST1TS3T0"},{"id":48,"name":"Warrant issued - trial (before + plea hearing)","code":null},{"id":49,"name":"Warrant issued - trial (after + plea hearing)","code":null},{"id":50,"name":"Warrant issued - trial (after + trial start)","code":null},{"id":51,"name":"Warrant issued - appeal against + conviction","code":null},{"id":52,"name":"Warrant issued - appeal against + sentence","code":null},{"id":53,"name":"Warrant issued - committal for sentence","code":null},{"id":54,"name":"Warrant + issued - breach of crown court order","code":null},{"id":55,"name":"Warrant + issued - retrial (after plea hearing)","code":null},{"id":56,"name":"Warrant + issued - retrial (after trial start)","code":null}]}' + recorded_at: Thu, 29 Aug 2024 16:33:12 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/scenarios/ + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 16:33:12 GMT + Content-Type: + - application/json + Content-Length: + - '4119' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":51,"next":null,"previous":null,"results":[{"id":1,"name":"Discontinuance","code":"ST1TS0T1"},{"id":2,"name":"Guilty + plea","code":"ST1TS0T2"},{"id":3,"name":"Cracked trial","code":"ST1TS0T3"},{"id":4,"name":"Trial","code":"ST1TS0T4"},{"id":5,"name":"Appeal + against conviction","code":"ST1TS0T5"},{"id":6,"name":"Appeal against sentence","code":"ST1TS0T6"},{"id":7,"name":"Committal + for sentence","code":"ST1TS0T7"},{"id":8,"name":"Contempt","code":"ST1TS0T8"},{"id":9,"name":"Breach + of crown court order","code":"ST3TS3TB"},{"id":10,"name":"Cracked before retrial","code":"ST1TS0T9"},{"id":11,"name":"Retrial","code":"ST1TS0TA"},{"id":12,"name":"Elected + case not proceeded","code":"ST4TS0T1"},{"id":17,"name":"Up to and including + PCMH transfer (original solicitor) - cracked trial","code":"ST2TS1T0"},{"id":18,"name":"Up + to and including PCMH transfer (new solicitor) - guilty plea","code":"ST3TS1T2"},{"id":19,"name":"Up + to and including PCMH transfer (new solicitor) - cracked trial","code":"ST3TS1T3"},{"id":20,"name":"Up + to and including PCMH transfer (new solicitor) - trial","code":"ST3TS1T4"},{"id":21,"name":"Before + trial transfer (original solicitor) - cracked trial","code":"ST2TS2T0"},{"id":22,"name":"Before + trial transfer (new solicitor) - cracked trial","code":"ST3TS2T3"},{"id":23,"name":"Before + trial transfer (new solicitor) - trial","code":"ST3TS2T4"},{"id":24,"name":"During + trial transfer (original solicitor) - trial","code":"ST2TS3T0"},{"id":25,"name":"During + trial transfer (new solicitor) - trial","code":"ST3TS3T4"},{"id":26,"name":"During + trial transfer (new solicitor) - retrial","code":"ST3TS3TA"},{"id":27,"name":"Transfer + before retrial (original solicitor) - retrial","code":"ST2TS4T0"},{"id":28,"name":"Transfer + before retrial (new solicitor) - cracked retrial","code":"ST3TS4T9"},{"id":29,"name":"Transfer + before retrial (new solicitor) - retrial","code":"ST3TS4TA"},{"id":30,"name":"Transfer + during retrial (original solicitor) - retrial","code":"ST2TS5T0"},{"id":31,"name":"Transfer + during retrial (new solicitor) - retrial","code":"ST3TS5TA"},{"id":32,"name":"Hearing + subsequent to sentence","code":"ST1TS0TC"},{"id":33,"name":"Transfer after + retrial and before sentencing (original)","code":"ST2TS6TA"},{"id":34,"name":"Transfer + after retrial and before sentencing (new)","code":"ST3TS6TA"},{"id":35,"name":"Transfer + after trial and before sentencing (original)","code":"ST2TS7T4"},{"id":36,"name":"Transfer + after trial and before sentencing (new)","code":"ST3TS7T4"},{"id":37,"name":"Elected + case not proceeded - up to and including PCMH (original solicitor)","code":"ST4TS0T2"},{"id":38,"name":"Elected + case not proceeded - up to and including PCMH (new solicitor)","code":"ST4TS0T3"},{"id":39,"name":"Elected + case not proceeded - before trial transfer (original solicitor)","code":"ST4TS0T4"},{"id":40,"name":"Elected + case not proceeded - before trial transfer (new solicitor)","code":"ST4TS0T5"},{"id":41,"name":"Elected + case not proceeded - transfer before retrial (original solicitor)","code":"ST4TS0T6"},{"id":42,"name":"Elected + case not proceeded - transfer before retrial (new solicitor)","code":"ST4TS0T7"},{"id":43,"name":"Interim + payment - effective PCMH","code":"ST1TS0T0"},{"id":44,"name":"Interim payment + - trial start","code":"ST1TS1T0"},{"id":45,"name":"Interim payment - retrial + (new solicitor)","code":"ST1TS2T0"},{"id":46,"name":"Interim payment - retrial + start","code":"ST1TS3T0"},{"id":48,"name":"Warrant issued - trial (before + plea hearing)","code":null},{"id":49,"name":"Warrant issued - trial (after + plea hearing)","code":null},{"id":50,"name":"Warrant issued - trial (after + trial start)","code":null},{"id":51,"name":"Warrant issued - appeal against + conviction","code":null},{"id":52,"name":"Warrant issued - appeal against + sentence","code":null},{"id":53,"name":"Warrant issued - committal for sentence","code":null},{"id":54,"name":"Warrant + issued - breach of crown court order","code":null},{"id":55,"name":"Warrant + issued - retrial (after plea hearing)","code":null},{"id":56,"name":"Warrant + issued - retrial (after trial start)","code":null}]}' + recorded_at: Thu, 29 Aug 2024 16:33:12 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/prices/?fee_type_code=AGFS_SPCL_PREP&limit_from=0&london_rates_apply=false&offence_class=H&scenario=5 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 16:33:12 GMT + Content-Type: + - application/json + Content-Length: + - '301' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":265656,"scenario":5,"advocate_type":null,"fee_type":29,"offence_class":null,"scheme":2,"unit":"HOUR","london_rates_apply":false,"fee_per_unit":"41.06000","fixed_fee":"0.00000","limit_from":0,"limit_to":null,"modifiers":[],"strict_range":false}]}' + recorded_at: Thu, 29 Aug 2024 16:33:12 GMT +- request: + method: get + uri: https://staging.laa-fee-calculator.service.justice.gov.uk/api/v1/fee-schemes/2/prices/?fee_type_code=AGFS_SPCL_PREP&limit_from=0&london_rates_apply=false&offence_class=H&scenario=5 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - laa-fee-calculator-client/2.0.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 29 Aug 2024 16:33:12 GMT + Content-Type: + - application/json + Content-Length: + - '301' + Connection: + - keep-alive + Vary: + - Accept, origin, Cookie + Allow: + - GET, HEAD, OPTIONS + Cache-Control: + - public, max-age=7200 + X-Frame-Options: + - DENY + X-Content-Type-Options: + - nosniff + Referrer-Policy: + - same-origin + Cross-Origin-Opener-Policy: + - same-origin + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + body: + encoding: UTF-8 + string: '{"count":1,"next":null,"previous":null,"results":[{"id":265656,"scenario":5,"advocate_type":null,"fee_type":29,"offence_class":null,"scheme":2,"unit":"HOUR","london_rates_apply":false,"fee_per_unit":"41.06000","fixed_fee":"0.00000","limit_from":0,"limit_to":null,"modifiers":[],"strict_range":false}]}' + recorded_at: Thu, 29 Aug 2024 16:33:12 GMT +recorded_with: VCR 6.2.0 From 64256b90b41738a6b7f3f14004583fc812006c58 Mon Sep 17 00:00:00 2001 From: Alex Sheppard Date: Tue, 3 Sep 2024 16:30:49 +0100 Subject: [PATCH 25/25] Code review ** Whitespace and naming cleanup --- app/services/claims/fee_calculator/calculate_price.rb | 1 - .../litigator/misc_fee_calculator_london.feature | 2 +- .../litigator/misc_fee_calculator_nonlondon.feature | 4 ++-- features/page_objects/sections/lgfs_misc_fee_section.rb | 2 -- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/services/claims/fee_calculator/calculate_price.rb b/app/services/claims/fee_calculator/calculate_price.rb index 90aa931eb5..1a15c32f89 100644 --- a/app/services/claims/fee_calculator/calculate_price.rb +++ b/app/services/claims/fee_calculator/calculate_price.rb @@ -139,7 +139,6 @@ def fee_type_mappings def fee_type_code_for(fee_type) # For LGFS Misc Fees, use fee type mappings. For all other LGFS fees, return LIT_FEE return 'LIT_FEE' if lgfs? & !fee_type.is_a?(Fee::MiscFeeType) - fee_type = case_uplift_parent if fee_type.case_uplift? fee_type = defendant_uplift_parent if fee_type.defendant_uplift? fee_type_mappings.all[fee_type&.unique_code&.to_sym][:bill_subtype] diff --git a/features/fee_calculator/litigator/misc_fee_calculator_london.feature b/features/fee_calculator/litigator/misc_fee_calculator_london.feature index 2c9a1a23e7..b0d435b636 100644 --- a/features/fee_calculator/litigator/misc_fee_calculator_london.feature +++ b/features/fee_calculator/litigator/misc_fee_calculator_london.feature @@ -43,7 +43,7 @@ Feature: litigator completes fixed fee page using calculator Then I eject the VCR cassette - Scenario: I create a fee scheme 10 fixed fee claim using calculated value + Scenario: I create a fee scheme 10 fixed fee claim using london rates Given the current date is '2022-10-30' And I am a signed in litigator diff --git a/features/fee_calculator/litigator/misc_fee_calculator_nonlondon.feature b/features/fee_calculator/litigator/misc_fee_calculator_nonlondon.feature index 9c93e01bfa..e381f32c86 100644 --- a/features/fee_calculator/litigator/misc_fee_calculator_nonlondon.feature +++ b/features/fee_calculator/litigator/misc_fee_calculator_nonlondon.feature @@ -2,7 +2,7 @@ @fee_calc_vcr Feature: litigator completes fixed fee page using calculator - Scenario: I create a fee scheme 9 fixed fee claim using london rates + Scenario: I create a fee scheme 9 fixed fee claim using non-london rates Given I am a signed in litigator And My provider has supplier numbers @@ -44,7 +44,7 @@ Feature: litigator completes fixed fee page using calculator Then I eject the VCR cassette - Scenario: I create a fee scheme 10 fixed fee claim using calculated value + Scenario: I create a fee scheme 10 fixed fee claim using non-london rates Given the current date is '2022-10-30' And I am a signed in litigator diff --git a/features/page_objects/sections/lgfs_misc_fee_section.rb b/features/page_objects/sections/lgfs_misc_fee_section.rb index 859ca16c5a..fd6dc80962 100644 --- a/features/page_objects/sections/lgfs_misc_fee_section.rb +++ b/features/page_objects/sections/lgfs_misc_fee_section.rb @@ -3,7 +3,6 @@ class FeeTypeSection < SitePrism::Section sections :radios, RadioSection, '.govuk-radios__item' - def radio_labels radios.map { |radio| radio.label.text.gsub(/\n(.*)/, '') } end @@ -21,7 +20,6 @@ class LGFSMiscFeeSection < SitePrism::Section section :fee_type, FeeTypeSection, '.fee-type' element :net_amount, '.fee-net-amount' - def populated? amount.value.size > 0 end