From f5e6529baa08a2e73b5b36dcf30bbaa74ad815f7 Mon Sep 17 00:00:00 2001 From: Rachael Booth Date: Wed, 4 Dec 2024 16:05:05 +0000 Subject: [PATCH 01/30] CLDC-3314: Skip BU error for ownershipsch in validate_discounted_ownership_value (#2837) --- .../validations/sales/sale_information_validations.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/models/validations/sales/sale_information_validations.rb b/app/models/validations/sales/sale_information_validations.rb index 3825271c5..4b8948053 100644 --- a/app/models/validations/sales/sale_information_validations.rb +++ b/app/models/validations/sales/sale_information_validations.rb @@ -64,7 +64,7 @@ module Validations::Sales::SaleInformationValidations if over_tolerance?(record.mortgage_deposit_and_grant_total, record.value_with_discount, tolerance, strict: !record.discount.nil?) && record.discounted_ownership_sale? deposit_and_grant_sentence = record.grant.present? ? ", cash deposit (#{record.field_formatted_as_currency('deposit')}), and grant (#{record.field_formatted_as_currency('grant')})" : " and cash deposit (#{record.field_formatted_as_currency('deposit')})" discount_sentence = record.discount.present? ? " (#{record.field_formatted_as_currency('value')}) subtracted by the sum of the full purchase price (#{record.field_formatted_as_currency('value')}) multiplied by the percentage discount (#{record.discount}%)" : "" - %i[mortgageused mortgage value deposit ownershipsch discount grant].each do |field| + %i[mortgageused mortgage value deposit discount grant].each do |field| record.errors.add field, I18n.t("validations.sales.sale_information.#{field}.discounted_ownership_value", mortgage: record.mortgage&.positive? ? " (#{record.field_formatted_as_currency('mortgage')})" : "", deposit_and_grant_sentence:, @@ -72,6 +72,12 @@ module Validations::Sales::SaleInformationValidations discount_sentence:, value_with_discount: record.field_formatted_as_currency("value_with_discount")).html_safe end + record.errors.add :ownershipsch, :skip_bu_error, message: I18n.t("validations.sales.sale_information.ownershipsch.discounted_ownership_value", + mortgage: record.mortgage&.positive? ? " (#{record.field_formatted_as_currency('mortgage')})" : "", + deposit_and_grant_sentence:, + mortgage_deposit_and_grant_total: record.field_formatted_as_currency("mortgage_deposit_and_grant_total"), + discount_sentence:, + value_with_discount: record.field_formatted_as_currency("value_with_discount")).html_safe end end From 1b2100bc8fc3729ce409ed5aba7a9a7c38925c9f Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:06:25 +0000 Subject: [PATCH 02/30] CLDC-3093: Update content inconsistencies and typos (#2846) * Update copy * Update sale_information.en.yml * Update sale_information.en.yml * Fixes * Update test * Update test * Update test --- app/models/form/sales/questions/equity.rb | 2 +- app/models/form/sales/questions/value.rb | 2 +- .../lettings/household_characteristics.en.yml | 38 ++++++------ .../2023/lettings/income_and_benefits.en.yml | 2 +- .../sales/household_characteristics.en.yml | 58 +++++++++---------- .../sales/income_benefits_and_savings.en.yml | 12 ++-- .../forms/2023/sales/sale_information.en.yml | 24 ++++---- .../lettings/household_characteristics.en.yml | 8 +-- .../2024/lettings/income_and_benefits.en.yml | 2 +- .../sales/household_characteristics.en.yml | 58 +++++++++---------- .../sales/income_benefits_and_savings.en.yml | 8 +-- .../forms/2024/sales/sale_information.en.yml | 24 ++++---- .../lettings/household_characteristics.en.yml | 2 +- .../2025/lettings/income_and_benefits.en.yml | 2 +- .../sales/household_characteristics.en.yml | 20 +++---- .../sales/income_benefits_and_savings.en.yml | 2 +- .../forms/2025/sales/sale_information.en.yml | 8 +-- config/locales/forms/2025/sales/setup.en.yml | 2 +- spec/models/form/sales/pages/equity_spec.rb | 4 ++ .../pages/value_shared_ownership_spec.rb | 4 ++ .../form/sales/questions/equity_spec.rb | 4 ++ 21 files changed, 149 insertions(+), 137 deletions(-) diff --git a/app/models/form/sales/questions/equity.rb b/app/models/form/sales/questions/equity.rb index e39e77ebb..74f5e9970 100644 --- a/app/models/form/sales/questions/equity.rb +++ b/app/models/form/sales/questions/equity.rb @@ -2,7 +2,7 @@ class Form::Sales::Questions::Equity < ::Form::Question def initialize(id, hsh, page) super @id = "equity" - @copy_key = "sales.sale_information.equity.#{page.id}" + @copy_key = form.start_year_2025_or_later? ? "sales.sale_information.equity.#{page.id}" : "sales.sale_information.equity" @type = "numeric" @min = 0 @max = 100 diff --git a/app/models/form/sales/questions/value.rb b/app/models/form/sales/questions/value.rb index ad021e920..ce8d07e28 100644 --- a/app/models/form/sales/questions/value.rb +++ b/app/models/form/sales/questions/value.rb @@ -2,7 +2,7 @@ class Form::Sales::Questions::Value < ::Form::Question def initialize(id, hsh, page) super @id = "value" - @copy_key = "sales.sale_information.value.#{page.id}" + @copy_key = form.start_year_2025_or_later? ? "sales.sale_information.value.#{page.id}" : "sales.sale_information.value" @type = "numeric" @min = 0 @step = 1 diff --git a/config/locales/forms/2023/lettings/household_characteristics.en.yml b/config/locales/forms/2023/lettings/household_characteristics.en.yml index 1f175adbc..3de0745b1 100644 --- a/config/locales/forms/2023/lettings/household_characteristics.en.yml +++ b/config/locales/forms/2023/lettings/household_characteristics.en.yml @@ -19,23 +19,23 @@ en: page_header: "" age1_known: check_answer_label: "" - hint_text: "The ’lead’ or ’main’ tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest." + hint_text: "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest." question_text: "Do you know the lead tenant’s age?" age1: check_answer_label: "Lead tenant’s age" hint_text: "" question_text: "Age" - + sex1: page_header: "" check_answer_label: "Lead tenant’s gender identity" hint_text: "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest." question_text: "Which of these best describes the lead tenant’s gender identity?" - + ethnic_group: page_header: "" check_answer_label: "Lead tenant’s ethnic group" - hint_text: "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest." + hint_text: "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest." question_text: "What is the lead tenant’s ethnic group?" ethnic: @@ -97,13 +97,13 @@ en: question_text: "Do you know person 2’s age?" age2: check_answer_label: "Person 2’s age" - hint_text: "" + hint_text: "" question_text: "Age" sex2: page_header: "" check_answer_label: "Person 2’s gender identity" - hint_text: "" + hint_text: "" question_text: "Which of these best describes person 2’s gender identity?" ecstat2: @@ -132,13 +132,13 @@ en: question_text: "Do you know person 3’s age?" age3: check_answer_label: "Person 3’s age" - hint_text: "" + hint_text: "" question_text: "Age" sex3: page_header: "" check_answer_label: "Person 3’s gender identity" - hint_text: "" + hint_text: "" question_text: "Which of these best describes person 3’s gender identity?" ecstat3: @@ -167,13 +167,13 @@ en: question_text: "Do you know person 4’s age?" age4: check_answer_label: "Person 4’s age" - hint_text: "" + hint_text: "" question_text: "Age" sex4: page_header: "" check_answer_label: "Person 4’s gender identity" - hint_text: "" + hint_text: "" question_text: "Which of these best describes person 4’s gender identity?" ecstat4: @@ -202,13 +202,13 @@ en: question_text: "Do you know person 5’s age?" age5: check_answer_label: "Person 5’s age" - hint_text: "" + hint_text: "" question_text: "Age" sex5: page_header: "" check_answer_label: "Person 5’s gender identity" - hint_text: "" + hint_text: "" question_text: "Which of these best describes person 5’s gender identity?" ecstat5: @@ -237,13 +237,13 @@ en: question_text: "Do you know person 6’s age?" age6: check_answer_label: "Person 6’s age" - hint_text: "" + hint_text: "" question_text: "Age" sex6: page_header: "" check_answer_label: "Person 6’s gender identity" - hint_text: "" + hint_text: "" question_text: "Which of these best describes person 6’s gender identity?" ecstat6: @@ -272,13 +272,13 @@ en: question_text: "Do you know person 7’s age?" age7: check_answer_label: "Person 7’s age" - hint_text: "" + hint_text: "" question_text: "Age" sex7: page_header: "" check_answer_label: "Person 7’s gender identity" - hint_text: "" + hint_text: "" question_text: "Which of these best describes person 7’s gender identity?" ecstat7: @@ -307,17 +307,17 @@ en: question_text: "Do you know person 8’s age?" age8: check_answer_label: "Person 8’s age" - hint_text: "" + hint_text: "" question_text: "Age" sex8: page_header: "" check_answer_label: "Person 8’s gender identity" - hint_text: "" + hint_text: "" question_text: "Which of these best describes person 8’s gender identity?" ecstat8: page_header: "" check_answer_label: "Person 8’s working situation" hint_text: "" - question_text: "Which of these best describes person 8’s working situation?" \ No newline at end of file + question_text: "Which of these best describes person 8’s working situation?" diff --git a/config/locales/forms/2023/lettings/income_and_benefits.en.yml b/config/locales/forms/2023/lettings/income_and_benefits.en.yml index bc19c7954..dc5ee5a53 100644 --- a/config/locales/forms/2023/lettings/income_and_benefits.en.yml +++ b/config/locales/forms/2023/lettings/income_and_benefits.en.yml @@ -103,6 +103,6 @@ en: hint_text: "You only need to give an approximate figure." question_text: "Can you estimate the outstanding amount?" tshortfall: - check_answer_label: "Estimated outstanding amountt" + check_answer_label: "Estimated outstanding amount" hint_text: "Also known as the ‘outstanding amount’." question_text: "Estimated outstanding amount" diff --git a/config/locales/forms/2023/sales/household_characteristics.en.yml b/config/locales/forms/2023/sales/household_characteristics.en.yml index a49a817dc..ed03bc698 100644 --- a/config/locales/forms/2023/sales/household_characteristics.en.yml +++ b/config/locales/forms/2023/sales/household_characteristics.en.yml @@ -37,7 +37,7 @@ en: check_answer_label: "Buyer 1’s age" hint_text: "" question_text: "Age" - + sex1: page_header: "" check_answer_label: "Buyer 1’s gender identity" @@ -49,7 +49,7 @@ en: check_answer_label: "Buyer 1’s ethnic group" hint_text: "Buyer 1 is the person in the household who does the most paid work. If it’s a joint purchase and the buyers do the same amount of paid work, buyer 1 is whoever is the oldest." question_text: "What is buyer 1’s ethnic group?" - + ethnic: ethnic_background_black: page_header: "" @@ -103,9 +103,9 @@ en: question_text: "What is buyer 2's relationship to buyer 1?" person: page_header: "" - check_answer_label: "Person 2’s relationship to Buyer 1" + check_answer_label: "Person 2’s relationship to buyer 1" hint_text: "" - question_text: "What is Person 2’s relationship to Buyer 1?" + question_text: "What is person 2’s relationship to buyer 1?" age2: buyer: @@ -139,14 +139,14 @@ en: page_header: "" check_answer_label: "Person 2’s gender identity" hint_text: "" - question_text: "Which of these best describes Person 2’s gender identity?" + question_text: "Which of these best describes person 2’s gender identity?" ethnic_group2: page_header: "" check_answer_label: "Buyer 2’s ethnic group" hint_text: "" question_text: "What is buyer 2’s ethnic group?" - + ethnicbuy2: ethnic_background_black: page_header: "" @@ -179,7 +179,7 @@ en: check_answer_label: "Buyer 2’s nationality" hint_text: "" question_text: "What is buyer 2’s nationality?" - + ecstat2: buyer: page_header: "" @@ -190,14 +190,14 @@ en: page_header: "" check_answer_label: "Person 2’s working situation" hint_text: "" - question_text: "Which of these best describes Person 2’s working situation?" + question_text: "Which of these best describes person 2’s working situation?" buy2livein: page_header: "" check_answer_label: "Will buyer 2 live in the property?" hint_text: "" question_text: "Will buyer 2 live in the property?" - + hholdcount: joint_purchase: page_header: "" @@ -224,9 +224,9 @@ en: relat3: page_header: "" - check_answer_label: "Person 3’s relationship to Buyer 1" + check_answer_label: "Person 3’s relationship to buyer 1" hint_text: "" - question_text: "What is Person 3’s relationship to Buyer 1?" + question_text: "What is person 3’s relationship to buyer 1?" age3: page_header: "" @@ -238,18 +238,18 @@ en: check_answer_label: "Person 3’s age" hint_text: "" question_text: "Age" - + sex3: page_header: "" check_answer_label: "Person 3’s gender identity" hint_text: "" - question_text: "Which of these best describes Person 3’s gender identity?" + question_text: "Which of these best describes person 3’s gender identity?" ecstat3: page_header: "" check_answer_label: "Person 3’s working situation" hint_text: "" - question_text: "Which of these best describes Person 3’s working situation?" + question_text: "Which of these best describes person 3’s working situation?" details_known_4: page_header: "" @@ -259,9 +259,9 @@ en: relat4: page_header: "" - check_answer_label: "Person 4’s relationship to Buyer 1" + check_answer_label: "Person 4’s relationship to buyer 1" hint_text: "" - question_text: "What is Person 4’s relationship to Buyer 1?" + question_text: "What is person 4’s relationship to buyer 1?" age4: page_header: "" @@ -273,18 +273,18 @@ en: check_answer_label: "Person 4’s age" hint_text: "" question_text: "Age" - + sex4: page_header: "" check_answer_label: "Person 4’s gender identity" hint_text: "" - question_text: "Which of these best describes Person 4’s gender identity?" + question_text: "Which of these best describes person 4’s gender identity?" ecstat4: page_header: "" check_answer_label: "Person 4’s working situation" hint_text: "" - question_text: "Which of these best describes Person 4’s working situation?" + question_text: "Which of these best describes person 4’s working situation?" details_known_5: page_header: "" @@ -294,9 +294,9 @@ en: relat5: page_header: "" - check_answer_label: "Person 5’s relationship to Buyer 1" + check_answer_label: "Person 5’s relationship to buyer 1" hint_text: "" - question_text: "What is Person 5’s relationship to Buyer 1?" + question_text: "What is person 5’s relationship to buyer 1?" age5: page_header: "" @@ -308,18 +308,18 @@ en: check_answer_label: "Person 5’s age" hint_text: "" question_text: "Age" - + sex5: page_header: "" check_answer_label: "Person 5’s gender identity" hint_text: "" - question_text: "Which of these best describes Person 5’s gender identity?" + question_text: "Which of these best describes person 5’s gender identity?" ecstat5: page_header: "" check_answer_label: "Person 5’s working situation" hint_text: "" - question_text: "Which of these best describes Person 5’s working situation?" + question_text: "Which of these best describes person 5’s working situation?" details_known_6: page_header: "" @@ -329,9 +329,9 @@ en: relat6: page_header: "" - check_answer_label: "Person 6’s relationship to Buyer 1" + check_answer_label: "Person 6’s relationship to buyer 1" hint_text: "" - question_text: "What is Person 6’s relationship to Buyer 1?" + question_text: "What is person 6’s relationship to buyer 1?" age6: page_header: "" @@ -343,15 +343,15 @@ en: check_answer_label: "Person 6’s age" hint_text: "" question_text: "Age" - + sex6: page_header: "" check_answer_label: "Person 6’s gender identity" hint_text: "" - question_text: "Which of these best describes Person 6’s gender identity?" + question_text: "Which of these best describes person 6’s gender identity?" ecstat6: page_header: "" check_answer_label: "Person 6’s working situation" hint_text: "" - question_text: "Which of these best describes Person 6’s working situation?" + question_text: "Which of these best describes person 6’s working situation?" diff --git a/config/locales/forms/2023/sales/income_benefits_and_savings.en.yml b/config/locales/forms/2023/sales/income_benefits_and_savings.en.yml index 49262d7a1..689c611cb 100644 --- a/config/locales/forms/2023/sales/income_benefits_and_savings.en.yml +++ b/config/locales/forms/2023/sales/income_benefits_and_savings.en.yml @@ -13,7 +13,7 @@ en: check_answer_label: "Buyer 1’s gross annual income" hint_text: "Provide the gross annual income (i.e. salary before tax) plus the annual amount of benefits, Universal Credit or pensions, and income from investments." question_text: "Buyer 1’s gross annual income" - + inc1mort: page_header: "" check_answer_label: "Buyer 1’s income used for mortgage application" @@ -33,7 +33,7 @@ en: inc2mort: page_header: "" - check_answer_label: "Buyer 2’s income used for mortgage application" + check_answer_label: "Buyer 2’s income used for mortgage application" hint_text: "" question_text: "Was buyer 2’s income used for a mortgage application?" @@ -48,14 +48,14 @@ en: check_answer_label: "Housing-related benefits buyer received before buying this property" hint_text: "" question_text: "Was the buyer receiving any of these housing-related benefits immediately before buying this property?" - + savings: joint_purchase: page_header: "" savingsnk: - check_answer_label: "Buyers’ total savings known?" + check_answer_label: "Buyers’ total savings known?" hint_text: "" - question_text: "Do you know how much the 'buyers' had in savings before they paid any deposit for the property?" + question_text: "Do you know how much the buyers had in savings before they paid any deposit for the property?" savings: check_answer_label: "Buyers’ total savings before any deposit paid" hint_text: "Include any savings, investments, ISAs, premium bonds, shares, or money held in a bank or building society account." @@ -87,4 +87,4 @@ en: page_header: "" check_answer_label: "Previous property shared ownership?" hint_text: "For any buyer" - question_text: "Was the previous property under shared ownership?" \ No newline at end of file + question_text: "Was the previous property under shared ownership?" diff --git a/config/locales/forms/2023/sales/sale_information.en.yml b/config/locales/forms/2023/sales/sale_information.en.yml index 318d7c7db..24f767026 100644 --- a/config/locales/forms/2023/sales/sale_information.en.yml +++ b/config/locales/forms/2023/sales/sale_information.en.yml @@ -28,7 +28,7 @@ en: staircasing: page_header: "" check_answer_label: "Staircasing transaction" - hint_text: "A staircasing transaction is when the household purchases more shares in their property, increasing the proportion they own and decreasing the proportion the housing association owns. Once the household purchases 100% of the shares, they own the property" + hint_text: "A staircasing transaction is when the household purchases more shares in their property, increasing the proportion they own and decreasing the proportion the housing association owns. Once the household purchases 100% of the shares, they own the property." question_text: "Is this a staircasing transaction?" about_staircasing: page_header: "About the staircasing transaction" @@ -69,7 +69,7 @@ en: check_answer_label: "Household rehoused under a local authority nominations agreement?" hint_text: "A local authority nominations agreement is a written agreement between a local authority and private registered provider (PRP) that some or all of its sales vacancies are offered to local authorities for rehousing" question_text: "Was the household rehoused under a 'local authority nominations agreement'?" - + soctenant: joint_purchase: page_header: "" @@ -81,11 +81,11 @@ en: check_answer_label: "Buyer was a registered provider, housing association or local authority tenant immediately before this sale?" hint_text: "" question_text: "Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale?" - + frombeds: - page_header: "About the buyers’ previous property" + page_header: "" check_answer_label: "Number of bedrooms in previous property" - hint_text: "For bedsits enter 1" + hint_text: "A bedsit has 1 bedroom." question_text: "How many bedrooms did the property have?" fromprop: @@ -113,13 +113,13 @@ en: question_text: "What was the initial percentage equity stake purchased?" mortgageused: - page_header: "Mortgage Amount" + page_header: "" check_answer_label: "Mortgage used" hint_text: "" question_text: "Was a mortgage used for the purchase of this property?" mortgage: - page_header: "Mortgage Amount" + page_header: "" check_answer_label: "Mortgage amount" hint_text: "Enter the amount of mortgage agreed with the mortgage lender. Exclude any deposits or cash payments. Numeric in pounds. Rounded to the nearest pound." question_text: "What is the mortgage amount?" @@ -135,7 +135,7 @@ en: check_answer_label: "Other Mortgage Lender" hint_text: "" question_text: "What is the other mortgage lender?" - + mortlen: page_header: "" check_answer_label: "Length of mortgage" @@ -147,7 +147,7 @@ en: check_answer_label: "Any other borrowing?" hint_text: "" question_text: "Does this include any extra borrowing?" - + deposit: page_header: "About the deposit" check_answer_label: "Deposit amount" @@ -165,7 +165,7 @@ en: check_answer_label: "Monthly rent" hint_text: "Amount paid before any charges" question_text: "What is the basic monthly rent?" - + leaseholdcharges: page_header: "" has_mscharge: @@ -199,10 +199,10 @@ en: check_answer_label: "Percentage discount" hint_text: "For Right to Buy (RTB), Preserved Right to Buy (PRTB), and Voluntary Right to Buy (VRTB)

If discount capped, enter capped %

If the property is being sold to an existing tenant under the RTB, PRTB, or VRTB schemes, enter the % discount from the full market value that is being given." question_text: "What was the percentage discount?" - + grant: page_header: "About the price of the property" check_answer_label: "Amount of any loan, grant or subsidy" hint_text: "For all schemes except Right to Buy (RTB), Preserved Right to Buy (PRTB), Voluntary Right to Buy (VRTB) and Rent to Buy" question_text: "What was the amount of any loan, grant, discount or subsidy given?" - \ No newline at end of file + diff --git a/config/locales/forms/2024/lettings/household_characteristics.en.yml b/config/locales/forms/2024/lettings/household_characteristics.en.yml index 04a311f06..0537a82bd 100644 --- a/config/locales/forms/2024/lettings/household_characteristics.en.yml +++ b/config/locales/forms/2024/lettings/household_characteristics.en.yml @@ -13,19 +13,19 @@ en: page_header: "" age1_known: check_answer_label: "" - hint_text: "The ’lead’ or ’main’ tenant is the person in the household who does the most paid work. If several people do the same amount of paid work, the lead tenant is whoever is the oldest." + hint_text: "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest." question_text: "Do you know the lead tenant’s age?" age1: check_answer_label: "Lead tenant’s age" hint_text: "" question_text: "Age" - + sex1: page_header: "" check_answer_label: "Lead tenant’s gender identity" hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth." question_text: "Which of these best describes the lead tenant’s gender identity?" - + ethnic_group: page_header: "" check_answer_label: "Lead tenant’s ethnic group" @@ -319,4 +319,4 @@ en: page_header: "" check_answer_label: "Person 8’s working situation" hint_text: "" - question_text: "Which of these best describes person 8’s working situation?" \ No newline at end of file + question_text: "Which of these best describes person 8’s working situation?" diff --git a/config/locales/forms/2024/lettings/income_and_benefits.en.yml b/config/locales/forms/2024/lettings/income_and_benefits.en.yml index bb3cc320e..8e364f611 100644 --- a/config/locales/forms/2024/lettings/income_and_benefits.en.yml +++ b/config/locales/forms/2024/lettings/income_and_benefits.en.yml @@ -103,6 +103,6 @@ en: hint_text: "You only need to give an approximate figure." question_text: "Can you estimate the outstanding amount?" tshortfall: - check_answer_label: "Estimated outstanding amountt" + check_answer_label: "Estimated outstanding amount" hint_text: "Also known as the ‘outstanding amount’." question_text: "Estimated outstanding amount" diff --git a/config/locales/forms/2024/sales/household_characteristics.en.yml b/config/locales/forms/2024/sales/household_characteristics.en.yml index 22f9427e8..5b06639fe 100644 --- a/config/locales/forms/2024/sales/household_characteristics.en.yml +++ b/config/locales/forms/2024/sales/household_characteristics.en.yml @@ -13,7 +13,7 @@ en: check_answer_label: "Buyer 1’s age" hint_text: "" question_text: "Age" - + sex1: page_header: "" check_answer_label: "Buyer 1’s gender identity" @@ -25,7 +25,7 @@ en: check_answer_label: "Buyer 1’s ethnic group" hint_text: "" question_text: "What is buyer 1’s ethnic group?" - + ethnic: ethnic_background_black: page_header: "" @@ -85,9 +85,9 @@ en: question_text: "What is buyer 2's relationship to buyer 1?" person: page_header: "" - check_answer_label: "Person 2’s relationship to Buyer 1" + check_answer_label: "Person 2’s relationship to buyer 1" hint_text: "" - question_text: "What is Person 2’s relationship to Buyer 1?" + question_text: "What is person 2’s relationship to buyer 1?" age2: buyer: @@ -121,14 +121,14 @@ en: page_header: "" check_answer_label: "Person 2’s gender identity" hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth." - question_text: "Which of these best describes Person 2’s gender identity?" + question_text: "Which of these best describes person 2’s gender identity?" ethnic_group2: page_header: "" check_answer_label: "Buyer 2’s ethnic group" hint_text: "" question_text: "What is buyer 2’s ethnic group?" - + ethnicbuy2: ethnic_background_black: page_header: "" @@ -167,7 +167,7 @@ en: check_answer_label: "Buyer 2’s nationality" hint_text: "" question_text: "Enter a nationality" - + ecstat2: buyer: page_header: "" @@ -178,14 +178,14 @@ en: page_header: "" check_answer_label: "Person 2’s working situation" hint_text: "" - question_text: "Which of these best describes Person 2’s working situation?" + question_text: "Which of these best describes person 2’s working situation?" buy2livein: page_header: "" check_answer_label: "Will buyer 2 live in the property?" hint_text: "" question_text: "Will buyer 2 live in the property?" - + hholdcount: joint_purchase: page_header: "" @@ -212,9 +212,9 @@ en: relat3: page_header: "" - check_answer_label: "Person 3’s relationship to Buyer 1" + check_answer_label: "Person 3’s relationship to buyer 1" hint_text: "" - question_text: "What is Person 3’s relationship to Buyer 1?" + question_text: "What is person 3’s relationship to buyer 1?" age3: page_header: "" @@ -226,18 +226,18 @@ en: check_answer_label: "Person 3’s age" hint_text: "" question_text: "Age" - + sex3: page_header: "" check_answer_label: "Person 3’s gender identity" hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth." - question_text: "Which of these best describes Person 3’s gender identity?" + question_text: "Which of these best describes person 3’s gender identity?" ecstat3: page_header: "" check_answer_label: "Person 3’s working situation" hint_text: "" - question_text: "Which of these best describes Person 3’s working situation?" + question_text: "Which of these best describes person 3’s working situation?" details_known_4: page_header: "" @@ -247,9 +247,9 @@ en: relat4: page_header: "" - check_answer_label: "Person 4’s relationship to Buyer 1" + check_answer_label: "Person 4’s relationship to buyer 1" hint_text: "" - question_text: "What is Person 4’s relationship to Buyer 1?" + question_text: "What is person 4’s relationship to buyer 1?" age4: page_header: "" @@ -261,18 +261,18 @@ en: check_answer_label: "Person 4’s age" hint_text: "" question_text: "Age" - + sex4: page_header: "" check_answer_label: "Person 4’s gender identity" hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth." - question_text: "Which of these best describes Person 4’s gender identity?" + question_text: "Which of these best describes person 4’s gender identity?" ecstat4: page_header: "" check_answer_label: "Person 4’s working situation" hint_text: "" - question_text: "Which of these best describes Person 4’s working situation?" + question_text: "Which of these best describes person 4’s working situation?" details_known_5: page_header: "" @@ -282,9 +282,9 @@ en: relat5: page_header: "" - check_answer_label: "Person 5’s relationship to Buyer 1" + check_answer_label: "Person 5’s relationship to buyer 1" hint_text: "" - question_text: "What is Person 5’s relationship to Buyer 1?" + question_text: "What is person 5’s relationship to buyer 1?" age5: page_header: "" @@ -296,18 +296,18 @@ en: check_answer_label: "Person 5’s age" hint_text: "" question_text: "Age" - + sex5: page_header: "" check_answer_label: "Person 5’s gender identity" hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth." - question_text: "Which of these best describes Person 5’s gender identity?" + question_text: "Which of these best describes person 5’s gender identity?" ecstat5: page_header: "" check_answer_label: "Person 5’s working situation" hint_text: "" - question_text: "Which of these best describes Person 5’s working situation?" + question_text: "Which of these best describes person 5’s working situation?" details_known_6: page_header: "" @@ -317,9 +317,9 @@ en: relat6: page_header: "" - check_answer_label: "Person 6’s relationship to Buyer 1" + check_answer_label: "Person 6’s relationship to buyer 1" hint_text: "" - question_text: "What is Person 6’s relationship to Buyer 1?" + question_text: "What is person 6’s relationship to buyer 1?" age6: page_header: "" @@ -331,15 +331,15 @@ en: check_answer_label: "Person 6’s age" hint_text: "" question_text: "Age" - + sex6: page_header: "" check_answer_label: "Person 6’s gender identity" hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth." - question_text: "Which of these best describes Person 6’s gender identity?" + question_text: "Which of these best describes person 6’s gender identity?" ecstat6: page_header: "" check_answer_label: "Person 6’s working situation" hint_text: "" - question_text: "Which of these best describes Person 6’s working situation?" + question_text: "Which of these best describes person 6’s working situation?" diff --git a/config/locales/forms/2024/sales/income_benefits_and_savings.en.yml b/config/locales/forms/2024/sales/income_benefits_and_savings.en.yml index 0654c9e1f..8d5ec0772 100644 --- a/config/locales/forms/2024/sales/income_benefits_and_savings.en.yml +++ b/config/locales/forms/2024/sales/income_benefits_and_savings.en.yml @@ -13,7 +13,7 @@ en: check_answer_label: "Buyer 1’s gross annual income" hint_text: "Provide the gross annual income (i.e. salary before tax) plus the annual amount of benefits, Universal Credit or pensions, and income from investments." question_text: "Buyer 1’s gross annual income" - + inc1mort: page_header: "" check_answer_label: "Buyer 1’s income used for mortgage application" @@ -48,14 +48,14 @@ en: check_answer_label: "Housing-related benefits buyer received before buying this property" hint_text: "" question_text: "Was the buyer receiving any of these housing-related benefits immediately before buying this property?" - + savings: joint_purchase: page_header: "" savingsnk: check_answer_label: "Buyers’ total savings known?" hint_text: "" - question_text: "Do you know how much the 'buyers' had in savings before they paid any deposit for the property?" + question_text: "Do you know how much the buyers had in savings before they paid any deposit for the property?" savings: check_answer_label: "Buyers’ total savings before any deposit paid" hint_text: "Include any savings, investments, ISAs, premium bonds, shares, or money held in a bank or building society account." @@ -87,4 +87,4 @@ en: page_header: "" check_answer_label: "Previous property shared ownership?" hint_text: "For any buyer" - question_text: "Was the previous property under shared ownership?" \ No newline at end of file + question_text: "Was the previous property under shared ownership?" diff --git a/config/locales/forms/2024/sales/sale_information.en.yml b/config/locales/forms/2024/sales/sale_information.en.yml index d0031416e..92acca9cd 100644 --- a/config/locales/forms/2024/sales/sale_information.en.yml +++ b/config/locales/forms/2024/sales/sale_information.en.yml @@ -28,7 +28,7 @@ en: staircasing: page_header: "" check_answer_label: "Staircasing transaction" - hint_text: "A staircasing transaction is when the household purchases more shares in their property, increasing the proportion they own and decreasing the proportion the housing association owns. Once the household purchases 100% of the shares, they own the property" + hint_text: "A staircasing transaction is when the household purchases more shares in their property, increasing the proportion they own and decreasing the proportion the housing association owns. Once the household purchases 100% of the shares, they own the property." question_text: "Is this a staircasing transaction?" about_staircasing: page_header: "About the staircasing transaction" @@ -73,7 +73,7 @@ en: check_answer_label: "Household rehoused under a local authority nominations agreement?" hint_text: "A local authority nominations agreement is a written agreement between a local authority and private registered provider (PRP) that some or all of its sales vacancies are offered to local authorities for rehousing" question_text: "Was the household rehoused under a 'local authority nominations agreement'?" - + soctenant: joint_purchase: page_header: "" @@ -85,11 +85,11 @@ en: check_answer_label: "Buyer was a registered provider, housing association or local authority tenant immediately before this sale?" hint_text: "" question_text: "Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale?" - + frombeds: - page_header: "About the buyers’ previous property" + page_header: "" check_answer_label: "Number of bedrooms in previous property" - hint_text: "For bedsits enter 1" + hint_text: "A bedsit has 1 bedroom." question_text: "How many bedrooms did the property have?" fromprop: @@ -117,13 +117,13 @@ en: question_text: "What was the initial percentage equity stake purchased?" mortgageused: - page_header: "Mortgage Amount" + page_header: "" check_answer_label: "Mortgage used" hint_text: "" question_text: "Was a mortgage used for the purchase of this property?" mortgage: - page_header: "Mortgage Amount" + page_header: "" check_answer_label: "Mortgage amount" hint_text: "Enter the amount of mortgage agreed with the mortgage lender. Exclude any deposits or cash payments. Numeric in pounds. Rounded to the nearest pound." question_text: "What is the mortgage amount?" @@ -139,7 +139,7 @@ en: check_answer_label: "Other Mortgage Lender" hint_text: "" question_text: "What is the other mortgage lender?" - + mortlen: page_header: "" check_answer_label: "Length of mortgage" @@ -151,7 +151,7 @@ en: check_answer_label: "Any other borrowing?" hint_text: "" question_text: "Does this include any extra borrowing?" - + deposit: page_header: "About the deposit" check_answer_label: "Deposit amount" @@ -169,7 +169,7 @@ en: check_answer_label: "Monthly rent" hint_text: "Amount paid before any charges" question_text: "What is the basic monthly rent?" - + leaseholdcharges: page_header: "" has_mscharge: @@ -198,10 +198,10 @@ en: check_answer_label: "Percentage discount" hint_text: "For Right to Buy (RTB), Preserved Right to Buy (PRTB), and Voluntary Right to Buy (VRTB)

If discount capped, enter capped %

If the property is being sold to an existing tenant under the RTB, PRTB, or VRTB schemes, enter the % discount from the full market value that is being given." question_text: "What was the percentage discount?" - + grant: page_header: "About the price of the property" check_answer_label: "Amount of any loan, grant or subsidy" hint_text: "For all schemes except Right to Buy (RTB), Preserved Right to Buy (PRTB), Voluntary Right to Buy (VRTB) and Rent to Buy" question_text: "What was the amount of any loan, grant, discount or subsidy given?" - \ No newline at end of file + diff --git a/config/locales/forms/2025/lettings/household_characteristics.en.yml b/config/locales/forms/2025/lettings/household_characteristics.en.yml index 1aef9297a..b6d7ad7e9 100644 --- a/config/locales/forms/2025/lettings/household_characteristics.en.yml +++ b/config/locales/forms/2025/lettings/household_characteristics.en.yml @@ -13,7 +13,7 @@ en: page_header: "" age1_known: check_answer_label: "" - hint_text: "The ’lead’ or ’main’ tenant is the person in the household who does the most paid work. If several people do the same amount of paid work, the lead tenant is whoever is the oldest." + hint_text: "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest." question_text: "Do you know the lead tenant’s age?" age1: check_answer_label: "Lead tenant’s age" diff --git a/config/locales/forms/2025/lettings/income_and_benefits.en.yml b/config/locales/forms/2025/lettings/income_and_benefits.en.yml index 55e193ff7..5b8ed26c0 100644 --- a/config/locales/forms/2025/lettings/income_and_benefits.en.yml +++ b/config/locales/forms/2025/lettings/income_and_benefits.en.yml @@ -103,6 +103,6 @@ en: hint_text: "You only need to give an approximate figure." question_text: "Can you estimate the outstanding amount?" tshortfall: - check_answer_label: "Estimated outstanding amountt" + check_answer_label: "Estimated outstanding amount" hint_text: "Also known as the ‘outstanding amount’." question_text: "Estimated outstanding amount" diff --git a/config/locales/forms/2025/sales/household_characteristics.en.yml b/config/locales/forms/2025/sales/household_characteristics.en.yml index 3f9f503be..a217c578c 100644 --- a/config/locales/forms/2025/sales/household_characteristics.en.yml +++ b/config/locales/forms/2025/sales/household_characteristics.en.yml @@ -121,7 +121,7 @@ en: page_header: "" check_answer_label: "Person 2’s gender identity" hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth." - question_text: "Which of these best describes Person 2’s gender identity?" + question_text: "Which of these best describes person 2’s gender identity?" ethnic_group2: page_header: "" @@ -178,7 +178,7 @@ en: page_header: "" check_answer_label: "Person 2’s working situation" hint_text: "" - question_text: "Which of these best describes Person 2’s working situation?" + question_text: "Which of these best describes person 2’s working situation?" buy2livein: page_header: "" @@ -231,13 +231,13 @@ en: page_header: "" check_answer_label: "Person 3’s gender identity" hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth." - question_text: "Which of these best describes Person 3’s gender identity?" + question_text: "Which of these best describes person 3’s gender identity?" ecstat3: page_header: "" check_answer_label: "Person 3’s working situation" hint_text: "" - question_text: "Which of these best describes Person 3’s working situation?" + question_text: "Which of these best describes person 3’s working situation?" details_known_4: page_header: "" @@ -266,13 +266,13 @@ en: page_header: "" check_answer_label: "Person 4’s gender identity" hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth." - question_text: "Which of these best describes Person 4’s gender identity?" + question_text: "Which of these best describes person 4’s gender identity?" ecstat4: page_header: "" check_answer_label: "Person 4’s working situation" hint_text: "" - question_text: "Which of these best describes Person 4’s working situation?" + question_text: "Which of these best describes person 4’s working situation?" details_known_5: page_header: "" @@ -301,13 +301,13 @@ en: page_header: "" check_answer_label: "Person 5’s gender identity" hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth." - question_text: "Which of these best describes Person 5’s gender identity?" + question_text: "Which of these best describes person 5’s gender identity?" ecstat5: page_header: "" check_answer_label: "Person 5’s working situation" hint_text: "" - question_text: "Which of these best describes Person 5’s working situation?" + question_text: "Which of these best describes person 5’s working situation?" details_known_6: page_header: "" @@ -336,10 +336,10 @@ en: page_header: "" check_answer_label: "Person 6’s gender identity" hint_text: "This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth." - question_text: "Which of these best describes Person 6’s gender identity?" + question_text: "Which of these best describes person 6’s gender identity?" ecstat6: page_header: "" check_answer_label: "Person 6’s working situation" hint_text: "" - question_text: "Which of these best describes Person 6’s working situation?" + question_text: "Which of these best describes person 6’s working situation?" diff --git a/config/locales/forms/2025/sales/income_benefits_and_savings.en.yml b/config/locales/forms/2025/sales/income_benefits_and_savings.en.yml index 20beb0b85..b38c203f7 100644 --- a/config/locales/forms/2025/sales/income_benefits_and_savings.en.yml +++ b/config/locales/forms/2025/sales/income_benefits_and_savings.en.yml @@ -55,7 +55,7 @@ en: savingsnk: check_answer_label: "Buyers’ total savings known?" hint_text: "" - question_text: "Do you know how much the 'buyers' had in savings before they paid any deposit for the property?" + question_text: "Do you know how much the buyers had in savings before they paid any deposit for the property?" savings: check_answer_label: "Buyers’ total savings before any deposit paid" hint_text: "Include any savings, investments, ISAs, premium bonds, shares, or money held in a bank or building society account." diff --git a/config/locales/forms/2025/sales/sale_information.en.yml b/config/locales/forms/2025/sales/sale_information.en.yml index 0535caca1..278c8a235 100644 --- a/config/locales/forms/2025/sales/sale_information.en.yml +++ b/config/locales/forms/2025/sales/sale_information.en.yml @@ -105,9 +105,9 @@ en: question_text: "Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale?" frombeds: - page_header: "About the buyers’ previous property" + page_header: "" check_answer_label: "Number of bedrooms in previous property" - hint_text: "For bedsits enter 1" + hint_text: "A bedsit has 1 bedroom." question_text: "How many bedrooms did the property have?" fromprop: @@ -145,13 +145,13 @@ en: question_text: "What was the percentage shared purchased in the initial transaction?" mortgageused: - page_header: "Mortgage Amount" + page_header: "" check_answer_label: "Mortgage used?" hint_text: "" question_text: "Was a mortgage used for the purchase of this property?" mortgage: - page_header: "Mortgage Amount" + page_header: "" check_answer_label: "Mortgage amount" hint_text: "Enter the amount of mortgage agreed with the mortgage lender. Exclude any deposits or cash payments. Numeric in pounds. Rounded to the nearest pound." question_text: "What is the mortgage amount?" diff --git a/config/locales/forms/2025/sales/setup.en.yml b/config/locales/forms/2025/sales/setup.en.yml index 6f7c5da98..c4cc9a42c 100644 --- a/config/locales/forms/2025/sales/setup.en.yml +++ b/config/locales/forms/2025/sales/setup.en.yml @@ -42,7 +42,7 @@ en: staircasing: page_header: "" check_answer_label: "Staircasing transaction" - hint_text: "A staircasing transaction is when the household purchases more shares in their property, increasing the proportion they own and decreasing the proportion the housing association owns. Once the household purchases 100% of the shares, they own the property" + hint_text: "A staircasing transaction is when the household purchases more shares in their property, increasing the proportion they own and decreasing the proportion the housing association owns. Once the household purchases 100% of the shares, they own the property." question_text: "Is this a staircasing transaction?" type: diff --git a/spec/models/form/sales/pages/equity_spec.rb b/spec/models/form/sales/pages/equity_spec.rb index 83a5dfaa3..e27538263 100644 --- a/spec/models/form/sales/pages/equity_spec.rb +++ b/spec/models/form/sales/pages/equity_spec.rb @@ -7,6 +7,10 @@ RSpec.describe Form::Sales::Pages::Equity, type: :model do let(:page_definition) { nil } let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1))) } + before do + allow(page.subsection.form).to receive(:start_year_2025_or_later?).and_return(false) + end + it "has correct subsection" do expect(page.subsection).to eq(subsection) end diff --git a/spec/models/form/sales/pages/value_shared_ownership_spec.rb b/spec/models/form/sales/pages/value_shared_ownership_spec.rb index eb1b1099f..82e6c1055 100644 --- a/spec/models/form/sales/pages/value_shared_ownership_spec.rb +++ b/spec/models/form/sales/pages/value_shared_ownership_spec.rb @@ -7,6 +7,10 @@ RSpec.describe Form::Sales::Pages::ValueSharedOwnership, type: :model do let(:page_definition) { nil } let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1))) } + before do + allow(page.subsection.form).to receive(:start_year_2025_or_later?).and_return(false) + end + it "has correct subsection" do expect(page.subsection).to eq(subsection) end diff --git a/spec/models/form/sales/questions/equity_spec.rb b/spec/models/form/sales/questions/equity_spec.rb index 5083af9e8..3e6b9d85a 100644 --- a/spec/models/form/sales/questions/equity_spec.rb +++ b/spec/models/form/sales/questions/equity_spec.rb @@ -7,6 +7,10 @@ RSpec.describe Form::Sales::Questions::Equity, type: :model do let(:question_definition) { nil } let(:page) { instance_double(Form::Page, id: "initial_equity", subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) } + before do + allow(page.subsection.form).to receive(:start_year_2025_or_later?).and_return(false) + end + it "has correct page" do expect(question.page).to eq(page) end From ef49307d9bbda4d44366bb5feefd4dd4869ad237 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:16:55 +0000 Subject: [PATCH 03/30] CLDC-3361 Update scheme back link paths (#2802) * Update scheme back link paths * Correclty route if has other client group changed from no to yes --- app/controllers/schemes_controller.rb | 4 +- app/helpers/schemes_helper.rb | 18 +++++ app/views/schemes/confirm_secondary.html.erb | 2 +- app/views/schemes/details.html.erb | 2 +- .../schemes/primary_client_group.html.erb | 8 +- .../schemes/secondary_client_group.html.erb | 2 +- app/views/schemes/support.html.erb | 2 +- spec/requests/schemes_controller_spec.rb | 74 ++++++++++++++++++- 8 files changed, 98 insertions(+), 14 deletions(-) diff --git a/app/controllers/schemes_controller.rb b/app/controllers/schemes_controller.rb index 3dc642345..a76c9db52 100644 --- a/app/controllers/schemes_controller.rb +++ b/app/controllers/schemes_controller.rb @@ -150,7 +150,7 @@ class SchemesController < ApplicationController @scheme.update!(secondary_client_group: nil) if @scheme.has_other_client_group == "No" if scheme_params[:confirmed] == "true" || @scheme.confirmed? if check_answers && should_direct_via_secondary_client_group_page?(page) - redirect_to scheme_secondary_client_group_path(@scheme, referrer: "check-answers") + redirect_to scheme_secondary_client_group_path(@scheme, referrer: "has-other-client-group") else @scheme.locations.update!(confirmed: true) flash[:notice] = if scheme_previously_confirmed @@ -162,7 +162,7 @@ class SchemesController < ApplicationController end elsif check_answers if should_direct_via_secondary_client_group_page?(page) - redirect_to scheme_secondary_client_group_path(@scheme, referrer: "check-answers") + redirect_to scheme_secondary_client_group_path(@scheme, referrer: "has-other-client-group") else redirect_to scheme_check_answers_path(@scheme) end diff --git a/app/helpers/schemes_helper.rb b/app/helpers/schemes_helper.rb index 12d86aba8..f262c08ff 100644 --- a/app/helpers/schemes_helper.rb +++ b/app/helpers/schemes_helper.rb @@ -101,6 +101,24 @@ module SchemesHelper organisation.owned_schemes.duplicate_sets.any? || organisation.owned_schemes.any? { |scheme| scheme.locations.duplicate_sets.any? } end + def scheme_back_button_path(scheme, current_page) + return scheme_check_answers_path(scheme) if request.params[:referrer] == "check-answers" + return scheme_confirm_secondary_client_group_path(scheme, referrer: "check-answers") if request.params[:referrer] == "has-other-client-group" + + case current_page + when "details" + schemes_path + when "primary_client_group" + scheme_details_path(scheme) + when "confirm_secondary_client_group" + scheme_primary_client_group_path(scheme) + when "secondary_client_group" + scheme_confirm_secondary_client_group_path(scheme) + when "support" + scheme.has_other_client_group == "Yes" ? scheme_secondary_client_group_path(scheme) : scheme_confirm_secondary_client_group_path(scheme) + end + end + private ActivePeriod = Struct.new(:from, :to) diff --git a/app/views/schemes/confirm_secondary.html.erb b/app/views/schemes/confirm_secondary.html.erb index 9b715c264..9feca87bc 100644 --- a/app/views/schemes/confirm_secondary.html.erb +++ b/app/views/schemes/confirm_secondary.html.erb @@ -1,7 +1,7 @@ <% content_for :title, "Does this scheme provide for another client group?" %> <% content_for :before_content do %> - <%= govuk_back_link(href: :back) %> + <%= govuk_back_link(href: scheme_back_button_path(@scheme, "confirm_secondary_client_group")) %> <% end %> <%= render partial: "organisations/headings", locals: { main: "Does this scheme provide for another client group?", sub: @scheme.service_name } %> diff --git a/app/views/schemes/details.html.erb b/app/views/schemes/details.html.erb index 4b23ab016..d1943cabe 100644 --- a/app/views/schemes/details.html.erb +++ b/app/views/schemes/details.html.erb @@ -1,7 +1,7 @@ <% content_for :title, "Create a new supported housing scheme" %> <% content_for :before_content do %> - <%= govuk_back_link(href: :back) %> + <%= govuk_back_link(href: scheme_back_button_path(@scheme, "details")) %> <% end %> <%= form_for(@scheme, method: :patch) do |f| %> diff --git a/app/views/schemes/primary_client_group.html.erb b/app/views/schemes/primary_client_group.html.erb index 55dc504b4..68da2f35c 100644 --- a/app/views/schemes/primary_client_group.html.erb +++ b/app/views/schemes/primary_client_group.html.erb @@ -1,13 +1,7 @@ <% content_for :title, "What client group is this scheme intended for?" %> -<% if request.referer&.include?("new") %> - <% back_button_path = scheme_details_path(@scheme) %> -<% else %> - <% back_button_path = :back %> -<% end %> - <% content_for :before_content do %> - <%= govuk_back_link(href: back_button_path) %> + <%= govuk_back_link(href: scheme_back_button_path(@scheme, "primary_client_group")) %> <% end %> <%= form_for(@scheme, method: :patch) do |f| %> diff --git a/app/views/schemes/secondary_client_group.html.erb b/app/views/schemes/secondary_client_group.html.erb index cd50283e3..8200702d2 100644 --- a/app/views/schemes/secondary_client_group.html.erb +++ b/app/views/schemes/secondary_client_group.html.erb @@ -1,7 +1,7 @@ <% content_for :title, "What is the other client group?" %> <% content_for :before_content do %> - <%= govuk_back_link(href: :back) %> + <%= govuk_back_link(href: scheme_back_button_path(@scheme, "secondary_client_group")) %> <% end %> <%= form_for(@scheme, method: :patch) do |f| %> diff --git a/app/views/schemes/support.html.erb b/app/views/schemes/support.html.erb index a5d30ed7f..eca72014f 100644 --- a/app/views/schemes/support.html.erb +++ b/app/views/schemes/support.html.erb @@ -1,7 +1,7 @@ <% content_for :title, "What support does this scheme provide?" %> <% content_for :before_content do %> - <%= govuk_back_link(href: :back) %> + <%= govuk_back_link(href: scheme_back_button_path(@scheme, "support")) %> <% end %> <%= form_for(@scheme, method: :patch) do |f| %> diff --git a/spec/requests/schemes_controller_spec.rb b/spec/requests/schemes_controller_spec.rb index 83ba11fd9..2eb2330c8 100644 --- a/spec/requests/schemes_controller_spec.rb +++ b/spec/requests/schemes_controller_spec.rb @@ -2035,6 +2035,17 @@ RSpec.describe SchemesController, type: :request do expect(page).to have_content("What client group is this scheme intended for?") end + it "has correct back link" do + expect(page).to have_link("Back", href: "/schemes/#{scheme.id}/details") + end + + context "and accessed from check answers" do + it "has correct back link" do + get "/schemes/#{scheme.id}/primary-client-group?referrer=check-answers" + expect(page).to have_link("Back", href: "/schemes/#{scheme.id}/check-answers") + end + end + context "when attempting to access primary-client-group scheme page for another organisation" do before do get "/schemes/#{another_scheme.id}/primary-client-group" @@ -2112,6 +2123,17 @@ RSpec.describe SchemesController, type: :request do expect(page).to have_content("Does this scheme provide for another client group?") end + it "has correct back link" do + expect(page).to have_link("Back", href: "/schemes/#{scheme.id}/primary-client-group") + end + + context "and accessed from check answers" do + it "has correct back link" do + get "/schemes/#{scheme.id}/confirm-secondary-client-group?referrer=check-answers" + expect(page).to have_link("Back", href: "/schemes/#{scheme.id}/check-answers") + end + end + context "when attempting to access confirm-secondary-client-group scheme page for another organisation" do before do get "/schemes/#{another_scheme.id}/confirm-secondary-client-group" @@ -2189,6 +2211,24 @@ RSpec.describe SchemesController, type: :request do expect(page).to have_content("What is the other client group?") end + it "has correct back link" do + expect(page).to have_link("Back", href: "/schemes/#{scheme.id}/confirm-secondary-client-group") + end + + context "and accessed from check answers" do + it "has correct back link" do + get "/schemes/#{scheme.id}/secondary-client-group?referrer=check-answers" + expect(page).to have_link("Back", href: "/schemes/#{scheme.id}/check-answers") + end + end + + context "and accessed from has other client group" do + it "has correct back link" do + get "/schemes/#{scheme.id}/secondary-client-group?referrer=has-other-client-group" + expect(page).to have_link("Back", href: "/schemes/#{scheme.id}/confirm-secondary-client-group?referrer=check-answers") + end + end + context "when attempting to access secondary-client-group scheme page for another organisation" do before do get "/schemes/#{another_scheme.id}/secondary-client-group" @@ -2258,7 +2298,7 @@ RSpec.describe SchemesController, type: :request do context "when signed in as a data coordinator" do let(:user) { create(:user, :data_coordinator) } - let(:scheme) { create(:scheme, owning_organisation: user.organisation, confirmed: nil) } + let(:scheme) { create(:scheme, owning_organisation: user.organisation, confirmed: nil, has_other_client_group: "Yes") } let(:another_scheme) { create(:scheme, confirmed: nil) } before do @@ -2271,6 +2311,27 @@ RSpec.describe SchemesController, type: :request do expect(page).to have_content("What support does this scheme provide?") end + context "when scheme has secondary client group" do + it "has correct back link" do + expect(page).to have_link("Back", href: "/schemes/#{scheme.id}/secondary-client-group") + end + end + + context "when scheme has no secondary client group" do + let(:scheme) { create(:scheme, owning_organisation: user.organisation, confirmed: nil, has_other_client_group: "No") } + + it "has correct back link" do + expect(page).to have_link("Back", href: "/schemes/#{scheme.id}/confirm-secondary-client-group") + end + end + + context "and accessed from check answers" do + it "has correct back link" do + get "/schemes/#{scheme.id}/support?referrer=check-answers" + expect(page).to have_link("Back", href: "/schemes/#{scheme.id}/check-answers") + end + end + context "when attempting to access secondary-client-group scheme page for another organisation" do before do get "/schemes/#{another_scheme.id}/support" @@ -2433,6 +2494,17 @@ RSpec.describe SchemesController, type: :request do expect(page).to have_content("Create a new supported housing scheme") end + it "has correct back link" do + expect(page).to have_link("Back", href: "/schemes") + end + + context "and accessed from check answers" do + it "has correct back link" do + get "/schemes/#{scheme.id}/details?referrer=check-answers" + expect(page).to have_link("Back", href: "/schemes/#{scheme.id}/check-answers") + end + end + context "when attempting to access check-answers scheme page for another organisation" do before do get "/schemes/#{another_scheme.id}/details" From 46331b92adcb0854a12aa0eff76dc8bd227553e6 Mon Sep 17 00:00:00 2001 From: Rachael Booth Date: Thu, 5 Dec 2024 09:29:01 +0000 Subject: [PATCH 04/30] CLDC-3268: Update github action dependencies (#2852) --- .github/workflows/aws_deploy.yml | 22 ++++++-------- .../workflows/review_teardown_pipeline.yml | 6 ++-- .github/workflows/staging_pipeline.yml | 30 +++++++++---------- 3 files changed, 27 insertions(+), 31 deletions(-) diff --git a/.github/workflows/aws_deploy.yml b/.github/workflows/aws_deploy.yml index c72c9d874..5af3c2d08 100644 --- a/.github/workflows/aws_deploy.yml +++ b/.github/workflows/aws_deploy.yml @@ -41,19 +41,17 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v3 + uses: aws-actions/configure-aws-credentials@v4 with: aws-region: ${{ env.aws_region }} role-to-assume: ${{ env.app_repo_role }} - name: Login to Amazon ECR id: ecr-login - uses: aws-actions/amazon-ecr-login@v1 - with: - mask-password: "true" + uses: aws-actions/amazon-ecr-login@v2 - name: Check if image with tag already exists run: | @@ -81,16 +79,14 @@ jobs: steps: - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v3 + uses: aws-actions/configure-aws-credentials@v4 with: aws-region: ${{ env.aws_region }} role-to-assume: ${{ env.app_repo_role }} - name: Login to Amazon ECR id: ecr-login - uses: aws-actions/amazon-ecr-login@v1 - with: - mask-password: "true" + uses: aws-actions/amazon-ecr-login@v2 - name: Get timestamp id: timestamp @@ -112,7 +108,7 @@ jobs: echo "image=$registry/$repository:$readable_tag" >> $GITHUB_ENV - name: Configure AWS credentials for environment - uses: aws-actions/configure-aws-credentials@v3 + uses: aws-actions/configure-aws-credentials@v4 with: aws-region: ${{ env.aws_region }} role-to-assume: arn:aws:iam::${{ inputs.aws_account_id }}:role/${{ inputs.aws_role_prefix }}-deployment @@ -133,7 +129,7 @@ jobs: image: ${{ env.image }} - name: Update ad hoc task definition - uses: aws-actions/amazon-ecs-deploy-task-definition@v1 + uses: aws-actions/amazon-ecs-deploy-task-definition@v2 with: task-definition: ${{ steps.ad-hoc-task-def.outputs.task-definition }} @@ -185,7 +181,7 @@ jobs: image: ${{ env.image }} - name: Deploy updated application - uses: aws-actions/amazon-ecs-deploy-task-definition@v1 + uses: aws-actions/amazon-ecs-deploy-task-definition@v2 with: cluster: ${{ inputs.aws_task_prefix }}-app service: ${{ inputs.aws_task_prefix }}-app @@ -207,7 +203,7 @@ jobs: image: ${{ env.image }} - name: Deploy updated sidekiq - uses: aws-actions/amazon-ecs-deploy-task-definition@v1 + uses: aws-actions/amazon-ecs-deploy-task-definition@v2 with: cluster: ${{ inputs.aws_task_prefix }}-app service: ${{ inputs.aws_task_prefix }}-sidekiq diff --git a/.github/workflows/review_teardown_pipeline.yml b/.github/workflows/review_teardown_pipeline.yml index 4303e4063..8925b3340 100644 --- a/.github/workflows/review_teardown_pipeline.yml +++ b/.github/workflows/review_teardown_pipeline.yml @@ -25,13 +25,13 @@ jobs: steps: - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v3 + uses: aws-actions/configure-aws-credentials@v4 with: aws-region: ${{ env.aws_region }} role-to-assume: ${{ env.app_repo_role }} - name: Configure AWS credentials for review environment - uses: aws-actions/configure-aws-credentials@v3 + uses: aws-actions/configure-aws-credentials@v4 with: aws-region: ${{ env.aws_region }} role-to-assume: arn:aws:iam::${{ env.aws_account_id }}:role/${{ env.aws_role_prefix }}-deployment @@ -46,7 +46,7 @@ jobs: network=$(aws ecs describe-services --cluster $cluster --services $service --query services[0].networkConfiguration) overrides='{ "containerOverrides" : [{ "name" : "app", "command" : ["bundle", "exec", "rake", "db:drop"]}]}' arn=$(aws ecs run-task --cluster $cluster --task-definition $ad_hoc_task_definition --network-configuration "$network" --overrides "$overrides" --group migrations --launch-type FARGATE --query tasks[0].taskArn) - echo "Waiting for db prepare task to complete" + echo "Waiting for db drop task to complete" temp=${arn##*/} id=${temp%*\"} aws ecs wait tasks-stopped --cluster $cluster --tasks $id diff --git a/.github/workflows/staging_pipeline.yml b/.github/workflows/staging_pipeline.yml index e5447f4ef..aff0fe5f0 100644 --- a/.github/workflows/staging_pipeline.yml +++ b/.github/workflows/staging_pipeline.yml @@ -55,7 +55,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 @@ -63,7 +63,7 @@ jobs: bundler-cache: true - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: cache: yarn node-version: 20 @@ -113,7 +113,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 @@ -121,7 +121,7 @@ jobs: bundler-cache: true - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: cache: yarn node-version: 20 @@ -171,7 +171,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 @@ -179,7 +179,7 @@ jobs: bundler-cache: true - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: cache: yarn node-version: 20 @@ -230,7 +230,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 @@ -238,7 +238,7 @@ jobs: bundler-cache: true - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: cache: yarn node-version: 20 @@ -289,7 +289,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 @@ -297,7 +297,7 @@ jobs: bundler-cache: true - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: cache: yarn node-version: 20 @@ -320,7 +320,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 @@ -328,7 +328,7 @@ jobs: bundler-cache: true - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: cache: yarn node-version: 20 @@ -347,7 +347,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 @@ -379,13 +379,13 @@ jobs: steps: - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v3 + uses: aws-actions/configure-aws-credentials@v4 with: aws-region: ${{ env.aws_region }} role-to-assume: ${{ env.app_repo_role }} - name: Configure AWS credentials for the environment - uses: aws-actions/configure-aws-credentials@v3 + uses: aws-actions/configure-aws-credentials@v4 with: aws-region: eu-west-2 role-to-assume: arn:aws:iam::107155005276:role/core-staging-deployment From 5fa69ce0b62c844ad122de5adae813ec71deac74 Mon Sep 17 00:00:00 2001 From: Rachael Booth Date: Thu, 5 Dec 2024 11:38:14 +0000 Subject: [PATCH 05/30] CLDC-2128: Validate supplied year in bulk upload pages (#2839) * CLDC-2128: Validate supplied year in bulk upload pages * Fix lint * Refactor --- .../bulk_upload_lettings_logs_controller.rb | 23 +++- .../bulk_upload_sales_logs_controller.rb | 19 ++- .../forms/bulk_upload_lettings/needstype.rb | 39 ------ .../forms/needstype.erb | 23 ---- ...lk_upload_lettings_logs_controller_spec.rb | 111 ++++++++++++++++++ .../bulk_upload_sales_logs_controller_spec.rb | 111 ++++++++++++++++++ 6 files changed, 257 insertions(+), 69 deletions(-) delete mode 100644 app/models/forms/bulk_upload_lettings/needstype.rb delete mode 100644 app/views/bulk_upload_lettings_logs/forms/needstype.erb diff --git a/app/controllers/bulk_upload_lettings_logs_controller.rb b/app/controllers/bulk_upload_lettings_logs_controller.rb index a8ad14f9e..39bc05f7e 100644 --- a/app/controllers/bulk_upload_lettings_logs_controller.rb +++ b/app/controllers/bulk_upload_lettings_logs_controller.rb @@ -1,6 +1,7 @@ class BulkUploadLettingsLogsController < ApplicationController before_action :authenticate_user! - before_action :validate_data_protection_agrement_signed! + before_action :validate_data_protection_agreement_signed! + before_action :validate_year!, except: %w[start] def start if have_choice_of_year? @@ -24,12 +25,26 @@ class BulkUploadLettingsLogsController < ApplicationController private - def validate_data_protection_agrement_signed! + def validate_data_protection_agreement_signed! return if @current_user.organisation.data_protection_confirmed? redirect_to lettings_logs_path end + def validate_year! + return if params[:id] == "year" + return if params[:id] == "guidance" && params.dig(:form, :year).nil? + + allowed_years = [current_year] + allowed_years.push(current_year - 1) if FormHandler.instance.lettings_in_crossover_period? + allowed_years.push(current_year + 1) if FeatureToggle.allow_future_form_use? + + provided_year = params.dig(:form, :year)&.to_i + return if allowed_years.include?(provided_year) + + render_not_found + end + def current_year FormHandler.instance.current_collection_start_year end @@ -48,8 +63,6 @@ private Forms::BulkUploadLettings::PrepareYourFile.new(form_params) when "guidance" Forms::BulkUploadLettings::Guidance.new(form_params.merge(referrer: params[:referrer])) - when "needstype" - Forms::BulkUploadLettings::Needstype.new(form_params) when "upload-your-file" Forms::BulkUploadLettings::UploadYourFile.new(form_params.merge(current_user:)) when "checking-file" @@ -60,6 +73,6 @@ private end def form_params - params.fetch(:form, {}).permit(:year, :needstype, :file, :organisation_id) + params.fetch(:form, {}).permit(:year, :file, :organisation_id) end end diff --git a/app/controllers/bulk_upload_sales_logs_controller.rb b/app/controllers/bulk_upload_sales_logs_controller.rb index 2fd312d10..cb04cea95 100644 --- a/app/controllers/bulk_upload_sales_logs_controller.rb +++ b/app/controllers/bulk_upload_sales_logs_controller.rb @@ -1,6 +1,7 @@ class BulkUploadSalesLogsController < ApplicationController before_action :authenticate_user! - before_action :validate_data_protection_agrement_signed! + before_action :validate_data_protection_agreement_signed! + before_action :validate_year!, except: %w[start] def start if have_choice_of_year? @@ -24,12 +25,26 @@ class BulkUploadSalesLogsController < ApplicationController private - def validate_data_protection_agrement_signed! + def validate_data_protection_agreement_signed! return if @current_user.organisation.data_protection_confirmed? redirect_to sales_logs_path end + def validate_year! + return if params[:id] == "year" + return if params[:id] == "guidance" && params.dig(:form, :year).nil? + + allowed_years = [current_year] + allowed_years.push(current_year - 1) if FormHandler.instance.sales_in_crossover_period? + allowed_years.push(current_year + 1) if FeatureToggle.allow_future_form_use? + + provided_year = params.dig(:form, :year)&.to_i + return if allowed_years.include?(provided_year) + + render_not_found + end + def current_year FormHandler.instance.current_collection_start_year end diff --git a/app/models/forms/bulk_upload_lettings/needstype.rb b/app/models/forms/bulk_upload_lettings/needstype.rb deleted file mode 100644 index b15c05b52..000000000 --- a/app/models/forms/bulk_upload_lettings/needstype.rb +++ /dev/null @@ -1,39 +0,0 @@ -module Forms - module BulkUploadLettings - class Needstype - include ActiveModel::Model - include ActiveModel::Attributes - include Rails.application.routes.url_helpers - - attribute :needstype, :integer - attribute :year, :integer - attribute :organisation_id, :integer - - validates :needstype, presence: true - - def view_path - "bulk_upload_lettings_logs/forms/needstype" - end - - def options - [OpenStruct.new(id: 1, name: "General needs"), OpenStruct.new(id: 2, name: "Supported housing")] - end - - def back_path - bulk_upload_lettings_log_path(id: "prepare-your-file", form: { year:, needstype:, organisation_id: }.compact) - end - - def next_path - bulk_upload_lettings_log_path(id: "upload-your-file", form: { year:, needstype:, organisation_id: }.compact) - end - - def year_combo - "#{year} to #{year + 1}" - end - - def save! - true - end - end - end -end diff --git a/app/views/bulk_upload_lettings_logs/forms/needstype.erb b/app/views/bulk_upload_lettings_logs/forms/needstype.erb deleted file mode 100644 index 644dd9f5f..000000000 --- a/app/views/bulk_upload_lettings_logs/forms/needstype.erb +++ /dev/null @@ -1,23 +0,0 @@ -<% content_for :before_content do %> - <%= govuk_back_link href: @form.back_path %> -<% end %> - -
-
- <%= form_with model: @form, scope: :form, url: bulk_upload_lettings_log_path(id: "needstype"), method: :patch do |f| %> - <%= f.govuk_error_summary %> - <%= f.hidden_field :year %> - <%= f.hidden_field :organisation_id %> - - <%= f.govuk_collection_radio_buttons :needstype, - @form.options, - :id, - :name, - hint: { text: I18n.t("hints.bulk_upload.needstype") }, - legend: { text: "What is the needs type?", size: "l" }, - caption: { text: "Upload lettings logs in bulk (#{@form.year_combo})", size: "l" } %> - - <%= f.govuk_submit %> - <% end %> -
-
diff --git a/spec/requests/bulk_upload_lettings_logs_controller_spec.rb b/spec/requests/bulk_upload_lettings_logs_controller_spec.rb index 18b208e74..c9a22768d 100644 --- a/spec/requests/bulk_upload_lettings_logs_controller_spec.rb +++ b/spec/requests/bulk_upload_lettings_logs_controller_spec.rb @@ -73,5 +73,116 @@ RSpec.describe BulkUploadLettingsLogsController, type: :request do expect(response.body).to include("How to upload logs in bulk") end end + + context "when no year is specified" do + it "shows guidance page with links defaulting to the current year" do + get "/lettings-logs/bulk-upload-logs/guidance" + + expect(response.body).to include("Download the lettings bulk upload template (#{current_collection_start_year} to #{current_collection_start_year + 1})") + end + end + + context "when an invalid year is specified" do + it "shows not found" do + get "/lettings-logs/bulk-upload-logs/guidance?form%5Byear%5D=10000" + + expect(response).to be_not_found + end + end + end + + describe "GET /lettings-logs/bulk-upload-logs/year" do + it "does not require a year to be specified" do + get "/lettings-logs/bulk-upload-logs/year" + + expect(response).to be_ok + end + end + + pages_requiring_year_specification = %w[prepare-your-file upload-your-file checking-file] + pages_requiring_year_specification.each do |page_id| + describe "GET /lettings-logs/bulk-upload-logs/#{page_id}" do + context "when no year is provided" do + it "returns not found" do + get "/lettings-logs/bulk-upload-logs/#{page_id}" + + expect(response).to be_not_found + end + end + + context "when requesting the previous year in a crossover period" do + before do + allow(FormHandler.instance).to receive(:lettings_in_crossover_period?).and_return(true) + end + + it "succeeds" do + get "/lettings-logs/bulk-upload-logs/#{page_id}?form%5Byear%5D=#{current_collection_start_year - 1}" + + expect(response).to be_ok + end + end + + context "when requesting the previous year outside a crossover period" do + before do + allow(FormHandler.instance).to receive(:lettings_in_crossover_period?).and_return(false) + end + + it "returns not found" do + get "/lettings-logs/bulk-upload-logs/#{page_id}?form%5Byear%5D=#{current_collection_start_year - 1}" + + expect(response).to be_not_found + end + end + + context "when requesting the current year" do + it "succeeds" do + get "/lettings-logs/bulk-upload-logs/#{page_id}?form%5Byear%5D=#{current_collection_start_year}" + + expect(response).to be_ok + end + end + + if page_id != "prepare-your-file" + context "when requesting the next year with future form use toggled on" do + before do + allow(FeatureToggle).to receive(:allow_future_form_use?).and_return(true) + end + + it "succeeds" do + get "/lettings-logs/bulk-upload-logs/#{page_id}?form%5Byear%5D=#{current_collection_start_year + 1}" + + expect(response).to be_ok + end + end + end + + context "when requesting the next year with future form use toggled off" do + before do + allow(FeatureToggle).to receive(:allow_future_form_use?).and_return(false) + end + + it "returns not found" do + get "/lettings-logs/bulk-upload-logs/#{page_id}?form%5Byear%5D=#{current_collection_start_year + 1}" + + expect(response).to be_not_found + end + end + + context "when requesting a far future year" do + it "returns not found" do + get "/lettings-logs/bulk-upload-logs/#{page_id}?form%5Byear%5D=9990" + + expect(response).to be_not_found + end + end + + context "when requesting a nonsense value for year" do + it "returns not found" do + get "/lettings-logs/bulk-upload-logs/#{page_id}?form%5Byear%5D=thisisnotayear" + + expect(response).to be_not_found + end + end + end end end diff --git a/spec/requests/bulk_upload_sales_logs_controller_spec.rb b/spec/requests/bulk_upload_sales_logs_controller_spec.rb index 7cd6d4be8..4c20482be 100644 --- a/spec/requests/bulk_upload_sales_logs_controller_spec.rb +++ b/spec/requests/bulk_upload_sales_logs_controller_spec.rb @@ -73,5 +73,116 @@ RSpec.describe BulkUploadSalesLogsController, type: :request do expect(response.body).to include("How to upload logs in bulk") end end + + context "when no year is specified" do + it "shows guidance page with links defaulting to the current year" do + get "/sales-logs/bulk-upload-logs/guidance" + + expect(response.body).to include("Download the sales bulk upload template (#{current_collection_start_year} to #{current_collection_start_year + 1})") + end + end + + context "when an invalid year is specified" do + it "shows not found" do + get "/sales-logs/bulk-upload-logs/guidance?form%5Byear%5D=10000" + + expect(response).to be_not_found + end + end + end + + describe "GET /sales-logs/bulk-upload-logs/year" do + it "does not require a year to be specified" do + get "/sales-logs/bulk-upload-logs/year" + + expect(response).to be_ok + end + end + + pages_requiring_year_specification = %w[prepare-your-file upload-your-file checking-file] + pages_requiring_year_specification.each do |page_id| + describe "GET /sales-logs/bulk-upload-logs/#{page_id}" do + context "when no year is provided" do + it "returns not found" do + get "/sales-logs/bulk-upload-logs/#{page_id}" + + expect(response).to be_not_found + end + end + + context "when requesting the previous year in a crossover period" do + before do + allow(FormHandler.instance).to receive(:sales_in_crossover_period?).and_return(true) + end + + it "succeeds" do + get "/sales-logs/bulk-upload-logs/#{page_id}?form%5Byear%5D=#{current_collection_start_year - 1}" + + expect(response).to be_ok + end + end + + context "when requesting the previous year outside a crossover period" do + before do + allow(FormHandler.instance).to receive(:sales_in_crossover_period?).and_return(false) + end + + it "returns not found" do + get "/sales-logs/bulk-upload-logs/#{page_id}?form%5Byear%5D=#{current_collection_start_year - 1}" + + expect(response).to be_not_found + end + end + + context "when requesting the current year" do + it "succeeds" do + get "/sales-logs/bulk-upload-logs/#{page_id}?form%5Byear%5D=#{current_collection_start_year}" + + expect(response).to be_ok + end + end + + if page_id != "prepare-your-file" + context "when requesting the next year with future form use toggled on" do + before do + allow(FeatureToggle).to receive(:allow_future_form_use?).and_return(true) + end + + it "succeeds" do + get "/sales-logs/bulk-upload-logs/#{page_id}?form%5Byear%5D=#{current_collection_start_year + 1}" + + expect(response).to be_ok + end + end + end + + context "when requesting the next year with future form use toggled off" do + before do + allow(FeatureToggle).to receive(:allow_future_form_use?).and_return(false) + end + + it "returns not found" do + get "/sales-logs/bulk-upload-logs/#{page_id}?form%5Byear%5D=#{current_collection_start_year + 1}" + + expect(response).to be_not_found + end + end + + context "when requesting a far future year" do + it "returns not found" do + get "/sales-logs/bulk-upload-logs/#{page_id}?form%5Byear%5D=9990" + + expect(response).to be_not_found + end + end + + context "when requesting a nonsense value for year" do + it "returns not found" do + get "/sales-logs/bulk-upload-logs/#{page_id}?form%5Byear%5D=thisisnotayear" + + expect(response).to be_not_found + end + end + end end end From 3b8858f59455e46022254314f199e3e7d78d7b7a Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Fri, 6 Dec 2024 11:30:53 +0000 Subject: [PATCH 06/30] If scheme is incomplete and deactivated treat is as deactivated (#2842) --- app/models/scheme.rb | 2 +- spec/models/scheme_spec.rb | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/models/scheme.rb b/app/models/scheme.rb index 1cd56ac7d..a9b479342 100644 --- a/app/models/scheme.rb +++ b/app/models/scheme.rb @@ -329,9 +329,9 @@ class Scheme < ApplicationRecord def status_at(date) return :deleted if discarded_at.present? - return :incomplete unless confirmed && locations.confirmed.any? return :deactivated if owning_organisation.status_at(date) == :deactivated || owning_organisation.status_at(date) == :merged || (open_deactivation&.deactivation_date.present? && date >= open_deactivation.deactivation_date) + return :incomplete unless confirmed && locations.confirmed.any? return :deactivating_soon if open_deactivation&.deactivation_date.present? && date < open_deactivation.deactivation_date return :reactivating_soon if last_deactivation_before(date)&.reactivation_date.present? && date < last_deactivation_before(date).reactivation_date return :activating_soon if startdate.present? && date < startdate diff --git a/spec/models/scheme_spec.rb b/spec/models/scheme_spec.rb index 65174388d..21b60cd52 100644 --- a/spec/models/scheme_spec.rb +++ b/spec/models/scheme_spec.rb @@ -390,6 +390,13 @@ RSpec.describe Scheme, type: :model do scheme.startdate = Time.zone.today + 2.weeks expect(scheme.status).to eq(:activating_soon) end + + it "returns deactivated if scheme is deactivated and incomplete" do + scheme.update!(support_type: nil, confirmed: nil) + FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.yesterday, scheme:) + scheme.reload + expect(scheme.status).to eq(:deactivated) + end end context "when there have been previous deactivations" do From b8a576d87f0f39caa27068bf490c9ae9601ab27e Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Fri, 6 Dec 2024 13:18:12 +0000 Subject: [PATCH 07/30] CLDC-3048 Fix pluralisation for 1 result (#2841) * Fix pluralisation for 1 result * Fix world * Update tests --- .../search_result_caption_component.html.erb | 2 +- app/views/bulk_upload_shared/uploads.html.erb | 2 +- app/views/locations/index.html.erb | 2 +- app/views/logs/_log_list.html.erb | 2 +- app/views/logs/index.html.erb | 2 +- app/views/logs/update_logs.html.erb | 2 +- .../managing_agents.html.erb | 4 +-- .../stock_owners.html.erb | 4 +-- .../organisations/_organisation_list.html.erb | 2 +- app/views/organisations/index.html.erb | 2 +- app/views/organisations/logs.html.erb | 2 +- app/views/schemes/_scheme_list.html.erb | 2 +- app/views/users/_user_list.html.erb | 2 +- .../search_result_caption_component_spec.rb | 26 ++++++++++++++++++- .../requests/lettings_logs_controller_spec.rb | 4 +-- ...anisation_relationships_controller_spec.rb | 12 ++++----- .../requests/organisations_controller_spec.rb | 8 +++--- spec/requests/sales_logs_controller_spec.rb | 4 +-- 18 files changed, 54 insertions(+), 30 deletions(-) diff --git a/app/components/search_result_caption_component.html.erb b/app/components/search_result_caption_component.html.erb index b8a9382b7..b2a28a505 100644 --- a/app/components/search_result_caption_component.html.erb +++ b/app/components/search_result_caption_component.html.erb @@ -7,7 +7,7 @@ <%= count %> <%= item_label.pluralize(count) %> matching filters
<% else %> - <%= count %> total <%= item %> + <%= count %> total <%= item.pluralize(count) %> <% end %> diff --git a/app/views/bulk_upload_shared/uploads.html.erb b/app/views/bulk_upload_shared/uploads.html.erb index 958887453..a9d134c60 100644 --- a/app/views/bulk_upload_shared/uploads.html.erb +++ b/app/views/bulk_upload_shared/uploads.html.erb @@ -1,4 +1,4 @@ -<% item_label = format_label(@pagy.count, "uploads") %> +<% item_label = format_label(@pagy.count, "upload") %> <% title = format_title(@searched, bulk_upload_title(controller.controller_name), current_user, item_label, @pagy.count, nil) %> <% content_for :title, title %> diff --git a/app/views/locations/index.html.erb b/app/views/locations/index.html.erb index 23550f894..8ef5bcb56 100644 --- a/app/views/locations/index.html.erb +++ b/app/views/locations/index.html.erb @@ -32,7 +32,7 @@ count: @pagy.count, item_label:, total_count: @total_count, - item: "locations", + item: "location", filters_count: applied_filters_count(@filter_type), )) %> <% end %> diff --git a/app/views/logs/_log_list.html.erb b/app/views/logs/_log_list.html.erb index b5290c117..24714f247 100644 --- a/app/views/logs/_log_list.html.erb +++ b/app/views/logs/_log_list.html.erb @@ -1,7 +1,7 @@

- <%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "logs", filters_count: applied_filters_count(@filter_type))) %> + <%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "log", filters_count: applied_filters_count(@filter_type))) %> <% if logs&.any? %> <%= govuk_link_to "Download (CSV)", csv_download_url, type: "text/csv", class: "govuk-!-margin-right-4", style: "white-space: nowrap" %> <% if @current_user.support? %> diff --git a/app/views/logs/index.html.erb b/app/views/logs/index.html.erb index f142a2580..c51466097 100644 --- a/app/views/logs/index.html.erb +++ b/app/views/logs/index.html.erb @@ -1,4 +1,4 @@ -<% item_label = format_label(@pagy.count, "logs") %> +<% item_label = format_label(@pagy.count, "log") %> <% title = format_title(@searched, "#{log_type_for_controller(controller).capitalize} logs", current_user, item_label, @pagy.count, nil) %> <% content_for :title, title %> diff --git a/app/views/logs/update_logs.html.erb b/app/views/logs/update_logs.html.erb index 1ab1fa31c..985adecf3 100644 --- a/app/views/logs/update_logs.html.erb +++ b/app/views/logs/update_logs.html.erb @@ -1,4 +1,4 @@ -<% item_label = format_label(@pagy.count, "logs") %> +<% item_label = format_label(@pagy.count, "log") %> <% title = "Update logs" %> <% content_for :title, title %> diff --git a/app/views/organisation_relationships/managing_agents.html.erb b/app/views/organisation_relationships/managing_agents.html.erb index 726533e53..d09056d86 100644 --- a/app/views/organisation_relationships/managing_agents.html.erb +++ b/app/views/organisation_relationships/managing_agents.html.erb @@ -1,4 +1,4 @@ -<% item_label = format_label(@pagy.count, "managing agents") %> +<% item_label = format_label(@pagy.count, "managing agent") %> <% if current_user.support? %> <%= render partial: "organisations/headings", locals: { main: @organisation.name, sub: nil } %> @@ -44,7 +44,7 @@ pagy: @pagy, searched: @searched, item_label:, - search_item: "managing agents", + search_item: "managing agent", total_count: @total_count, remove_path: ->(org_id) { managing_agents_remove_organisation_path(target_organisation_id: org_id) }, } %> diff --git a/app/views/organisation_relationships/stock_owners.html.erb b/app/views/organisation_relationships/stock_owners.html.erb index 41b7af06d..3bbba6bf8 100644 --- a/app/views/organisation_relationships/stock_owners.html.erb +++ b/app/views/organisation_relationships/stock_owners.html.erb @@ -1,4 +1,4 @@ -<% item_label = format_label(@pagy.count, "stock owners") %> +<% item_label = format_label(@pagy.count, "stock owner") %> <% if current_user.support? %> <%= render partial: "organisations/headings", locals: { main: @organisation.name, sub: nil } %> <%= render SubNavigationComponent.new(items: secondary_items(request.path, @organisation.id)) %> @@ -41,7 +41,7 @@ pagy: @pagy, searched: @searched, item_label:, - search_item: "stock owners", + search_item: "stock owner", total_count: @total_count, remove_path: ->(org_id) { stock_owners_remove_organisation_path(target_organisation_id: org_id) }, } %> diff --git a/app/views/organisations/_organisation_list.html.erb b/app/views/organisations/_organisation_list.html.erb index 67cc9c7a3..16309a5eb 100644 --- a/app/views/organisations/_organisation_list.html.erb +++ b/app/views/organisations/_organisation_list.html.erb @@ -1,7 +1,7 @@
<%= govuk_table do |table| %> <%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> - <%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "organisations", filters_count: applied_filters_count(@filter_type))) %> + <%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "organisation", filters_count: applied_filters_count(@filter_type))) %> <% end %> <%= table.with_head do |head| %> <%= head.with_row do |row| %> diff --git a/app/views/organisations/index.html.erb b/app/views/organisations/index.html.erb index 411d792c1..1de12ab77 100644 --- a/app/views/organisations/index.html.erb +++ b/app/views/organisations/index.html.erb @@ -1,4 +1,4 @@ -<% item_label = format_label(@pagy.count, "organisations") %> +<% item_label = format_label(@pagy.count, "organisation") %> <% title = format_title(@searched, "Organisations", current_user, item_label, @pagy.count, nil) %> <% content_for :title, title %> diff --git a/app/views/organisations/logs.html.erb b/app/views/organisations/logs.html.erb index e172a76a9..e318ff6ee 100644 --- a/app/views/organisations/logs.html.erb +++ b/app/views/organisations/logs.html.erb @@ -1,4 +1,4 @@ -<% item_label = format_label(@pagy.count, "logs") %> +<% item_label = format_label(@pagy.count, "log") %> <% title = format_title(@searched, action_name.humanize, current_user, item_label, @pagy.count, @organisation.name) %> <% content_for :title, title %> diff --git a/app/views/schemes/_scheme_list.html.erb b/app/views/schemes/_scheme_list.html.erb index 967295236..1c11e86d1 100644 --- a/app/views/schemes/_scheme_list.html.erb +++ b/app/views/schemes/_scheme_list.html.erb @@ -2,7 +2,7 @@ <%= govuk_table do |table| %> <%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> - <%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "schemes", filters_count: applied_filters_count(@filter_type))) %> + <%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "scheme", filters_count: applied_filters_count(@filter_type))) %> <% if @schemes&.any? %> <%= govuk_link_to "Download schemes (CSV)", schemes_csv_download_url, type: "text/csv", class: "govuk-!-margin-right-4", style: "white-space: nowrap" %> <%= govuk_link_to "Download locations (CSV)", locations_csv_download_url, type: "text/csv", class: "govuk-!-margin-right-4", style: "white-space: nowrap" %> diff --git a/app/views/users/_user_list.html.erb b/app/views/users/_user_list.html.erb index 436c0def2..82a82b33b 100644 --- a/app/views/users/_user_list.html.erb +++ b/app/views/users/_user_list.html.erb @@ -1,7 +1,7 @@
<%= govuk_table do |table| %> <%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> - <%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "users", filters_count: applied_filters_count(@filter_type))) %> + <%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "user", filters_count: applied_filters_count(@filter_type))) %> <% if current_user.support? %> <% query = searched.present? ? "?search=#{searched}" : nil %> <%= govuk_link_to "Download (CSV)", "#{request.path}.csv#{query}", type: "text/csv", style: "white-space: nowrap" %> diff --git a/spec/components/search_result_caption_component_spec.rb b/spec/components/search_result_caption_component_spec.rb index 25cbc1bdd..05ac09630 100644 --- a/spec/components/search_result_caption_component_spec.rb +++ b/spec/components/search_result_caption_component_spec.rb @@ -5,7 +5,7 @@ RSpec.describe SearchResultCaptionComponent, type: :component do let(:count) { 2 } let(:item_label) { "user" } let(:total_count) { 3 } - let(:item) { "schemes" } + let(:item) { "scheme" } let(:filters_count) { 1 } let(:result) { render_inline(described_class.new(searched:, count:, item_label:, total_count:, item:, filters_count:)) } @@ -21,6 +21,14 @@ RSpec.describe SearchResultCaptionComponent, type: :component do it "renders table caption including the search results and total" do expect(result.to_html).to eq("\n 2 users matching search
\n
\n") end + + context "with 1 result" do + let(:count) { 1 } + + it "renders table caption including the search results and total" do + expect(result.to_html).to eq("\n 1 user matching search
\n
\n") + end + end end context "when filter results are found" do @@ -29,6 +37,14 @@ RSpec.describe SearchResultCaptionComponent, type: :component do it "renders table caption including the search results and total" do expect(result.to_html).to eq("\n 2 users matching filters
\n
\n") end + + context "with 1 result" do + let(:count) { 1 } + + it "renders table caption including the search results and total" do + expect(result.to_html).to eq("\n 1 user matching filters
\n
\n") + end + end end context "when no search/filter is applied" do @@ -38,6 +54,14 @@ RSpec.describe SearchResultCaptionComponent, type: :component do it "renders table caption with total count only" do expect(result.to_html).to eq("\n \n 2 total schemes\n \n\n") end + + context "with 1 result" do + let(:count) { 1 } + + it "renders table caption with total count only" do + expect(result.to_html).to eq("\n \n 1 total scheme\n \n\n") + end + end end context "when nothing is found" do diff --git a/spec/requests/lettings_logs_controller_spec.rb b/spec/requests/lettings_logs_controller_spec.rb index e795b76ea..d84a6d714 100644 --- a/spec/requests/lettings_logs_controller_spec.rb +++ b/spec/requests/lettings_logs_controller_spec.rb @@ -759,7 +759,7 @@ RSpec.describe LettingsLogsController, type: :request do it "has search results in the title" do get "/lettings-logs?search=#{log_to_search.id}", headers:, params: {} - expect(page).to have_title("Lettings logs (1 logs matching ‘#{log_to_search.id}’) - Submit social housing lettings and sales data (CORE) - GOV.UK") + expect(page).to have_title("Lettings logs (1 log matching ‘#{log_to_search.id}’) - Submit social housing lettings and sales data (CORE) - GOV.UK") end it "shows lettings logs matching the id" do @@ -895,7 +895,7 @@ RSpec.describe LettingsLogsController, type: :request do end it "shows the total log count" do - expect(CGI.unescape_html(response.body)).to match("1 total logs") + expect(CGI.unescape_html(response.body)).to match("1 total log") end it "does not show the pagination links" do diff --git a/spec/requests/organisation_relationships_controller_spec.rb b/spec/requests/organisation_relationships_controller_spec.rb index 79706fff9..8e8dc4f2d 100644 --- a/spec/requests/organisation_relationships_controller_spec.rb +++ b/spec/requests/organisation_relationships_controller_spec.rb @@ -53,7 +53,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do end it "shows the pagination count" do - expect(page).to have_content("1 total stock owners") + expect(page).to have_content("1 total stock owner") end context "when adding a stock owner" do @@ -149,7 +149,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do end it "shows the pagination count" do - expect(page).to have_content("1 total managing agents") + expect(page).to have_content("1 total managing agent") end context "and current organisation is deactivated" do @@ -345,7 +345,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do end it "shows the pagination count" do - expect(page).to have_content("1 total stock owners") + expect(page).to have_content("1 total stock owner") end end @@ -481,7 +481,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do end it "shows the pagination count" do - expect(page).to have_content("1 total managing agents") + expect(page).to have_content("1 total managing agent") end end @@ -647,7 +647,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do end it "shows the pagination count" do - expect(page).to have_content("1 total stock owners") + expect(page).to have_content("1 total stock owner") end context "when adding a stock owner" do @@ -697,7 +697,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do end it "shows the pagination count" do - expect(page).to have_content("1 total managing agents") + expect(page).to have_content("1 total managing agent") end it "shows remove link(s)" do diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index ae3297d59..26723a563 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -1203,7 +1203,7 @@ RSpec.describe OrganisationsController, type: :request do it "has search results in the title" do get "/organisations/#{organisation.id}/lettings-logs?search=#{log_to_search.id}", headers: headers, params: {} - expect(page).to have_title("#{organisation.name} (1 logs matching ‘#{log_to_search.id}’) - Submit social housing lettings and sales data (CORE) - GOV.UK") + expect(page).to have_title("#{organisation.name} (1 log matching ‘#{log_to_search.id}’) - Submit social housing lettings and sales data (CORE) - GOV.UK") end it "has search term in the search box" do @@ -1352,7 +1352,7 @@ RSpec.describe OrganisationsController, type: :request do it "has search results in the title" do get "/organisations/#{organisation.id}/sales-logs?search=#{log_to_search.id}", headers: headers, params: {} - expect(page).to have_title("#{organisation.name} (1 logs matching ‘#{log_to_search.id}’) - Submit social housing lettings and sales data (CORE) - GOV.UK") + expect(page).to have_title("#{organisation.name} (1 log matching ‘#{log_to_search.id}’) - Submit social housing lettings and sales data (CORE) - GOV.UK") end it "shows sales logs matching the id" do @@ -1616,11 +1616,11 @@ RSpec.describe OrganisationsController, type: :request do end it "updates the table caption" do - expect(page).to have_content("1 organisations matching search") + expect(page).to have_content("1 organisation matching search") end it "has search in the title" do - expect(page).to have_title("Organisations (1 organisations matching ‘#{search_param}’) - Submit social housing lettings and sales data (CORE) - GOV.UK") + expect(page).to have_title("Organisations (1 organisation matching ‘#{search_param}’) - Submit social housing lettings and sales data (CORE) - GOV.UK") end context "when the search term matches more than 1 result" do diff --git a/spec/requests/sales_logs_controller_spec.rb b/spec/requests/sales_logs_controller_spec.rb index dc056c1ed..6c882cc87 100644 --- a/spec/requests/sales_logs_controller_spec.rb +++ b/spec/requests/sales_logs_controller_spec.rb @@ -610,7 +610,7 @@ RSpec.describe SalesLogsController, type: :request do it "has search results in the title" do get "/sales-logs?search=#{log_to_search.id}", headers: headers, params: {} - expect(page).to have_title("Sales logs (1 logs matching ‘#{log_to_search.id}’) - Submit social housing lettings and sales data (CORE) - GOV.UK") + expect(page).to have_title("Sales logs (1 log matching ‘#{log_to_search.id}’) - Submit social housing lettings and sales data (CORE) - GOV.UK") end it "shows sales logs matching the id" do @@ -692,7 +692,7 @@ RSpec.describe SalesLogsController, type: :request do end it "shows the total log count" do - expect(CGI.unescape_html(response.body)).to match("1 total logs") + expect(CGI.unescape_html(response.body)).to match("1 total log") end it "does not show the pagination links" do From af79b58741dc9e18098ccade83adedf9d1936e75 Mon Sep 17 00:00:00 2001 From: Rachael Booth Date: Fri, 6 Dec 2024 16:51:49 +0000 Subject: [PATCH 08/30] Separate services tests to improve pipeline times (#2853) * Display slowest test * Attempt to improve test times on github * Run services tests in parallel * Try keeping services in Tests * Revert "Try keeping services in Tests" This reverts commit ef2e1bf4d255ed9a4bf87abda2b4d2b33787d406. * Fix parallel setup for services tests * Remove profiling --- .github/workflows/run_tests.yml | 411 +++++++++++++++++++++++++ .github/workflows/staging_pipeline.yml | 347 +-------------------- spec/db/seeds_spec.rb | 7 +- 3 files changed, 417 insertions(+), 348 deletions(-) create mode 100644 .github/workflows/run_tests.yml diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml new file mode 100644 index 000000000..1965a4034 --- /dev/null +++ b/.github/workflows/run_tests.yml @@ -0,0 +1,411 @@ +name: Run Tests + +on: + workflow_call: + pull_request: + types: + - opened + - synchronize + merge_group: + workflow_dispatch: + +defaults: + run: + shell: bash + +jobs: + test: + name: Tests + runs-on: ubuntu-latest + + services: + postgres: + image: postgres:13.5 + env: + POSTGRES_PASSWORD: password + POSTGRES_USER: postgres + POSTGRES_DB: data_collector + ports: + - 5432:5432 + # Needed because the Postgres container does not provide a health check + # tmpfs makes database faster by using RAM + options: >- + --mount type=tmpfs,destination=/var/lib/postgresql/data + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + env: + RAILS_ENV: test + GEMFILE_RUBY_VERSION: 3.1.1 + DB_HOST: localhost + DB_DATABASE: data_collector + DB_USERNAME: postgres + DB_PASSWORD: password + RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} + PARALLEL_TEST_PROCESSORS: 4 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + cache: yarn + node-version: 20 + + - name: Create database + run: | + bundle exec rake parallel:setup + + - name: Compile assets + run: | + bundle exec rake assets:precompile + + - name: Run tests + run: | + bundle exec rake parallel:spec['spec\/(?!features|models|requests|services)'] + + feature_test: + name: Feature Tests + runs-on: ubuntu-latest + + services: + postgres: + image: postgres:13.5 + env: + POSTGRES_PASSWORD: password + POSTGRES_USER: postgres + POSTGRES_DB: data_collector + ports: + - 5432:5432 + # Needed because the Postgres container does not provide a health check + # tmpfs makes database faster by using RAM + options: >- + --mount type=tmpfs,destination=/var/lib/postgresql/data + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + env: + RAILS_ENV: test + GEMFILE_RUBY_VERSION: 3.1.1 + DB_HOST: localhost + DB_DATABASE: data_collector + DB_USERNAME: postgres + DB_PASSWORD: password + RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + cache: yarn + node-version: 20 + + - name: Create database + run: | + bundle exec rake db:prepare + + - name: Compile assets + run: | + bundle exec rake assets:precompile + + - name: Run tests + run: | + bundle exec rspec spec/features --fail-fast --exclude-pattern "spec/features/accessibility_spec.rb" + + model_test: + name: Model tests + runs-on: ubuntu-latest + + services: + postgres: + image: postgres:13.5 + env: + POSTGRES_PASSWORD: password + POSTGRES_USER: postgres + POSTGRES_DB: data_collector + ports: + - 5432:5432 + # Needed because the Postgres container does not provide a health check + # tmpfs makes database faster by using RAM + options: >- + --mount type=tmpfs,destination=/var/lib/postgresql/data + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + env: + RAILS_ENV: test + GEMFILE_RUBY_VERSION: 3.1.1 + DB_HOST: localhost + DB_DATABASE: data_collector + DB_USERNAME: postgres + DB_PASSWORD: password + RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + cache: yarn + node-version: 20 + + - name: Create database + run: | + bundle exec rake db:prepare + + - name: Compile assets + run: | + bundle exec rake assets:precompile + + - name: Run tests + run: | + bundle exec rspec spec/models --fail-fast + + requests_test: + name: Requests tests + runs-on: ubuntu-latest + + services: + postgres: + image: postgres:13.5 + env: + POSTGRES_PASSWORD: password + POSTGRES_USER: postgres + POSTGRES_DB: data_collector + ports: + - 5432:5432 + # Needed because the Postgres container does not provide a health check + # tmpfs makes database faster by using RAM + options: >- + --mount type=tmpfs,destination=/var/lib/postgresql/data + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + env: + RAILS_ENV: test + GEMFILE_RUBY_VERSION: 3.1.1 + DB_HOST: localhost + DB_DATABASE: data_collector + DB_USERNAME: postgres + DB_PASSWORD: password + RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} + PARALLEL_TEST_PROCESSORS: 4 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + cache: yarn + node-version: 20 + + - name: Create database + run: | + bundle exec rake parallel:setup + + - name: Compile assets + run: | + bundle exec rake assets:precompile + + - name: Run tests + run: | + bundle exec rake parallel:spec['spec/requests'] + + services_test: + name: Services Tests + runs-on: ubuntu-latest + + services: + postgres: + image: postgres:13.5 + env: + POSTGRES_PASSWORD: password + POSTGRES_USER: postgres + POSTGRES_DB: data_collector + ports: + - 5432:5432 + # Needed because the Postgres container does not provide a health check + # tmpfs makes database faster by using RAM + options: >- + --mount type=tmpfs,destination=/var/lib/postgresql/data + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + env: + RAILS_ENV: test + GEMFILE_RUBY_VERSION: 3.1.1 + DB_HOST: localhost + DB_DATABASE: data_collector + DB_USERNAME: postgres + DB_PASSWORD: password + RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} + PARALLEL_TEST_PROCESSORS: 4 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + cache: yarn + node-version: 20 + + - name: Create database + run: | + bundle exec rake parallel:setup + + - name: Compile assets + run: | + bundle exec rake assets:precompile + + - name: Run tests + run: | + bundle exec rake parallel:spec['spec\/services'] + + accessibility_test: + name: Accessibility tests + runs-on: ubuntu-latest + + services: + postgres: + image: postgres:13.5 + env: + POSTGRES_PASSWORD: password + POSTGRES_USER: postgres + POSTGRES_DB: data_collector + ports: + - 5432:5432 + # Needed because the Postgres container does not provide a health check + # tmpfs makes database faster by using RAM + options: >- + --mount type=tmpfs,destination=/var/lib/postgresql/data + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + env: + RAILS_ENV: test + GEMFILE_RUBY_VERSION: 3.1.1 + DB_HOST: localhost + DB_DATABASE: data_collector + DB_USERNAME: postgres + DB_PASSWORD: password + RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} + PARALLEL_TEST_PROCESSORS: 4 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + cache: yarn + node-version: 20 + + - name: Create database + run: | + bundle exec rake parallel:setup + + - name: Compile assets + run: | + bundle exec rake assets:precompile + + - name: Run tests + run: | + bundle exec rspec spec/features/accessibility_spec.rb --fail-fast + + lint: + name: Lint + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + cache: yarn + node-version: 20 + + - name: Install packages and symlink local dependencies + run: | + yarn install --immutable --immutable-cache --check-cache + + - name: Lint + run: | + bundle exec rake lint + + audit: + name: Audit dependencies + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + + - name: Audit + run: | + bundle exec bundler-audit diff --git a/.github/workflows/staging_pipeline.yml b/.github/workflows/staging_pipeline.yml index aff0fe5f0..a2e777db0 100644 --- a/.github/workflows/staging_pipeline.yml +++ b/.github/workflows/staging_pipeline.yml @@ -4,11 +4,6 @@ on: push: branches: - main - pull_request: - types: - - opened - - synchronize - merge_group: workflow_dispatch: defaults: @@ -21,347 +16,13 @@ env: repository: core jobs: - test: - name: Tests - runs-on: ubuntu-latest - - services: - postgres: - image: postgres:13.5 - env: - POSTGRES_PASSWORD: password - POSTGRES_USER: postgres - POSTGRES_DB: data_collector - ports: - - 5432:5432 - # Needed because the Postgres container does not provide a health check - # tmpfs makes database faster by using RAM - options: >- - --mount type=tmpfs,destination=/var/lib/postgresql/data - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - - env: - RAILS_ENV: test - GEMFILE_RUBY_VERSION: 3.1.1 - DB_HOST: localhost - DB_DATABASE: data_collector - DB_USERNAME: postgres - DB_PASSWORD: password - RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} - PARALLEL_TEST_PROCESSORS: 4 - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - cache: yarn - node-version: 20 - - - name: Create database - run: | - bundle exec rake parallel:setup - - - name: Compile assets - run: | - bundle exec rake assets:precompile - - - name: Run tests - run: | - bundle exec rake parallel:spec['spec\/(?!features|models|requests)'] - - feature_test: - name: Feature Tests - runs-on: ubuntu-latest - - services: - postgres: - image: postgres:13.5 - env: - POSTGRES_PASSWORD: password - POSTGRES_USER: postgres - POSTGRES_DB: data_collector - ports: - - 5432:5432 - # Needed because the Postgres container does not provide a health check - # tmpfs makes database faster by using RAM - options: >- - --mount type=tmpfs,destination=/var/lib/postgresql/data - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - - env: - RAILS_ENV: test - GEMFILE_RUBY_VERSION: 3.1.1 - DB_HOST: localhost - DB_DATABASE: data_collector - DB_USERNAME: postgres - DB_PASSWORD: password - RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - cache: yarn - node-version: 20 - - - name: Create database - run: | - bundle exec rake db:prepare - - - name: Compile assets - run: | - bundle exec rake assets:precompile - - - name: Run tests - run: | - bundle exec rspec spec/features --fail-fast --exclude-pattern "spec/features/accessibility_spec.rb" - - model_test: - name: Model tests - runs-on: ubuntu-latest - - services: - postgres: - image: postgres:13.5 - env: - POSTGRES_PASSWORD: password - POSTGRES_USER: postgres - POSTGRES_DB: data_collector - ports: - - 5432:5432 - # Needed because the Postgres container does not provide a health check - # tmpfs makes database faster by using RAM - options: >- - --mount type=tmpfs,destination=/var/lib/postgresql/data - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - - env: - RAILS_ENV: test - GEMFILE_RUBY_VERSION: 3.1.1 - DB_HOST: localhost - DB_DATABASE: data_collector - DB_USERNAME: postgres - DB_PASSWORD: password - RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - cache: yarn - node-version: 20 - - - name: Create database - run: | - bundle exec rake db:prepare - - - name: Compile assets - run: | - bundle exec rake assets:precompile - - - name: Run tests - run: | - bundle exec rspec spec/models --fail-fast - - requests_test: - name: Requests tests - runs-on: ubuntu-latest - - services: - postgres: - image: postgres:13.5 - env: - POSTGRES_PASSWORD: password - POSTGRES_USER: postgres - POSTGRES_DB: data_collector - ports: - - 5432:5432 - # Needed because the Postgres container does not provide a health check - # tmpfs makes database faster by using RAM - options: >- - --mount type=tmpfs,destination=/var/lib/postgresql/data - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - - env: - RAILS_ENV: test - GEMFILE_RUBY_VERSION: 3.1.1 - DB_HOST: localhost - DB_DATABASE: data_collector - DB_USERNAME: postgres - DB_PASSWORD: password - RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} - PARALLEL_TEST_PROCESSORS: 4 - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - cache: yarn - node-version: 20 - - - name: Create database - run: | - bundle exec rake parallel:setup - - - name: Compile assets - run: | - bundle exec rake assets:precompile - - - name: Run tests - run: | - bundle exec rake parallel:spec['spec/requests'] - - accessibility_test: - name: Accessibility tests - runs-on: ubuntu-latest - - services: - postgres: - image: postgres:13.5 - env: - POSTGRES_PASSWORD: password - POSTGRES_USER: postgres - POSTGRES_DB: data_collector - ports: - - 5432:5432 - # Needed because the Postgres container does not provide a health check - # tmpfs makes database faster by using RAM - options: >- - --mount type=tmpfs,destination=/var/lib/postgresql/data - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - - env: - RAILS_ENV: test - GEMFILE_RUBY_VERSION: 3.1.1 - DB_HOST: localhost - DB_DATABASE: data_collector - DB_USERNAME: postgres - DB_PASSWORD: password - RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} - PARALLEL_TEST_PROCESSORS: 4 - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - cache: yarn - node-version: 20 - - - name: Create database - run: | - bundle exec rake parallel:setup - - - name: Compile assets - run: | - bundle exec rake assets:precompile - - - name: Run tests - run: | - bundle exec rspec spec/features/accessibility_spec.rb --fail-fast - - lint: - name: Lint - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - cache: yarn - node-version: 20 - - - name: Install packages and symlink local dependencies - run: | - yarn install --immutable --immutable-cache --check-cache - - - name: Lint - run: | - bundle exec rake lint - - audit: - name: Audit dependencies - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - - - name: Audit - run: | - bundle exec bundler-audit + tests: + name: Run Tests + uses: ./.github/workflows/run_tests.yml aws_deploy: name: AWS Deploy - if: github.ref == 'refs/heads/main' - needs: [lint, test, feature_test, requests_test, model_test, audit] + needs: [tests] uses: ./.github/workflows/aws_deploy.yml with: aws_account_id: 107155005276 diff --git a/spec/db/seeds_spec.rb b/spec/db/seeds_spec.rb index 316f04ba6..6ae07ddb0 100644 --- a/spec/db/seeds_spec.rb +++ b/spec/db/seeds_spec.rb @@ -21,7 +21,8 @@ RSpec.describe "seeding process", type: task do allow(Rails.env).to receive(:review?).and_return(true) end - it "sets up correct data" do + # Doing this in one test should save ~2 minutes + it "sets up correct data idempotently" do expect { Rails.application.load_seed }.to change(User, :count) @@ -30,10 +31,6 @@ RSpec.describe "seeding process", type: task do .and change(Scheme, :count) .and change(Location, :count) .and change(LaRentRange, :count) - end - - it "is idempotent" do - Rails.application.load_seed expect { Rails.application.load_seed From 474ed4f348bfe85bb39ebbf0a0ae985b2e04ad81 Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Mon, 9 Dec 2024 15:47:57 +0000 Subject: [PATCH 09/30] CLDC-3344: Sales CSV download ecstat2 child label bug fix (#2801) * Add missing answer option * Update tests * Allow user to change the age of a person if they're not actually under 16 without being blocked * Update displayed answer options * Add tests * Fix lint * Clear only when age is not known * Lint * Use existing method * Update tests * Revert changes in derived variables * Update sales_log_spec.rb --- .../questions/buyer2_working_situation.rb | 6 ++++ .../buyer2_working_situation_spec.rb | 28 +++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/app/models/form/sales/questions/buyer2_working_situation.rb b/app/models/form/sales/questions/buyer2_working_situation.rb index 38ab320b3..9105b8597 100644 --- a/app/models/form/sales/questions/buyer2_working_situation.rb +++ b/app/models/form/sales/questions/buyer2_working_situation.rb @@ -15,6 +15,10 @@ class Form::Sales::Questions::Buyer2WorkingSituation < ::Form::Question @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] end + def displayed_answer_options(_log, _user = nil) + answer_options.reject { |key, _| key == "9" } + end + def answer_options if form.start_year_2025_or_later? { @@ -26,6 +30,7 @@ class Form::Sales::Questions::Buyer2WorkingSituation < ::Form::Question "6" => { "value" => "Not seeking work" }, "7" => { "value" => "Full-time student" }, "8" => { "value" => "Unable to work due to long term sick or disability" }, + "9" => { "value" => "Child under 16" }, "0" => { "value" => "Other" }, "10" => { "value" => "Buyer prefers not to say" }, }.freeze @@ -41,6 +46,7 @@ class Form::Sales::Questions::Buyer2WorkingSituation < ::Form::Question "0" => { "value" => "Other" }, "10" => { "value" => "Buyer prefers not to say" }, "7" => { "value" => "Full-time student" }, + "9" => { "value" => "Child under 16" }, }.freeze end end diff --git a/spec/models/form/sales/questions/buyer2_working_situation_spec.rb b/spec/models/form/sales/questions/buyer2_working_situation_spec.rb index 7b825185c..c8ee349b6 100644 --- a/spec/models/form/sales/questions/buyer2_working_situation_spec.rb +++ b/spec/models/form/sales/questions/buyer2_working_situation_spec.rb @@ -36,6 +36,22 @@ RSpec.describe Form::Sales::Questions::Buyer2WorkingSituation, type: :model do "0" => { "value" => "Other" }, "10" => { "value" => "Buyer prefers not to say" }, "7" => { "value" => "Full-time student" }, + "9" => { "value" => "Child under 16" }, + }) + end + + it "has the correct displayed_answer_options" do + expect(question.displayed_answer_options(nil)).to eq({ + "1" => { "value" => "Full-time - 30 hours or more" }, + "2" => { "value" => "Part-time - Less than 30 hours" }, + "3" => { "value" => "In government training into work" }, + "4" => { "value" => "Jobseeker" }, + "6" => { "value" => "Not seeking work" }, + "8" => { "value" => "Unable to work due to long term sick or disability" }, + "5" => { "value" => "Retired" }, + "0" => { "value" => "Other" }, + "10" => { "value" => "Buyer prefers not to say" }, + "7" => { "value" => "Full-time student" }, }) end @@ -43,7 +59,11 @@ RSpec.describe Form::Sales::Questions::Buyer2WorkingSituation, type: :model do let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_2025_or_later?: false) } it "uses the old ordering for answer options" do - expect(question.answer_options.keys).to eq(%w[1 2 3 4 6 8 5 0 10 7]) + expect(question.answer_options.keys).to eq(%w[1 2 3 4 6 8 5 0 10 7 9]) + end + + it "uses the old ordering for displayed answer options" do + expect(question.displayed_answer_options(nil).keys).to eq(%w[1 2 3 4 6 8 5 0 10 7]) end end @@ -51,7 +71,11 @@ RSpec.describe Form::Sales::Questions::Buyer2WorkingSituation, type: :model do let(:form) { instance_double(Form, start_date: Time.zone.local(2025, 4, 1), start_year_2025_or_later?: true) } it "uses the new ordering for answer options" do - expect(question.answer_options.keys).to eq(%w[1 2 3 4 5 6 7 8 0 10]) + expect(question.answer_options.keys).to eq(%w[1 2 3 4 5 6 7 8 9 0 10]) + end + + it "uses the new ordering for displayed answer options" do + expect(question.displayed_answer_options(nil).keys).to eq(%w[1 2 3 4 5 6 7 8 0 10]) end end From 8594561a18eac0f351290662d370a390e29a9388 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Tue, 10 Dec 2024 12:27:46 +0000 Subject: [PATCH 10/30] Stub some credentials (#2857) --- spec/mailers/devise_notify_mailer_spec.rb | 11 +++++++---- spec/models/user_spec.rb | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/spec/mailers/devise_notify_mailer_spec.rb b/spec/mailers/devise_notify_mailer_spec.rb index 4ed209b24..7a7123be0 100644 --- a/spec/mailers/devise_notify_mailer_spec.rb +++ b/spec/mailers/devise_notify_mailer_spec.rb @@ -36,8 +36,11 @@ RSpec.describe DeviseNotifyMailer do end context "when the email domain is in the allowlist" do - let(:domain) { Rails.application.credentials[:email_allowlist].first } - let(:email) { "test@#{domain}" } + before do + allow(Rails.application.credentials).to receive(:[]).with(:email_allowlist).and_return(["example.com"]) + end + + let(:email) { "test@example.com" } it "does send emails" do expect(notify_client).to receive(:send_email).once @@ -48,10 +51,10 @@ RSpec.describe DeviseNotifyMailer do context "when notify mailer raises BadRequestError" do before do allow(notify_client).to receive(:send_email).and_raise(bad_request_error) + allow(Rails.application.credentials).to receive(:[]).with(:email_allowlist).and_return(["example.com"]) end - let(:domain) { Rails.application.credentials[:email_allowlist].first } - let(:email) { "test@#{domain}" } + let(:email) { "test@example.com" } it "does not raise an error" do expect { diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 51cfc00bd..53561f3e9 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -300,6 +300,7 @@ RSpec.describe User, type: :model do context "when the user is in staging environment" do before do allow(Rails.env).to receive(:staging?).and_return(true) + allow(Rails.application.credentials).to receive(:[]).with(:staging_role_update_email_allowlist).and_return(["not_one_of_the_examples.com"]) end context "and the user is not in the staging role update email allowlist" do From e7490f1381dbad8180179cbd814bb90684f8fb8d Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Wed, 11 Dec 2024 11:45:53 +0000 Subject: [PATCH 11/30] CLDC-3779 Add duplicate logs email (#2843) * Find block log creation reason * Update mailer * Remove create_logs? method --- app/mailers/bulk_upload_mailer.rb | 21 ++++++++++ .../bulk_upload/lettings/validator.rb | 14 +++---- app/services/bulk_upload/processor.rb | 40 +++++++++++++------ app/services/bulk_upload/sales/validator.rb | 12 +++--- spec/mailers/bulk_upload_mailer_spec.rb | 25 ++++++++++++ .../bulk_upload/lettings/validator_spec.rb | 10 ++--- spec/services/bulk_upload/processor_spec.rb | 32 +++++++++++++-- .../bulk_upload/sales/validator_spec.rb | 16 ++++---- 8 files changed, 124 insertions(+), 46 deletions(-) diff --git a/app/mailers/bulk_upload_mailer.rb b/app/mailers/bulk_upload_mailer.rb index e0115abb0..7c62f71a1 100644 --- a/app/mailers/bulk_upload_mailer.rb +++ b/app/mailers/bulk_upload_mailer.rb @@ -3,6 +3,7 @@ class BulkUploadMailer < NotifyMailer COMPLETE_TEMPLATE_ID = "83279578-c890-4168-838b-33c9cf0dc9f0".freeze FAILED_CSV_ERRORS_TEMPLATE_ID = "e27abcd4-5295-48c2-b127-e9ee4b781b75".freeze + FAILED_CSV_DUPLICATE_ERRORS_TEMPLATE_ID = "931d5bda-a08f-4de6-a455-38a63bff1956".freeze FAILED_FILE_SETUP_ERROR_TEMPLATE_ID = "24c9f4c7-96ad-470a-ba31-eb51b7cbafd9".freeze FAILED_SERVICE_ERROR_TEMPLATE_ID = "c3f6288c-7a74-4e77-99ee-6c4a0f6e125a".freeze HOW_TO_FIX_UPLOAD_TEMPLATE_ID = "21a07b26-f625-4846-9f4d-39e30937aa24".freeze @@ -95,6 +96,26 @@ class BulkUploadMailer < NotifyMailer ) end + def send_correct_duplicates_and_upload_again_mail(bulk_upload:) + summary_report_link = if BulkUploadErrorSummaryTableComponent.new(bulk_upload:).errors? + bulk_upload.sales? ? summary_bulk_upload_sales_result_url(bulk_upload) : summary_bulk_upload_lettings_result_url(bulk_upload) + else + bulk_upload.sales? ? bulk_upload_sales_result_url(bulk_upload) : bulk_upload_lettings_result_url(bulk_upload) + end + + send_email( + bulk_upload.user.email, + FAILED_CSV_DUPLICATE_ERRORS_TEMPLATE_ID, + { + filename: bulk_upload.filename, + upload_timestamp: bulk_upload.created_at.to_fs(:govuk_date_and_time), + year_combo: bulk_upload.year_combo, + lettings_or_sales: bulk_upload.log_type, + summary_report_link:, + }, + ) + end + def send_bulk_upload_failed_file_setup_error_mail(bulk_upload:) bulk_upload_link = if BulkUploadErrorSummaryTableComponent.new(bulk_upload:).errors? bulk_upload.sales? ? summary_bulk_upload_sales_result_url(bulk_upload) : summary_bulk_upload_lettings_result_url(bulk_upload) diff --git a/app/services/bulk_upload/lettings/validator.rb b/app/services/bulk_upload/lettings/validator.rb index 116c3b745..291bf45e7 100644 --- a/app/services/bulk_upload/lettings/validator.rb +++ b/app/services/bulk_upload/lettings/validator.rb @@ -40,29 +40,25 @@ class BulkUpload::Lettings::Validator end end - def create_logs? - return false if any_setup_errors? + def block_log_creation_reason + return "setup_errors" if any_setup_errors? if row_parsers.any?(&:block_log_creation?) Sentry.capture_message("Bulk upload log creation blocked: #{bulk_upload.id}.") - return false + return "row_parser_block_log_creation" end if any_logs_already_exist? && FeatureToggle.bulk_upload_duplicate_log_check_enabled? - Sentry.capture_message("Bulk upload log creation blocked due to duplicate logs: #{bulk_upload.id}.") - return false + return "duplicate_logs" end row_parsers.each do |row_parser| row_parser.log.blank_invalid_non_setup_fields! end - if any_logs_invalid? Sentry.capture_message("Bulk upload log creation blocked due to invalid logs after blanking non setup fields: #{bulk_upload.id}.") - return false + "logs_invalid" end - - true end def self.question_for_field(field) diff --git a/app/services/bulk_upload/processor.rb b/app/services/bulk_upload/processor.rb index 38f67ede4..c54032fda 100644 --- a/app/services/bulk_upload/processor.rb +++ b/app/services/bulk_upload/processor.rb @@ -36,20 +36,28 @@ class BulkUpload::Processor if validator.any_setup_errors? send_setup_errors_mail - - elsif validator.create_logs? - create_logs - - if validator.soft_validation_errors_only? - send_check_soft_validations_mail - elsif created_logs_but_incompleted? - send_how_to_fix_upload_mail - elsif created_logs_and_all_completed? - bulk_upload.unpend - send_success_mail - end else - send_correct_and_upload_again_mail # summary/full report + block_creation_reason = validator.block_log_creation_reason + + if block_creation_reason.present? + case block_creation_reason + when "duplicate_logs" + send_correct_duplicates_and_upload_again_mail + else + send_correct_and_upload_again_mail # summary/full report + end + else + create_logs + + if validator.soft_validation_errors_only? + send_check_soft_validations_mail + elsif created_logs_but_incompleted? + send_how_to_fix_upload_mail + elsif created_logs_and_all_completed? + bulk_upload.unpend + send_success_mail + end + end end rescue StandardError => e Sentry.capture_exception(e) @@ -97,6 +105,12 @@ private .deliver_later end + def send_correct_duplicates_and_upload_again_mail + BulkUploadMailer + .send_correct_duplicates_and_upload_again_mail(bulk_upload:) + .deliver_later + end + def send_success_mail BulkUploadMailer .send_bulk_upload_complete_mail(user:, bulk_upload:) diff --git a/app/services/bulk_upload/sales/validator.rb b/app/services/bulk_upload/sales/validator.rb index 76fb6f1ae..7ad9638d7 100644 --- a/app/services/bulk_upload/sales/validator.rb +++ b/app/services/bulk_upload/sales/validator.rb @@ -39,17 +39,17 @@ class BulkUpload::Sales::Validator end end - def create_logs? - return false if any_setup_errors? + def block_log_creation_reason + return "setup_errors" if any_setup_errors? if row_parsers.any?(&:block_log_creation?) Sentry.capture_message("Bulk upload log creation blocked: #{bulk_upload.id}.") - return false + return "row_parser_block_log_creation" end if any_logs_already_exist? && FeatureToggle.bulk_upload_duplicate_log_check_enabled? Sentry.capture_message("Bulk upload log creation blocked due to duplicate logs: #{bulk_upload.id}.") - return false + return "duplicate_logs" end row_parsers.each do |row_parser| @@ -58,10 +58,8 @@ class BulkUpload::Sales::Validator if any_logs_invalid? Sentry.capture_message("Bulk upload log creation blocked due to invalid logs after blanking non setup fields: #{bulk_upload.id}.") - return false + "logs_invalid" end - - true end def any_setup_errors? diff --git a/spec/mailers/bulk_upload_mailer_spec.rb b/spec/mailers/bulk_upload_mailer_spec.rb index c3225c937..910bca4a9 100644 --- a/spec/mailers/bulk_upload_mailer_spec.rb +++ b/spec/mailers/bulk_upload_mailer_spec.rb @@ -121,4 +121,29 @@ RSpec.describe BulkUploadMailer do mailer.send_check_soft_validations_mail(bulk_upload:) end end + + describe "#send_correct_duplicates_and_upload_again_mail" do + context "when 2 columns with errors" do + before do + create(:bulk_upload_error, bulk_upload:, col: "A") + create(:bulk_upload_error, bulk_upload:, col: "B") + end + + it "sends correctly formed email" do + expect(notify_client).to receive(:send_email).with( + email_address: user.email, + template_id: described_class::FAILED_CSV_DUPLICATE_ERRORS_TEMPLATE_ID, + personalisation: { + filename: bulk_upload.filename, + upload_timestamp: bulk_upload.created_at.to_fs(:govuk_date_and_time), + year_combo: bulk_upload.year_combo, + lettings_or_sales: bulk_upload.log_type, + summary_report_link: "http://localhost:3000/lettings-logs/bulk-upload-results/#{bulk_upload.id}", + }, + ) + + mailer.send_correct_duplicates_and_upload_again_mail(bulk_upload:) + end + end + end end diff --git a/spec/services/bulk_upload/lettings/validator_spec.rb b/spec/services/bulk_upload/lettings/validator_spec.rb index 897010de6..60eb8a955 100644 --- a/spec/services/bulk_upload/lettings/validator_spec.rb +++ b/spec/services/bulk_upload/lettings/validator_spec.rb @@ -232,7 +232,7 @@ RSpec.describe BulkUpload::Lettings::Validator do end end - describe "#create_logs?" do + describe "#block_log_creation_reason" do context "when a log has a clearable, non-setup error" do let(:log_1) { build(:lettings_log, :completed, period: 2, assigned_to: user) } let(:log_2) { build(:lettings_log, :completed, period: 2, assigned_to: user, age1: 5) } @@ -245,7 +245,7 @@ RSpec.describe BulkUpload::Lettings::Validator do it "returns false" do validator.call - expect(validator).to be_create_logs + expect(validator.block_log_creation_reason).to be_nil end end @@ -261,7 +261,7 @@ RSpec.describe BulkUpload::Lettings::Validator do it "returns true" do validator.call - expect(validator).to be_create_logs + expect(validator.block_log_creation_reason).to be_nil end end @@ -277,7 +277,7 @@ RSpec.describe BulkUpload::Lettings::Validator do it "will not create logs" do validator.call - expect(validator).not_to be_create_logs + expect(validator.block_log_creation_reason).to eq("setup_errors") end end @@ -291,7 +291,7 @@ RSpec.describe BulkUpload::Lettings::Validator do it "returns false" do validator.call - expect(validator).not_to be_create_logs + expect(validator.block_log_creation_reason).to eq("setup_errors") end end end diff --git a/spec/services/bulk_upload/processor_spec.rb b/spec/services/bulk_upload/processor_spec.rb index de0ed2dba..0368635e7 100644 --- a/spec/services/bulk_upload/processor_spec.rb +++ b/spec/services/bulk_upload/processor_spec.rb @@ -14,7 +14,7 @@ RSpec.describe BulkUpload::Processor do call: nil, total_logs_count: 1, any_setup_errors?: false, - create_logs?: true, + block_log_creation_reason: nil, soft_validation_errors_only?: false, ) end @@ -165,7 +165,7 @@ RSpec.describe BulkUpload::Processor do let(:log) { build(:lettings_log, :setup_completed, assigned_to: user) } before do - allow(mock_validator).to receive(:create_logs?).and_return(true) + allow(mock_validator).to receive(:block_log_creation_reason).and_return(nil) allow(mock_validator).to receive(:soft_validation_errors_only?).and_return(false) allow(FeatureToggle).to receive(:bulk_upload_duplicate_log_check_enabled?).and_return(true) end @@ -198,7 +198,7 @@ RSpec.describe BulkUpload::Processor do context "when a bulk upload has logs with only soft validations triggered" do before do - allow(mock_validator).to receive(:create_logs?).and_return(true) + allow(mock_validator).to receive(:block_log_creation_reason).and_return(nil) allow(mock_validator).to receive(:soft_validation_errors_only?).and_return(true) allow(FeatureToggle).to receive(:bulk_upload_duplicate_log_check_enabled?).and_return(true) end @@ -239,7 +239,7 @@ RSpec.describe BulkUpload::Processor do call: nil, total_logs_count: 1, any_setup_errors?: false, - create_logs?: false, + block_log_creation_reason: "row_parser_block_log_creation", ) end @@ -254,6 +254,30 @@ RSpec.describe BulkUpload::Processor do expect(mail_double).to have_received(:deliver_later) end end + + context "when upload has duplicate logs blocking log creation" do + let(:mock_validator) do + instance_double( + BulkUpload::Lettings::Validator, + invalid?: false, + call: nil, + total_logs_count: 1, + any_setup_errors?: false, + block_log_creation_reason: "duplicate_logs", + ) + end + + it "sends correct_and_upload_again_mail" do + mail_double = instance_double("ActionMailer::MessageDelivery", deliver_later: nil) + + allow(BulkUploadMailer).to receive(:send_correct_duplicates_and_upload_again_mail).and_return(mail_double) + + processor.call + + expect(BulkUploadMailer).to have_received(:send_correct_duplicates_and_upload_again_mail) + expect(mail_double).to have_received(:deliver_later) + end + end end describe "#approve" do diff --git a/spec/services/bulk_upload/sales/validator_spec.rb b/spec/services/bulk_upload/sales/validator_spec.rb index c275ce681..968014e7c 100644 --- a/spec/services/bulk_upload/sales/validator_spec.rb +++ b/spec/services/bulk_upload/sales/validator_spec.rb @@ -204,7 +204,7 @@ RSpec.describe BulkUpload::Sales::Validator do end end - describe "#create_logs?" do + describe "#block_log_creation_reason" do context "when all logs are valid" do let(:log_1) { build(:sales_log, :completed, assigned_to: user) } let(:log_2) { build(:sales_log, :completed, assigned_to: user) } @@ -214,9 +214,9 @@ RSpec.describe BulkUpload::Sales::Validator do file.write(BulkUpload::SalesLogToCsv.new(log: log_2).to_csv_row) end - it "returns truthy" do + it "returns nil" do validator.call - expect(validator).to be_create_logs + expect(validator.block_log_creation_reason).to be_nil end end @@ -229,9 +229,9 @@ RSpec.describe BulkUpload::Sales::Validator do file.write(BulkUpload::SalesLogToCsv.new(log: log_2).to_csv_row) end - it "returns truthy" do + it "returns nil" do validator.call - expect(validator).to be_create_logs + expect(validator.block_log_creation_reason).to be_nil end end @@ -245,9 +245,9 @@ RSpec.describe BulkUpload::Sales::Validator do file.close end - it "returns false" do + it "returns the reason" do validator.call - expect(validator).not_to be_create_logs + expect(validator.block_log_creation_reason).to eq("setup_errors") end end @@ -262,7 +262,7 @@ RSpec.describe BulkUpload::Sales::Validator do it "will not create logs" do validator.call - expect(validator).not_to be_create_logs + expect(validator.block_log_creation_reason).to eq("setup_errors") end end end From 43ae7add3cd02ac2f6be10033c808d1d95b77f80 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Wed, 11 Dec 2024 13:21:47 +0000 Subject: [PATCH 12/30] Patch rails (#2861) --- Gemfile | 2 +- Gemfile.lock | 124 +++++++++++++++++++++++++-------------------------- 2 files changed, 63 insertions(+), 63 deletions(-) diff --git a/Gemfile b/Gemfile index e9af29d55..027ed10d0 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby "3.1.4" # Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main' -gem "rails", "~> 7.0.8.5" +gem "rails", "~> 7.0.8.7" # Use postgresql as the database for Active Record gem "pg", "~> 1.1" # Use Puma as the app server diff --git a/Gemfile.lock b/Gemfile.lock index d2a5de05d..329c92051 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,71 +1,71 @@ GEM remote: https://rubygems.org/ specs: - actioncable (7.0.8.5) - actionpack (= 7.0.8.5) - activesupport (= 7.0.8.5) + actioncable (7.0.8.7) + actionpack (= 7.0.8.7) + activesupport (= 7.0.8.7) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.8.5) - actionpack (= 7.0.8.5) - activejob (= 7.0.8.5) - activerecord (= 7.0.8.5) - activestorage (= 7.0.8.5) - activesupport (= 7.0.8.5) + actionmailbox (7.0.8.7) + actionpack (= 7.0.8.7) + activejob (= 7.0.8.7) + activerecord (= 7.0.8.7) + activestorage (= 7.0.8.7) + activesupport (= 7.0.8.7) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.8.5) - actionpack (= 7.0.8.5) - actionview (= 7.0.8.5) - activejob (= 7.0.8.5) - activesupport (= 7.0.8.5) + actionmailer (7.0.8.7) + actionpack (= 7.0.8.7) + actionview (= 7.0.8.7) + activejob (= 7.0.8.7) + activesupport (= 7.0.8.7) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.8.5) - actionview (= 7.0.8.5) - activesupport (= 7.0.8.5) + actionpack (7.0.8.7) + actionview (= 7.0.8.7) + activesupport (= 7.0.8.7) rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.8.5) - actionpack (= 7.0.8.5) - activerecord (= 7.0.8.5) - activestorage (= 7.0.8.5) - activesupport (= 7.0.8.5) + actiontext (7.0.8.7) + actionpack (= 7.0.8.7) + activerecord (= 7.0.8.7) + activestorage (= 7.0.8.7) + activesupport (= 7.0.8.7) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.8.5) - activesupport (= 7.0.8.5) + actionview (7.0.8.7) + activesupport (= 7.0.8.7) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.8.5) - activesupport (= 7.0.8.5) + activejob (7.0.8.7) + activesupport (= 7.0.8.7) globalid (>= 0.3.6) - activemodel (7.0.8.5) - activesupport (= 7.0.8.5) + activemodel (7.0.8.7) + activesupport (= 7.0.8.7) activemodel-serializers-xml (1.0.2) activemodel (> 5.x) activesupport (> 5.x) builder (~> 3.1) - activerecord (7.0.8.5) - activemodel (= 7.0.8.5) - activesupport (= 7.0.8.5) - activestorage (7.0.8.5) - actionpack (= 7.0.8.5) - activejob (= 7.0.8.5) - activerecord (= 7.0.8.5) - activesupport (= 7.0.8.5) + activerecord (7.0.8.7) + activemodel (= 7.0.8.7) + activesupport (= 7.0.8.7) + activestorage (7.0.8.7) + actionpack (= 7.0.8.7) + activejob (= 7.0.8.7) + activerecord (= 7.0.8.7) + activesupport (= 7.0.8.7) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.8.5) + activesupport (7.0.8.7) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -149,7 +149,7 @@ GEM crass (1.0.6) cssbundling-rails (1.4.0) railties (>= 6.0.0) - date (3.3.4) + date (3.4.1) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) devise (4.9.3) @@ -258,13 +258,13 @@ GEM matrix (0.4.2) method_source (1.1.0) mini_mime (1.1.5) - minitest (5.25.1) + minitest (5.25.4) msgpack (1.7.2) multipart-post (2.4.1) nested_form (0.3.2) net-http (0.4.1) uri - net-imap (0.4.17) + net-imap (0.5.1) date net-protocol net-pop (0.1.2) @@ -273,12 +273,12 @@ GEM timeout net-smtp (0.5.0) net-protocol - nio4r (2.7.3) - nokogiri (1.16.8-arm64-darwin) + nio4r (2.7.4) + nokogiri (1.17.1-arm64-darwin) racc (~> 1.4) - nokogiri (1.16.8-x86_64-darwin) + nokogiri (1.17.1-x86_64-darwin) racc (~> 1.4) - nokogiri (1.16.8-x86_64-linux) + nokogiri (1.17.1-x86_64-linux) racc (~> 1.4) notifications-ruby-client (6.0.0) jwt (>= 1.5, < 3) @@ -327,20 +327,20 @@ GEM rack (>= 1.2.0) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.8.5) - actioncable (= 7.0.8.5) - actionmailbox (= 7.0.8.5) - actionmailer (= 7.0.8.5) - actionpack (= 7.0.8.5) - actiontext (= 7.0.8.5) - actionview (= 7.0.8.5) - activejob (= 7.0.8.5) - activemodel (= 7.0.8.5) - activerecord (= 7.0.8.5) - activestorage (= 7.0.8.5) - activesupport (= 7.0.8.5) + rails (7.0.8.7) + actioncable (= 7.0.8.7) + actionmailbox (= 7.0.8.7) + actionmailer (= 7.0.8.7) + actionpack (= 7.0.8.7) + actiontext (= 7.0.8.7) + actionview (= 7.0.8.7) + activejob (= 7.0.8.7) + activemodel (= 7.0.8.7) + activerecord (= 7.0.8.7) + activestorage (= 7.0.8.7) + activesupport (= 7.0.8.7) bundler (>= 1.15.0) - railties (= 7.0.8.5) + railties (= 7.0.8.7) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -354,9 +354,9 @@ GEM nested_form (~> 0.3) rails (>= 6.0, < 8) turbo-rails (~> 1.0) - railties (7.0.8.5) - actionpack (= 7.0.8.5) - activesupport (= 7.0.8.5) + railties (7.0.8.7) + actionpack (= 7.0.8.7) + activesupport (= 7.0.8.7) method_source rake (>= 12.2) thor (~> 1.0) @@ -465,7 +465,7 @@ GEM thor (1.3.2) thread_safe (0.3.6) timecop (0.9.8) - timeout (0.4.1) + timeout (0.4.2) turbo-rails (1.5.0) actionpack (>= 6.0.0) activejob (>= 6.0.0) @@ -553,7 +553,7 @@ DEPENDENCIES rack (>= 2.2.6.3) rack-attack rack-mini-profiler (~> 2.0) - rails (~> 7.0.8.5) + rails (~> 7.0.8.7) rails_admin (~> 3.1) redcarpet (~> 3.6) redis (~> 4.8) From a7964e64588941c8800c2c9814a4775b5eab32b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:51:59 +0000 Subject: [PATCH 13/30] Bump nanoid from 3.3.7 to 3.3.8 (#2863) Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8. - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md) - [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8) --- updated-dependencies: - dependency-name: nanoid dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3e9afa0d8..94b220fe1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4335,9 +4335,9 @@ mute-stream@0.0.8: integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== nanoid@^3.3.7: - version "3.3.7" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" - integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== + version "3.3.8" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" + integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w== natural-compare@^1.4.0: version "1.4.0" From ca2d670116f1399fd48db3d07fd36c63ec963020 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:52:13 +0000 Subject: [PATCH 14/30] CLDC-3748 Check org name uniqueness (#2818) * Check org name uniqueness * Some tests * Do not update org name * Update some request specs * Remove unnecessary updates * Update error message --- app/controllers/organisations_controller.rb | 1 + app/models/organisation.rb | 1 + config/locales/en.yml | 1 + .../20241125153349_add_unique_index_to_org_name.rb | 5 +++++ db/schema.rb | 1 + spec/fixtures/exports/general_needs_log.xml | 4 ++-- spec/fixtures/exports/general_needs_log_23_24.xml | 4 ++-- spec/fixtures/exports/general_needs_log_24_25.xml | 4 ++-- spec/fixtures/exports/organisation.xml | 2 +- spec/fixtures/exports/supported_housing_logs.xml | 4 ++-- spec/fixtures/exports/user.xml | 2 +- .../lettings/questions/managing_organisation_spec.rb | 2 +- spec/models/organisation_spec.rb | 6 ++++++ .../organisation_relationships_controller_spec.rb | 8 ++++---- spec/requests/organisations_controller_spec.rb | 10 ++++++++-- .../exports/lettings_log_export_service_spec.rb | 2 ++ .../exports/organisation_export_service_spec.rb | 1 + spec/services/exports/user_export_service_spec.rb | 1 + 18 files changed, 42 insertions(+), 17 deletions(-) create mode 100644 db/migrate/20241125153349_add_unique_index_to_org_name.rb diff --git a/app/controllers/organisations_controller.rb b/app/controllers/organisations_controller.rb index 8ffe426d7..93b667a99 100644 --- a/app/controllers/organisations_controller.rb +++ b/app/controllers/organisations_controller.rb @@ -155,6 +155,7 @@ class OrganisationsController < ApplicationController end redirect_to details_organisation_path(@organisation) else + @used_rent_periods = @organisation.lettings_logs.pluck(:period).uniq.compact.map(&:to_s) @rent_periods = helpers.rent_periods_with_checked_attr(checked_periods: selected_rent_periods) render :edit, status: :unprocessable_entity end diff --git a/app/models/organisation.rb b/app/models/organisation.rb index 23f91f1ad..69c80d198 100644 --- a/app/models/organisation.rb +++ b/app/models/organisation.rb @@ -58,6 +58,7 @@ class Organisation < ApplicationRecord alias_method :la?, :LA? validates :name, presence: { message: I18n.t("validations.organisation.name_missing") } + validates :name, uniqueness: { case_sensitive: false, message: I18n.t("validations.organisation.name_not_unique") } validates :provider_type, presence: { message: I18n.t("validations.organisation.provider_type_missing") } def self.find_by_id_on_multiple_fields(id) diff --git a/config/locales/en.yml b/config/locales/en.yml index 851a9ea2c..965c1f7a6 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -235,6 +235,7 @@ en: organisation: data_sharing_agreement_not_signed: "Your organisation must accept the Data Sharing Agreement before you can create any logs." name_missing: "Enter the name of the organisation." + name_not_unique: "An organisation with this name already exists. Use the organisation that already exists or add a location or other identifier to the name. For example: Organisation name (City)." provider_type_missing: "Select the organisation type." stock_owner: blank: "You must choose a stock owner." diff --git a/db/migrate/20241125153349_add_unique_index_to_org_name.rb b/db/migrate/20241125153349_add_unique_index_to_org_name.rb new file mode 100644 index 000000000..a7a124183 --- /dev/null +++ b/db/migrate/20241125153349_add_unique_index_to_org_name.rb @@ -0,0 +1,5 @@ +class AddUniqueIndexToOrgName < ActiveRecord::Migration[7.0] + def change + add_index :organisations, :name, unique: true + end +end diff --git a/db/schema.rb b/db/schema.rb index d31a54da2..1a1c127c6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -546,6 +546,7 @@ ActiveRecord::Schema[7.0].define(version: 2024_12_04_100518) do t.datetime "discarded_at" t.datetime "schemes_deduplicated_at" t.index ["absorbing_organisation_id"], name: "index_organisations_on_absorbing_organisation_id" + t.index ["name"], name: "index_organisations_on_name", unique: true t.index ["old_visible_id"], name: "index_organisations_on_old_visible_id", unique: true end diff --git a/spec/fixtures/exports/general_needs_log.xml b/spec/fixtures/exports/general_needs_log.xml index bacc7e9f0..0341dd2d4 100644 --- a/spec/fixtures/exports/general_needs_log.xml +++ b/spec/fixtures/exports/general_needs_log.xml @@ -147,10 +147,10 @@ {id} {owning_org_id} - MHCLG + {owning_org_name} 1234 {managing_org_id} - MHCLG + {managing_org_name} 1234 2022-05-01T00:00:00+01:00 2022-05-01T00:00:00+01:00 diff --git a/spec/fixtures/exports/general_needs_log_23_24.xml b/spec/fixtures/exports/general_needs_log_23_24.xml index 9635cd0e4..ef0c4066c 100644 --- a/spec/fixtures/exports/general_needs_log_23_24.xml +++ b/spec/fixtures/exports/general_needs_log_23_24.xml @@ -148,10 +148,10 @@ {id} {owning_org_id} - MHCLG + {owning_org_name} 1234 {managing_org_id} - MHCLG + {managing_org_name} 1234 2023-04-03T00:00:00+01:00 2023-04-03T00:00:00+01:00 diff --git a/spec/fixtures/exports/general_needs_log_24_25.xml b/spec/fixtures/exports/general_needs_log_24_25.xml index a665a284e..00d8bb1a5 100644 --- a/spec/fixtures/exports/general_needs_log_24_25.xml +++ b/spec/fixtures/exports/general_needs_log_24_25.xml @@ -161,10 +161,10 @@ la as entered {id} {owning_org_id} - MHCLG + {owning_org_name} 1234 {managing_org_id} - MHCLG + {managing_org_name} 1234 2024-04-03T00:00:00+01:00 2024-04-03T00:00:00+01:00 diff --git a/spec/fixtures/exports/organisation.xml b/spec/fixtures/exports/organisation.xml index 8d87da16c..70c699915 100644 --- a/spec/fixtures/exports/organisation.xml +++ b/spec/fixtures/exports/organisation.xml @@ -2,7 +2,7 @@
{id} - MHCLG + {name} 1 2 Marsham Street diff --git a/spec/fixtures/exports/supported_housing_logs.xml b/spec/fixtures/exports/supported_housing_logs.xml index 50649241b..310d5ba2b 100644 --- a/spec/fixtures/exports/supported_housing_logs.xml +++ b/spec/fixtures/exports/supported_housing_logs.xml @@ -146,10 +146,10 @@ {id} {owning_org_id} - MHCLG + {owning_org_name} 1234 {managing_org_id} - MHCLG + {managing_org_name} 1234 2022-05-01T00:00:00+01:00 2022-05-01T00:00:00+01:00 diff --git a/spec/fixtures/exports/user.xml b/spec/fixtures/exports/user.xml index 5652ac9c6..d29a33225 100644 --- a/spec/fixtures/exports/user.xml +++ b/spec/fixtures/exports/user.xml @@ -12,6 +12,6 @@ false false true - MHCLG + {organisation_name}
diff --git a/spec/models/form/lettings/questions/managing_organisation_spec.rb b/spec/models/form/lettings/questions/managing_organisation_spec.rb index 776a873a6..00485e80f 100644 --- a/spec/models/form/lettings/questions/managing_organisation_spec.rb +++ b/spec/models/form/lettings/questions/managing_organisation_spec.rb @@ -185,7 +185,7 @@ RSpec.describe Form::Lettings::Questions::ManagingOrganisation, type: :model do context "when organisation has merged" do let(:absorbing_org) { create(:organisation, name: "Absorbing org", holds_own_stock: true) } let!(:merged_org) { create(:organisation, name: "Merged org", holds_own_stock: false) } - let!(:merged_deleted_org) { create(:organisation, name: "Merged org", holds_own_stock: false, discarded_at: Time.zone.yesterday) } + let!(:merged_deleted_org) { create(:organisation, name: "Merged org 2", holds_own_stock: false, discarded_at: Time.zone.yesterday) } let(:user) { create(:user, :data_coordinator, organisation: absorbing_org) } let(:log) do diff --git a/spec/models/organisation_spec.rb b/spec/models/organisation_spec.rb index 9b01845ae..b117feef7 100644 --- a/spec/models/organisation_spec.rb +++ b/spec/models/organisation_spec.rb @@ -19,6 +19,12 @@ RSpec.describe Organisation, type: :model do .to raise_error(ActiveRecord::RecordInvalid, "Validation failed: Provider type #{I18n.t('validations.organisation.provider_type_missing')}") end + it "validates uniqueness of name" do + org = build(:organisation, name: organisation.name.downcase) + org.valid? + expect(org.errors[:name]).to include(I18n.t("validations.organisation.name_not_unique")) + end + context "with parent/child associations", :aggregate_failures do let!(:child_organisation) { create(:organisation, name: "MHCLG Child") } let!(:grandchild_organisation) { create(:organisation, name: "MHCLG Grandchild") } diff --git a/spec/requests/organisation_relationships_controller_spec.rb b/spec/requests/organisation_relationships_controller_spec.rb index 8e8dc4f2d..8733fba4b 100644 --- a/spec/requests/organisation_relationships_controller_spec.rb +++ b/spec/requests/organisation_relationships_controller_spec.rb @@ -58,7 +58,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do context "when adding a stock owner" do let!(:active_organisation) { FactoryBot.create(:organisation, name: "Active Org", active: true) } - let!(:inactive_organisation) { FactoryBot.create(:organisation, name: "Inactive LTD", active: false) } + let!(:inactive_organisation) { FactoryBot.create(:organisation, name: "Inactive LTD 2", active: false) } before do get "/organisations/#{organisation.id}/stock-owners/add", headers:, params: {} @@ -115,7 +115,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do let!(:managing_agent) { FactoryBot.create(:organisation) } let!(:other_org_managing_agent) { FactoryBot.create(:organisation, name: "Foobar LTD") } let!(:inactive_managing_agent) { FactoryBot.create(:organisation, name: "Inactive LTD", active: false) } - let!(:other_organisation) { FactoryBot.create(:organisation, name: "Foobar LTD") } + let!(:other_organisation) { FactoryBot.create(:organisation, name: "Foobar LTD 3") } before do FactoryBot.create(:organisation_relationship, parent_organisation: organisation, child_organisation: managing_agent) @@ -316,7 +316,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do context "with an organisation that the user belongs to" do let!(:stock_owner) { FactoryBot.create(:organisation) } let!(:other_org_stock_owner) { FactoryBot.create(:organisation, name: "Foobar LTD") } - let!(:other_organisation) { FactoryBot.create(:organisation, name: "Foobar LTD") } + let!(:other_organisation) { FactoryBot.create(:organisation, name: "Foobar LTD 2") } before do FactoryBot.create(:organisation_relationship, child_organisation: organisation, parent_organisation: stock_owner) @@ -452,7 +452,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do context "with an organisation that the user belongs to" do let!(:managing_agent) { FactoryBot.create(:organisation) } let!(:other_org_managing_agent) { FactoryBot.create(:organisation, name: "Foobar LTD") } - let!(:other_organisation) { FactoryBot.create(:organisation, name: "Foobar LTD") } + let!(:other_organisation) { FactoryBot.create(:organisation, name: "Foobar LTD 5") } before do FactoryBot.create(:organisation_relationship, parent_organisation: organisation, child_organisation: managing_agent) diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index 26723a563..6c01e50bf 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -1555,7 +1555,10 @@ RSpec.describe OrganisationsController, type: :request do let(:total_organisations_count) { Organisation.all.count } before do - create_list(:organisation, 25) + build_list(:organisation, 25) do |organisation, index| + organisation.name = "Organisation #{index}" + organisation.save! + end get "/organisations" end @@ -1644,7 +1647,10 @@ RSpec.describe OrganisationsController, type: :request do let(:search_param) { "MHCLG" } before do - create_list(:organisation, 27, name: "MHCLG") + build_list(:organisation, 27) do |organisation, index| + organisation.name = "MHCLG #{index}" + organisation.save! + end get "/organisations?search=#{search_param}" end diff --git a/spec/services/exports/lettings_log_export_service_spec.rb b/spec/services/exports/lettings_log_export_service_spec.rb index 8c123b47e..c0dde5771 100644 --- a/spec/services/exports/lettings_log_export_service_spec.rb +++ b/spec/services/exports/lettings_log_export_service_spec.rb @@ -21,7 +21,9 @@ RSpec.describe Exports::LettingsLogExportService do def replace_entity_ids(lettings_log, export_template) export_template.sub!(/\{id\}/, (lettings_log["id"] + Exports::LettingsLogExportService::LOG_ID_OFFSET).to_s) export_template.sub!(/\{owning_org_id\}/, (lettings_log["owning_organisation_id"] + Exports::LettingsLogExportService::LOG_ID_OFFSET).to_s) + export_template.sub!(/\{owning_org_name\}/, lettings_log.owning_organisation.name) export_template.sub!(/\{managing_org_id\}/, (lettings_log["managing_organisation_id"] + Exports::LettingsLogExportService::LOG_ID_OFFSET).to_s) + export_template.sub!(/\{managing_org_name\}/, lettings_log.managing_organisation.name) export_template.sub!(/\{location_id\}/, (lettings_log["location_id"]).to_s) if lettings_log.needstype == 2 export_template.sub!(/\{scheme_id\}/, (lettings_log["scheme_id"]).to_s) if lettings_log.needstype == 2 export_template.sub!(/\{log_id\}/, lettings_log["id"].to_s) diff --git a/spec/services/exports/organisation_export_service_spec.rb b/spec/services/exports/organisation_export_service_spec.rb index 43ca19095..51c8fe8cf 100644 --- a/spec/services/exports/organisation_export_service_spec.rb +++ b/spec/services/exports/organisation_export_service_spec.rb @@ -16,6 +16,7 @@ RSpec.describe Exports::OrganisationExportService do def replace_entity_ids(organisation, export_template) export_template.sub!(/\{id\}/, organisation["id"].to_s) + export_template.sub!(/\{name\}/, organisation["name"]) export_template.sub!(/\{dsa_signed_at\}/, organisation.data_protection_confirmation&.signed_at.to_s) export_template.sub!(/\{dpo_email\}/, organisation.data_protection_confirmation&.data_protection_officer_email) end diff --git a/spec/services/exports/user_export_service_spec.rb b/spec/services/exports/user_export_service_spec.rb index 8a0e22267..854dd1ce7 100644 --- a/spec/services/exports/user_export_service_spec.rb +++ b/spec/services/exports/user_export_service_spec.rb @@ -17,6 +17,7 @@ RSpec.describe Exports::UserExportService do def replace_entity_ids(user, export_template) export_template.sub!(/\{id\}/, user["id"].to_s) export_template.sub!(/\{organisation_id\}/, user["organisation_id"].to_s) + export_template.sub!(/\{organisation_name\}/, user.organisation.name) export_template.sub!(/\{email\}/, user["email"].to_s) end From 1c03a70fa2268e293c59453ec7789c6c94349452 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:20:28 +0000 Subject: [PATCH 15/30] CLDC-3769 Fix some check errors flows (#2826) * Fix some check errors flows * Only show check errors journey for question on different pages * Update restore_error_field_values --- app/controllers/form_controller.rb | 11 ++++++++--- app/helpers/form_page_error_helper.rb | 5 +++-- .../form/sales/pages/owning_organisation.rb | 2 ++ app/models/validations/property_validations.rb | 2 ++ .../validations/sales/property_validations.rb | 2 ++ app/views/form/page.html.erb | 4 ++-- spec/features/form/page_routing_spec.rb | 16 +++++++++++++++- spec/requests/check_errors_controller_spec.rb | 2 +- 8 files changed, 35 insertions(+), 9 deletions(-) diff --git a/app/controllers/form_controller.rb b/app/controllers/form_controller.rb index 7ce63e609..3e029371d 100644 --- a/app/controllers/form_controller.rb +++ b/app/controllers/form_controller.rb @@ -105,8 +105,13 @@ private def restore_error_field_values(previous_responses) return unless previous_responses - previous_responses_to_reset = previous_responses.reject do |key, _| - @log.form.get_question(key, @log)&.type == "date" + previous_responses_to_reset = previous_responses.reject do |key, value| + if @log.form.get_question(key, @log)&.type == "date" && value.present? + year = value.split("-").first.to_i + year&.zero? + else + false + end end @log.assign_attributes(previous_responses_to_reset) @@ -433,7 +438,7 @@ private @log.valid? @log.reload error_attributes = @log.errors.map(&:attribute) - @questions = @log.form.questions.select { |q| error_attributes.include?(q.id.to_sym) } + @questions = @log.form.questions.select { |q| error_attributes.include?(q.id.to_sym) && q.page.routed_to?(@log, current_user) } end render "form/check_errors" end diff --git a/app/helpers/form_page_error_helper.rb b/app/helpers/form_page_error_helper.rb index 2c90bfd2a..bf4e1db08 100644 --- a/app/helpers/form_page_error_helper.rb +++ b/app/helpers/form_page_error_helper.rb @@ -13,7 +13,8 @@ module FormPageErrorHelper end end - def all_questions_affected_by_errors(log) - (log.errors.map(&:attribute) - [:base]).uniq + def all_pages_affected_by_errors(log) + question_ids = (log.errors.map(&:attribute) - [:base]).uniq + question_ids.map { |id| log.form.get_question(id, log)&.page&.id }.compact.uniq end end diff --git a/app/models/form/sales/pages/owning_organisation.rb b/app/models/form/sales/pages/owning_organisation.rb index f0c9e4e68..f1875d52d 100644 --- a/app/models/form/sales/pages/owning_organisation.rb +++ b/app/models/form/sales/pages/owning_organisation.rb @@ -20,11 +20,13 @@ class Form::Sales::Pages::OwningOrganisation < ::Form::Page if current_user.organisation.holds_own_stock? return true if current_user.organisation.absorbed_organisations.any?(&:holds_own_stock?) return true if stock_owners.count >= 1 + return false if log.owning_organisation == current_user.organisation log.update!(owning_organisation: current_user.organisation) else return false if stock_owners.count.zero? return true if stock_owners.count > 1 + return false if log.owning_organisation == stock_owners.first log.update!(owning_organisation: stock_owners.first) end diff --git a/app/models/validations/property_validations.rb b/app/models/validations/property_validations.rb index e9eba8184..1cf710857 100644 --- a/app/models/validations/property_validations.rb +++ b/app/models/validations/property_validations.rb @@ -41,6 +41,8 @@ module Validations::PropertyValidations def validate_property_postcode(record) postcode = record.postcode_full + return unless postcode + if record.postcode_known? && (postcode.blank? || !postcode.match(POSTCODE_REGEXP)) error_message = I18n.t("validations.lettings.property.postcode_full.invalid") record.errors.add :postcode_full, :wrong_format, message: error_message diff --git a/app/models/validations/sales/property_validations.rb b/app/models/validations/sales/property_validations.rb index 2238a634a..7fd4d2440 100644 --- a/app/models/validations/sales/property_validations.rb +++ b/app/models/validations/sales/property_validations.rb @@ -31,6 +31,8 @@ module Validations::Sales::PropertyValidations def validate_property_postcode(record) postcode = record.postcode_full + return unless postcode + if record.postcode_known? && (postcode.blank? || !postcode.match(POSTCODE_REGEXP)) error_message = I18n.t("validations.sales.property_information.postcode_full.invalid") record.errors.add :postcode_full, :wrong_format, message: error_message diff --git a/app/views/form/page.html.erb b/app/views/form/page.html.erb index 95dc38ec6..7379de0eb 100644 --- a/app/views/form/page.html.erb +++ b/app/views/form/page.html.erb @@ -16,7 +16,7 @@ <%= form_with model: @log, url: request.original_url, method: "post", local: true do |f| %>
- <% all_questions_with_errors = all_questions_affected_by_errors(@log) %> + <% all_pages_with_errors = all_pages_affected_by_errors(@log) %> <% remove_other_page_errors(@log, @page) %> <%= f.govuk_error_summary %> @@ -76,7 +76,7 @@ <%= f.hidden_field :check_errors, value: @check_errors %> <% end %> - <% if all_questions_with_errors.count > 1 %> + <% if all_pages_with_errors.count > 1 %>
<%= f.submit "See all related answers", name: "check_errors", class: "govuk-body govuk-link submit-button-link" %>
diff --git a/spec/features/form/page_routing_spec.rb b/spec/features/form/page_routing_spec.rb index 42a2c25fb..118b52543 100644 --- a/spec/features/form/page_routing_spec.rb +++ b/spec/features/form/page_routing_spec.rb @@ -92,7 +92,7 @@ RSpec.describe "Form Page Routing" do expect(find("#lettings-log-postcode-full-field-error").value).to eq("FAKE_POSTCODE") end - it "does not reset the displayed date" do + it "does not reset the displayed date if it's an invalid date" do lettings_log.update!(startdate: "2021/10/13") visit("/lettings-logs/#{id}/tenancy-start-date") fill_in("lettings_log[startdate(1i)]", with: "202") @@ -106,6 +106,20 @@ RSpec.describe "Form Page Routing" do expect(find_field("lettings_log[startdate(1i)]").value).to eq("2021") end + it "displays the entered date if it's in a valid format" do + lettings_log.update!(startdate: "2021/10/13") + visit("/lettings-logs/#{id}/tenancy-start-date") + fill_in("lettings_log[startdate(1i)]", with: "202") + fill_in("lettings_log[startdate(2i)]", with: "12") + fill_in("lettings_log[startdate(3i)]", with: "1") + click_button("Save and continue") + + expect(page).to have_current_path("/lettings-logs/#{id}/tenancy-start-date") + expect(find_field("lettings_log[startdate(3i)]").value).to eq("1") + expect(find_field("lettings_log[startdate(2i)]").value).to eq("12") + expect(find_field("lettings_log[startdate(1i)]").value).to eq("202") + end + it "does not reset the displayed date if it's empty" do lettings_log.update!(startdate: nil) visit("/lettings-logs/#{id}/tenancy-start-date") diff --git a/spec/requests/check_errors_controller_spec.rb b/spec/requests/check_errors_controller_spec.rb index 29130f547..9c4d3f8c1 100644 --- a/spec/requests/check_errors_controller_spec.rb +++ b/spec/requests/check_errors_controller_spec.rb @@ -84,7 +84,7 @@ RSpec.describe CheckErrorsController, type: :request do end it "displays correct clear and change links" do - expect(page.all(:button, value: "Clear").count).to eq(2) + expect(page.all(:button, value: "Clear").count).to eq(1) expect(page).to have_link("Change", count: 1) expect(page).to have_button("Clear all") end From fde970ae430f97b0f99c12413b168f0f5304c3fc Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Thu, 12 Dec 2024 10:29:43 +0000 Subject: [PATCH 16/30] Make org test names unique (#2865) --- spec/factories/organisation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/factories/organisation.rb b/spec/factories/organisation.rb index ecab5bf81..f3184277e 100644 --- a/spec/factories/organisation.rb +++ b/spec/factories/organisation.rb @@ -1,6 +1,6 @@ FactoryBot.define do factory :organisation do - name { Faker::Company.name } + sequence(:name) { |n| "#{Faker::Company.name} #{n}" } address_line1 { Faker::Address.street_address } address_line2 { Faker::Address.city } provider_type { "LA" } From 6d22b847dfbcbda0e30c920cbf490288eae350f6 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Thu, 12 Dec 2024 12:07:29 +0000 Subject: [PATCH 17/30] CLDC-3801 Do not put error objects into cookies (#2864) * Do not put error objects into cookies * Update tests * typo --- app/controllers/form_controller.rb | 12 ++++++++++-- app/helpers/form_page_error_helper.rb | 5 ----- app/views/form/page.html.erb | 3 +-- spec/requests/form_controller_spec.rb | 20 ++++++++++++++++++++ spec/views/form/page_view_spec.rb | 1 + 5 files changed, 32 insertions(+), 9 deletions(-) diff --git a/app/controllers/form_controller.rb b/app/controllers/form_controller.rb index 3e029371d..f31662c4f 100644 --- a/app/controllers/form_controller.rb +++ b/app/controllers/form_controller.rb @@ -38,8 +38,14 @@ class FormController < ApplicationController error_attributes = @log.errors.map(&:attribute) Rails.logger.info "User triggered validation(s) on: #{error_attributes.join(', ')}" @subsection = form.subsection_for_page(@page) - flash[:errors] = @log.errors + flash[:errors] = @log.errors.each_with_object({}) do |error, result| + if @page.questions.map(&:id).include?(error.attribute.to_s) + result[error.attribute.to_s] = error.message + end + end flash[:log_data] = responses_for_page + question_ids = (@log.errors.map(&:attribute) - [:base]).uniq + flash[:pages_with_errors_count] = question_ids.map { |id| @log.form.get_question(id, @log)&.page&.id }.compact.uniq.count redirect_to send("#{@log.class.name.underscore}_#{@page.id}_path", @log, { referrer: request.params["referrer"], original_page_id: request.params["original_page_id"], related_question_ids: request.params["related_question_ids"] }) end else @@ -81,6 +87,7 @@ class FormController < ApplicationController page_id = request.path.split("/")[-1].underscore @page = form.get_page(page_id) @subsection = form.subsection_for_page(@page) + @pages_with_errors_count = 0 if @page.routed_to?(@log, current_user) || is_referrer_type?("interruption_screen") || adding_answer_from_check_errors_page? if updated_answer_from_check_errors_page? @questions = request.params["related_question_ids"].map { |id| @log.form.get_question(id, @log) } @@ -89,6 +96,7 @@ class FormController < ApplicationController if flash[:errors].present? restore_previous_errors(flash[:errors]) restore_error_field_values(flash[:log_data]) + @pages_with_errors_count = flash[:pages_with_errors_count] end render "form/page" end @@ -121,7 +129,7 @@ private return unless previous_errors previous_errors.each do |attribute, message| - @log.errors.add attribute, message.first + @log.errors.add attribute, message.html_safe end end diff --git a/app/helpers/form_page_error_helper.rb b/app/helpers/form_page_error_helper.rb index bf4e1db08..ded09d54c 100644 --- a/app/helpers/form_page_error_helper.rb +++ b/app/helpers/form_page_error_helper.rb @@ -12,9 +12,4 @@ module FormPageErrorHelper errors.each { |error| lettings_log.errors.delete(error.attribute) } end end - - def all_pages_affected_by_errors(log) - question_ids = (log.errors.map(&:attribute) - [:base]).uniq - question_ids.map { |id| log.form.get_question(id, log)&.page&.id }.compact.uniq - end end diff --git a/app/views/form/page.html.erb b/app/views/form/page.html.erb index 7379de0eb..1d4f0e7a1 100644 --- a/app/views/form/page.html.erb +++ b/app/views/form/page.html.erb @@ -16,7 +16,6 @@ <%= form_with model: @log, url: request.original_url, method: "post", local: true do |f| %>
- <% all_pages_with_errors = all_pages_affected_by_errors(@log) %> <% remove_other_page_errors(@log, @page) %> <%= f.govuk_error_summary %> @@ -76,7 +75,7 @@ <%= f.hidden_field :check_errors, value: @check_errors %> <% end %> - <% if all_pages_with_errors.count > 1 %> + <% if @pages_with_errors_count > 1 %>
<%= f.submit "See all related answers", name: "check_errors", class: "govuk-body govuk-link submit-button-link" %>
diff --git a/spec/requests/form_controller_spec.rb b/spec/requests/form_controller_spec.rb index e727d8acc..fbbd5fc85 100644 --- a/spec/requests/form_controller_spec.rb +++ b/spec/requests/form_controller_spec.rb @@ -723,6 +723,26 @@ RSpec.describe FormController, type: :request do end end end + + context "with long error messages" do + let(:sales_log) { create(:sales_log, :completed, assigned_to: user) } + let(:page_id) { "purchase_price" } + let(:params) do + { + id: sales_log.id, + sales_log: { + page: page_id, + "value" => 1, + }, + } + end + + it "can deal with long error messages" do + post "/sales-logs/#{sales_log.id}/#{page_id.dasherize}", params: params + follow_redirect! + expect(page).to have_content("There is a problem") + end + end end context "with invalid organisation answers" do diff --git a/spec/views/form/page_view_spec.rb b/spec/views/form/page_view_spec.rb index a95c98e93..83f76572f 100644 --- a/spec/views/form/page_view_spec.rb +++ b/spec/views/form/page_view_spec.rb @@ -29,6 +29,7 @@ RSpec.describe "form/page" do assign(:log, lettings_log) assign(:page, page) assign(:subsection, subsection) + assign(:pages_with_errors_count, 0) assign_attributes(page, page_attributes) assign_attributes(question, question_attributes) render From df283a7a63f30a945531e4e43c9cafb5e3e31a6a Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:09:18 +0000 Subject: [PATCH 18/30] Bug fix (#2866) --- app/models/form/sales/questions/buyer2_income_known.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/form/sales/questions/buyer2_income_known.rb b/app/models/form/sales/questions/buyer2_income_known.rb index 0b125f2af..26d4b2fca 100644 --- a/app/models/form/sales/questions/buyer2_income_known.rb +++ b/app/models/form/sales/questions/buyer2_income_known.rb @@ -2,7 +2,7 @@ class Form::Sales::Questions::Buyer2IncomeKnown < ::Form::Question def initialize(id, hsh, page) super @id = "income2nk" - @copy_key = "sales.income_benefits_and_savings.buyer_2_income.income2" + @copy_key = "sales.income_benefits_and_savings.buyer_2_income.income2nk" @type = "radio" @answer_options = ANSWER_OPTIONS @conditional_for = { From 151a443cf6045472fc3dda6b5d0f4b4d74d3146a Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Fri, 13 Dec 2024 08:35:18 +0000 Subject: [PATCH 19/30] CLDC-3789 Update frontend components (#2854) * Update govuk-components * Use govuk_list for lists * Update govuk-frontend and primary navigation * Update govuk_design_system_formbuilder * lint * Remove primary navigation import * Update tests * Remove border on phase banner * lint --- Gemfile | 4 +- Gemfile.lock | 14 ++-- .../primary_navigation_component.html.erb | 22 ++---- app/frontend/styles/_primary-navigation.scss | 69 ------------------- app/frontend/styles/application.scss | 42 ++++++++++- .../forms/prepare_your_file_2024.html.erb | 19 +++-- .../fix_choice.html.erb | 12 +--- .../forms/prepare_your_file_2024.html.erb | 19 +++-- .../fix_choice.html.erb | 14 +--- .../bulk_upload_shared/guidance.html.erb | 7 +- app/views/cookies/show.html.erb | 6 +- app/views/layouts/application.html.erb | 2 +- app/views/logs/delete_duplicates.html.erb | 10 +-- .../merge_requests/merge_request.html.erb | 30 ++++---- .../add_managing_agent.html.erb | 12 ++-- .../add_stock_owner.html.erb | 12 ++-- .../data_sharing_agreement.html.erb | 65 ++++++++--------- .../organisations/duplicate_schemes.html.erb | 53 +++++--------- app/views/schemes/changes.html.erb | 10 +-- app/views/start/guidance.html.erb | 68 +++++++++--------- package.json | 2 +- .../primary_navigation_component_spec.rb | 2 +- .../auth/passwords_controller_spec.rb | 2 +- ...anisation_relationships_controller_spec.rb | 8 +-- .../requests/organisations_controller_spec.rb | 6 +- yarn.lock | 10 +-- 26 files changed, 209 insertions(+), 311 deletions(-) delete mode 100644 app/frontend/styles/_primary-navigation.scss diff --git a/Gemfile b/Gemfile index 027ed10d0..1028f921a 100644 --- a/Gemfile +++ b/Gemfile @@ -18,9 +18,9 @@ gem "jsbundling-rails" # Reduces boot times through caching; required in config/boot.rb gem "bootsnap", ">= 1.4.4", require: false # GOV UK frontend components -gem "govuk-components", "~> 5.1" +gem "govuk-components", "~> 5.7" # GOV UK component form builder DSL -gem "govuk_design_system_formbuilder", "~> 5.0" +gem "govuk_design_system_formbuilder", "~> 5.7" # Convert Markdown into GOV.UK frontend-styled HTML gem "govuk_markdown" gem "redcarpet", "~> 3.6" diff --git a/Gemfile.lock b/Gemfile.lock index 329c92051..66e4c9c41 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -203,11 +203,11 @@ GEM raabro (~> 1.4) globalid (1.2.1) activesupport (>= 6.1) - govuk-components (5.2.1) + govuk-components (5.7.0) html-attributes-utils (~> 1.0.0, >= 1.0.0) - pagy (~> 6.0) - view_component (>= 3.9, < 3.11) - govuk_design_system_formbuilder (5.2.0) + pagy (>= 6, < 10) + view_component (>= 3.9, < 3.17) + govuk_design_system_formbuilder (5.7.1) actionview (>= 6.1) activemodel (>= 6.1) activesupport (>= 6.1) @@ -287,7 +287,7 @@ GEM childprocess (>= 0.6.3, < 6) iniparse (~> 1.4) rexml (~> 3.2) - pagy (6.5.0) + pagy (9.3.2) paper_trail (15.1.0) activerecord (>= 6.1) request_store (~> 1.4) @@ -532,8 +532,8 @@ DEPENDENCIES excon (~> 0.111.0) factory_bot_rails faker - govuk-components (~> 5.1) - govuk_design_system_formbuilder (~> 5.0) + govuk-components (~> 5.7) + govuk_design_system_formbuilder (~> 5.7) govuk_markdown jsbundling-rails json-schema diff --git a/app/components/primary_navigation_component.html.erb b/app/components/primary_navigation_component.html.erb index 9cad3bc64..032c02b81 100644 --- a/app/components/primary_navigation_component.html.erb +++ b/app/components/primary_navigation_component.html.erb @@ -1,17 +1,5 @@ - +<%= govuk_service_navigation(navigation_id: "primary-navigation", classes: "app-service-navigation") do |sn| + items.each do |item| + sn.with_navigation_item(text: item[:text], href: item[:href], classes: "", current: item[:current]) + end + end %> diff --git a/app/frontend/styles/_primary-navigation.scss b/app/frontend/styles/_primary-navigation.scss deleted file mode 100644 index b21d41fc1..000000000 --- a/app/frontend/styles/_primary-navigation.scss +++ /dev/null @@ -1,69 +0,0 @@ -.app-primary-navigation { - @include govuk-font(19, $weight: bold); - background-color: govuk-colour("light-grey"); - border-bottom: 1px solid $govuk-border-colour; -} - -.govuk-phase-banner + .app-primary-navigation { - margin-top: -1px; -} - -.app-primary-navigation__list { - @include govuk-clearfix; - left: govuk-spacing(-3); - list-style: none; - margin: 0; - padding: 0; - position: relative; - right: govuk-spacing(-3); - width: calc(100% + #{govuk-spacing(6)}); -} - -.app-primary-navigation__item { - box-sizing: border-box; - display: block; - float: left; - line-height: 50px; - height: 50px; - padding: 0 govuk-spacing(3); - position: relative; -} - -.app-primary-navigation__item--current { - border-bottom: $govuk-border-width-narrow solid $govuk-link-colour; - - &:hover { - border-bottom-color: $govuk-link-hover-colour; - } - - &:active { - border-bottom-color: $govuk-link-active-colour; - } -} - -.app-primary-navigation__item--align-right { - @include govuk-media-query($from: tablet) { - float: right; - } -} - -.app-primary-navigation__link { - @include govuk-link-common; - @include govuk-link-style-no-visited-state; - @include govuk-link-style-no-underline; - @include govuk-typography-weight-bold; - - // Extend the touch area of the link to the list - &::after { - bottom: 0; - content: ""; - left: 0; - position: absolute; - right: 0; - top: 0; - } -} - -.app-primary-navigation__item--current .app-primary-navigation__link:hover { - text-decoration: none; -} diff --git a/app/frontend/styles/application.scss b/app/frontend/styles/application.scss index 837b0db6d..3e75107bd 100644 --- a/app/frontend/styles/application.scss +++ b/app/frontend/styles/application.scss @@ -45,7 +45,6 @@ $govuk-breakpoints: ( @import "task-list"; @import "template"; @import "panel"; -@import "primary-navigation"; @import "search"; @import "sub-navigation"; @import "unread-notification"; @@ -86,3 +85,44 @@ $govuk-breakpoints: ( .govuk-notification-banner__content > * { max-width: fit-content; } + +.govuk-service-navigation__active-fallback, +.govuk-service-navigation__list { + font-weight: bold; +} + +.govuk-service-navigation__link { + @include govuk-link-common; + @include govuk-link-style-no-visited-state; + @include govuk-link-style-no-underline; + @include govuk-typography-weight-bold; + + // Extend the touch area of the link to the list + &::after { + bottom: 0; + content: ""; + left: 0; + position: absolute; + right: 0; + top: 0; + } +} + +.govuk-service-navigation__item--active { + border-bottom-width: 4px; +} + +.govuk-service-navigation__item { + padding-right: 15px; + padding-left: 15px; + margin: 0; +} + +.govuk-service-navigation__item:not(:last-child) { + margin-right: 0; +} + +.govuk-service-navigation__container { + left: -15px; + position: relative; +} diff --git a/app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2024.html.erb b/app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2024.html.erb index 0e91061c3..3e7f0443c 100644 --- a/app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2024.html.erb +++ b/app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2024.html.erb @@ -19,22 +19,19 @@

Create your file

-
    -
  • Fill in the template with data from your housing management system. Your data should go below the headers, with one row per log. Leave column A blank - the bulk upload fields start in column B.
  • -
  • Make sure each column of your data aligns with the matching headers above. You may need to reorder your data.
  • -
  • Use the <%= govuk_link_to "Lettings bulk upload Specification (2024 to 2025)", @form.specification_path %> to check your data is in the correct format.
  • -
  • Username field: To assign a log to someone else, enter the email address they use to log into CORE.
  • -
  • If you have reordered the headers, keep the headers in the file.
  • -
+ <%= govuk_list [ + "Fill in the template with data from your housing management system. Your data should go below the headers, with one row per log. Leave column A blank - the bulk upload fields start in column B.", + "Make sure each column of your data aligns with the matching headers above. You may need to reorder your data.", + "Use the #{govuk_link_to 'Lettings bulk upload Specification (2024 to 2025)', @form.specification_path} to check your data is in the correct format.".html_safe, + "Username field: To assign a log to someone else, enter the email address they use to log into CORE.".html_safe, + "If you have reordered the headers, keep the headers in the file.", + ], type: :bullet %> <%= govuk_inset_text(text: "You can upload both general needs and supported housing logs in the same file for 2024 to 2025 data.") %>

Save your file

-
    -
  • Save your file as a CSV.
  • -
  • Your file should now be ready to upload.
  • -
+ <%= govuk_list ["Save your file as a CSV.", "Your file should now be ready to upload."], type: :bullet %> <%= f.govuk_submit class: "govuk-!-margin-top-7" %> <% end %> diff --git a/app/views/bulk_upload_lettings_resume/fix_choice.html.erb b/app/views/bulk_upload_lettings_resume/fix_choice.html.erb index 383cdbfa1..225fb07bf 100644 --- a/app/views/bulk_upload_lettings_resume/fix_choice.html.erb +++ b/app/views/bulk_upload_lettings_resume/fix_choice.html.erb @@ -24,17 +24,9 @@ <%= govuk_details(summary_text: "How to choose between fixing errors on the CORE site or in the CSV") do %>

You may find it easier to fix the errors in the CSV file if:

-
    -
  • you have a lot of errors
  • -
  • the CSV file is formatted incorrectly and you can see where the errors are
  • -
  • you need to fix multiple errors at once
  • -
+ <%= govuk_list ["you have a lot of errors", "the CSV file is formatted incorrectly and you can see where the errors are", "you need to fix multiple errors at once"], type: :bullet %>

You may find it easier to fix the errors on the CORE site if:

-
    -
  • you need to see the data in context
  • -
  • you have a smaller file, with a few errors
  • -
  • you are not sure where the errors are
  • -
+ <%= govuk_list ["you need to see the data in context", "you have a smaller file, with a few errors", "you are not sure where the errors are"], type: :bullet %> <% end %> <%= f.govuk_collection_radio_buttons :choice, diff --git a/app/views/bulk_upload_sales_logs/forms/prepare_your_file_2024.html.erb b/app/views/bulk_upload_sales_logs/forms/prepare_your_file_2024.html.erb index 2a64de689..723ae5314 100644 --- a/app/views/bulk_upload_sales_logs/forms/prepare_your_file_2024.html.erb +++ b/app/views/bulk_upload_sales_logs/forms/prepare_your_file_2024.html.erb @@ -19,19 +19,16 @@

There are 8 rows of content in the templates. These rows are called the ‘headers’. They contain the CORE form questions and guidance about which questions are required and how to format your answers.

Create your file

-
    -
  • Fill in the template with data from your housing management system. Your data should go below the headers, with one row per log. The bulk upload fields start at column B. Leave column A blank.
  • -
  • Make sure each column of your data aligns with the matching headers above. You may need to reorder your data.
  • -
  • Use the <%= govuk_link_to "Sales bulk upload Specification (2024 to 2025)", @form.specification_path %> to check your data is in the correct format.
  • -
  • Username field: To assign a log to someone else, enter the email address they use to log into CORE.
  • -
  • If you have reordered the headers, keep the headers in the file.
  • -
+ <%= govuk_list [ + "Fill in the template with data from your housing management system. Your data should go below the headers, with one row per log. The bulk upload fields start at column B. Leave column A blank.", + "Make sure each column of your data aligns with the matching headers above. You may need to reorder your data.", + "Use the #{govuk_link_to 'Sales bulk upload Specification (2024 to 2025)', @form.specification_path} to check your data is in the correct format.".html_safe, + "Username field: To assign a log to someone else, enter the email address they use to log into CORE.".html_safe, + "If you have reordered the headers, keep the headers in the file.", + ], type: :bullet %>

Save your file

-
    -
  • Save your file as a CSV.
  • -
  • Your file should now be ready to upload.
  • -
+ <%= govuk_list ["Save your file as a CSV.", "Your file should now be ready to upload."], type: :bullet %> <%= f.govuk_submit %> <% end %> diff --git a/app/views/bulk_upload_sales_resume/fix_choice.html.erb b/app/views/bulk_upload_sales_resume/fix_choice.html.erb index 946426d0c..b376ee62d 100644 --- a/app/views/bulk_upload_sales_resume/fix_choice.html.erb +++ b/app/views/bulk_upload_sales_resume/fix_choice.html.erb @@ -23,18 +23,10 @@
<%= govuk_details(summary_text: "How to choose between fixing errors on the CORE site or in the CSV") do %> -

You may find it easier to fix the errors in the CSV file if:

-
    -
  • you have a lot of errors
  • -
  • the CSV file is formatted incorrectly and you can see where the errors are
  • -
  • you need to fix multiple errors at once
  • -
+

You may find it easier to fix the errors in the CSV file if:

+ <%= govuk_list ["you have a lot of errors", "the CSV file is formatted incorrectly and you can see where the errors are", "you need to fix multiple errors at once"], type: :bullet %>

You may find it easier to fix the errors on the CORE site if:

-
    -
  • you need to see the data in context
  • -
  • you have a smaller file, with a few errors
  • -
  • you are not sure where the errors are
  • -
+ <%= govuk_list ["you need to see the data in context", "you have a smaller file, with a few errors", "you are not sure where the errors are"], type: :bullet %> <% end %> <%= f.govuk_collection_radio_buttons :choice, diff --git a/app/views/bulk_upload_shared/guidance.html.erb b/app/views/bulk_upload_shared/guidance.html.erb index 4cb8b76b4..d3950fff7 100644 --- a/app/views/bulk_upload_shared/guidance.html.erb +++ b/app/views/bulk_upload_shared/guidance.html.erb @@ -34,12 +34,7 @@

The bulk upload templates contain 8 rows of ‘headers’ with information about how to fill in the template, including:

<% end %> -
    -
  • the CORE form questions and their field numbers
  • -
  • each field’s valid responses
  • -
  • if/when certain fields can be left blank
  • -
  • which fields are used to check for duplicate logs
  • -
+ <%= govuk_list ["the CORE form questions and their field numbers", "each field’s valid responses", "if/when certain fields can be left blank", "which fields are used to check for duplicate logs"], type: :bullet %>

You can paste your data below the headers or copy the headers and insert them above the data in your file. The bulk upload fields start at column B. Leave column A blank.

Make sure that each column of data aligns with the corresponding question in the headers. We recommend ordering your data to match the headers, but you can also reorder the headers to match your data. When processing the file, we check what each column of data represents based on the headers above.

diff --git a/app/views/cookies/show.html.erb b/app/views/cookies/show.html.erb index 56776b711..632e60af8 100644 --- a/app/views/cookies/show.html.erb +++ b/app/views/cookies/show.html.erb @@ -37,11 +37,7 @@

Google is not allowed to use or share our analytics data with anyone.

Google Analytics stores anonymised information about:

-
    -
  • how you got to the service
  • -
  • the pages you visit on the service and how long you spend on them
  • -
  • any errors you see while using the service
  • -
+ <%= govuk_list ["how you got to the service", "the pages you visit on the service and how long you spend on them", "any errors you see while using the service"], type: :bullet %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index d235491a1..c7d5e2230 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -103,7 +103,7 @@ <% feedback_link = govuk_link_to "giving us your feedback (opens in a new tab)", t("feedback_form"), rel: "noreferrer noopener", target: "_blank" %> <%= govuk_phase_banner( - classes: "govuk-width-container", + classes: "#{current_user.present? ? 'no-bottom-border ' : ''}govuk-width-container", tag: govuk_phase_banner_tag(current_user), text: "This is a new service – help us improve it by #{feedback_link}".html_safe, ) %> diff --git a/app/views/logs/delete_duplicates.html.erb b/app/views/logs/delete_duplicates.html.erb index 912b3491d..2c9acd523 100644 --- a/app/views/logs/delete_duplicates.html.erb +++ b/app/views/logs/delete_duplicates.html.erb @@ -15,15 +15,7 @@

<%= @duplicate_logs.count == 1 ? "This log" : "These logs" %> will be deleted:

-
    - <% @duplicate_logs.each do |duplicate_log| %> -
  • - - <%= govuk_link_to "Log #{duplicate_log.id}", url_for(duplicate_log) %> - -
  • - <% end %> -
+ <%= govuk_list(@duplicate_logs.map { |log| "#{govuk_link_to "Log #{log.id}", url_for(log)}".html_safe }) %>
<%= govuk_button_to @duplicate_logs.count == 1 ? "Delete this log" : "Delete these logs", diff --git a/app/views/merge_requests/merge_request.html.erb b/app/views/merge_requests/merge_request.html.erb index d8602b46c..ec3bcab02 100644 --- a/app/views/merge_requests/merge_request.html.erb +++ b/app/views/merge_requests/merge_request.html.erb @@ -14,13 +14,13 @@

Before you start

Regardless of the merge type, you’ll be asked for:

-
    -
  • the organisations merging in CORE
  • -
  • the merge type: for example one organisation absorbing the rest, or them all creating a new organisation
  • -
  • to confirm or update the telephone number
  • -
  • the merge date
  • -
  • if user email addresses will change with this merge
  • -
+ <%= govuk_list [ + "the organisations merging in CORE", + "the merge type: for example one organisation absorbing the rest, or them all creating a new organisation", + "to confirm or update the telephone number", + "the merge date", + "if user email addresses will change with this merge", + ], type: :bullet %>

If email addresses are changing

<%= govuk_inset_text(text: "Update all user email addresses on CORE as soon as they change, so that everyone can still access their CORE account. ") %> @@ -30,14 +30,14 @@

If merging into a new organisation

You'll also be asked for the new organisation’s:

-
    -
  • name
  • -
  • address
  • -
  • telephone number
  • -
  • housing provider type
  • -
  • Regulator of Social Housing registration number
  • -
  • held stock details
  • -
+ <%= govuk_list [ + "name", + "address", + "telephone number", + "housing provider type", + "Regulator of Social Housing registration number", + "held stock details", + ], type: :bullet %> <%= govuk_warning_text text: "You will not be able to submit your request without the above information. Do not start the form until you have obtained all of the information. " %> diff --git a/app/views/organisation_relationships/add_managing_agent.html.erb b/app/views/organisation_relationships/add_managing_agent.html.erb index 25c7c53a2..71e4b5abc 100644 --- a/app/views/organisation_relationships/add_managing_agent.html.erb +++ b/app/views/organisation_relationships/add_managing_agent.html.erb @@ -28,12 +28,10 @@ <%= govuk_button_link_to("Cancel", managing_agents_organisation_path(@organisation), secondary: true) %>
<%= govuk_details(summary_text: "Can't find the managing agent you're looking for?") do %> -
    -
  • Double check the spelling and try again
  • -
  • Type the first few letters to see the suggestions
  • -
  • If you still can't find it, - <%= govuk_link_to("contact the MHCLG service desk", GlobalConstants::HELPDESK_URL, rel: "noreferrer noopener", target: "_blank") %> -
  • -
+ <%= govuk_list [ + "Double check the spelling and try again", + "Type the first few letters to see the suggestions", + "If you still can't find it, #{govuk_link_to('contact the MHCLG service desk', GlobalConstants::HELPDESK_URL, rel: 'noreferrer noopener', target: '_blank')}", + ], type: :bullet %> <% end %> <% end %> diff --git a/app/views/organisation_relationships/add_stock_owner.html.erb b/app/views/organisation_relationships/add_stock_owner.html.erb index 042442125..1bd522f54 100644 --- a/app/views/organisation_relationships/add_stock_owner.html.erb +++ b/app/views/organisation_relationships/add_stock_owner.html.erb @@ -28,12 +28,10 @@ <%= govuk_button_link_to("Cancel", stock_owners_organisation_path(@organisation), secondary: true) %> <%= govuk_details(summary_text: "Can't find the stock owner you're looking for?") do %> -
    -
  • Double check the spelling and try again
  • -
  • Type the first few letters to see the suggestions
  • -
  • If you still can't find it, - <%= govuk_link_to("contact the MHCLG service desk", GlobalConstants::HELPDESK_URL, rel: "noreferrer noopener", target: "_blank") %> -
  • -
+ <%= govuk_list [ + "Double check the spelling and try again", + "Type the first few letters to see the suggestions", + "If you still can't find it, #{govuk_link_to('contact the MHCLG service desk', GlobalConstants::HELPDESK_URL, rel: 'noreferrer noopener', target: '_blank')}", + ], type: :bullet %> <% end %> <% end %> diff --git a/app/views/organisations/data_sharing_agreement.html.erb b/app/views/organisations/data_sharing_agreement.html.erb index 722d9e176..54b6210c4 100644 --- a/app/views/organisations/data_sharing_agreement.html.erb +++ b/app/views/organisations/data_sharing_agreement.html.erb @@ -35,30 +35,26 @@

It is now agreed as follows:

2. Definitions and interpretation

2.1. In this Agreement the following words and phrases shall have the following meanings, unless expressly stated to the contrary:

-
    -
  • “Act” means the Data Protection Act 2018;
  • -
  • “Authorised Representatives” means the nominated lead officer representing each of the - parties with delegated authority to handle the day-to-day matters arising from this Agreement;
  • -
  • “Data Subject” means social housing lettings tenants and participants in discounted sales where their data is reported via the CORE system.
  • -
  • “Data Controller” has the meaning in Article 4(7) of the GDPR and section 5(2) of the Act.
  • -
  • “Data Processor” has the meaning in Article 4(8) of the GDPR.
  • -
  • “Data Protection Legislation” means the Data Protection Act 2018 and all applicable laws and regulations relating to the processing of personal data and privacy, including where applicable the guidance and codes of practice issued by the Information Commissioner; it includes the General Data Protection Regulation (GDPR).
  • -
  • “Data” means the data supplied by the CORE data providers via the CORE system and the data that is calculated or derived via the CORE system based on that initial data;
  • -
  • “GDPR” means the General Data Protection Regulation.
  • -
  • “Parties” means the parties to this Agreement, namely MHCLG and the CORE data providers. CORE data providers include social housing providers and managing organisations that provide data on behalf of the social housing providers.
  • -
  • “Personal Data” has the meaning in Article 4(1) of the GDPR. “Processing” has the meaning in Article 4(2) of the GDPR.
  • -
  • “Request for Information” means a request for information or a request under the Freedom of Information Act 2000.
  • -
  • “Special category personal data” has the meaning in Article 9(1) of the GDPR. In this Agreement: -
      -
    • A. The masculine includes the feminine and neuter;
    • -
    • B. Person means a natural person;
    • -
    • C. The singular includes the plural and vice versa;
    • -
    • D. A reference to any statute, enactment, order, regulation or other similar instrument - shall be construed as a reference to the statute, enactment, order, regulation or instrument as amended by any subsequent statute, enactment, order, regulation or instrument or as contained in any subsequent re-enactment.
    • - -
  • - -
+ <%= govuk_list [ + "“Act” means the Data Protection Act 2018;", + "“Authorised Representatives” means the nominated lead officer representing each of the parties with delegated authority to handle the day-to-day matters arising from this Agreement;", + "“Data Subject” means social housing lettings tenants and participants in discounted sales where their data is reported via the CORE system.", + "“Data Controller” has the meaning in Article 4(7) of the GDPR and section 5(2) of the Act.", + "“Data Processor” has the meaning in Article 4(8) of the GDPR.", + "“Data Protection Legislation” means the Data Protection Act 2018 and all applicable laws and regulations relating to the processing of personal data and privacy, including where applicable the guidance and codes of practice issued by the Information Commissioner; it includes the General Data Protection Regulation (GDPR).", + "“Data” means the data supplied by the CORE data providers via the CORE system and the data that is calculated or derived via the CORE system based on that initial data;", + "“GDPR” means the General Data Protection Regulation.", + "“Parties” means the parties to this Agreement, namely MHCLG and the CORE data providers. CORE data providers include social housing providers and managing organisations that provide data on behalf of the social housing providers.", + "“Personal Data” has the meaning in Article 4(1) of the GDPR. “Processing” has the meaning in Article 4(2) of the GDPR.", + "“Request for Information” means a request for information or a request under the Freedom of Information Act 2000.", + "“Special category personal data” has the meaning in Article 9(1) of the GDPR. In this Agreement: + #{ govuk_list([ + 'A. The masculine includes the feminine and neuter;', + 'B. Person means a natural person;', + 'C. The singular includes the plural and vice versa;', + 'D. A reference to any statute, enactment, order, regulation or other similar instrument shall be construed as a reference to the statute, enactment, order, regulation or instrument as amended by any subsequent statute, enactment, order, regulation or instrument or as contained in any subsequent re-enactment.', + ], type: :bullet)}".html_safe, + ], type: :bullet %>

2.2. Headings are included in this Agreement for ease of reference only and shall not affect the interpretation or construction of this Agreement.

2.3. References in this Agreement to Clauses, Paragraphs and Annexes are, unless otherwise provided, references to the Clauses, Paragraphs and Annexes of this Agreement.

2.4. In the event and to the extent only of any conflict or inconsistency between the provisions of this Agreement and the provisions of any document referred to or referenced herein, the provisions of this Agreement shall prevail.

@@ -95,11 +91,13 @@

8.5. All work carried out by MHCLG will follow appropriate security measures and procedures to ensure the protection of the data.

9. Protection of personal data

9.1. CORE data providers and MHCLG agree that they shall:

-
    -
  • A. Implement appropriate technical and organisational measures to protect the Personal Data against unauthorised or unlawful Processing and against accidental loss, destruction, damage, alteration or disclosure. These measures shall ensure a level of security appropriate to the harm which might result from any unauthorised or unlawful Processing, accidental loss, destruction or damage to the Personal Data and having regard to the nature of the Personal Data which is to be protected;
  • -
  • B. Take reasonable steps to ensure the reliability of any personnel who have access to the Personal Data. MHCLG and Data providers will ensure such personnel will be a limited number of analysts assigned to the data collection.
  • -
+ <%= govuk_list [ + "A. Implement appropriate technical and organisational measures to protect the Personal Data against unauthorised or unlawful Processing and against accidental loss, destruction, damage, alteration or disclosure. These measures shall ensure a level of security appropriate to the harm which might result from any unauthorised or unlawful Processing, accidental loss, destruction or damage to the Personal Data and having regard to the nature of the Personal Data which is to be protected;", + "B. Take reasonable steps to ensure the reliability of any personnel who have access to the Personal Data. MHCLG and Data providers will ensure such personnel will be a limited number of analysts assigned to the data collection.", +], + type: :bullet %> +

9.2. The data providers and MHCLG shall comply at all times with the Data Protection Legislation and shall ensure that they each perform their obligations under this agreement in full compliance with the Data Protection Legislation and any other applicable law, in particular the Human Rights Act 1998 and the common law duty of confidentiality.

9.3. CORE data providers should limit access to CORE to a small number of individuals who can be named on request. CORE access is limited to registered users only via password, but it is the responsibility of the CORE data providers to ensure that all individuals granted access to the datasets should be briefed on the legal requirements around handling and storing the Data from CORE.

10. Freedom of information

@@ -128,15 +126,10 @@

16.1. The Parties shall comply with all relevant legislation, regulations, orders, statutory instruments and any amendments or re-enactments thereof from the commencement of this agreement.

As witness of which the parties have set their hands on the day and year first above written signed for and on behalf of the Data Protection Officer for <%= org_name_for_data_sharing_agreement(@data_protection_confirmation, current_user) %>, by:

-
    -
  • Name: <%= name_for_data_sharing_agreement(@data_protection_confirmation, current_user) %>
  • -
  • Title: Data Protection Officer
  • -
+ <%= govuk_list ["Name: #{name_for_data_sharing_agreement(@data_protection_confirmation, current_user)}".html_safe, "Title: Data Protection Officer"], type: :bullet %> +

SIGNED for and on behalf of the deputy director of the data, analytics & statistics in the Ministry of Housing, Communities and Local Government, by:

-
    -
  • Name: Sandra Tudor
  • -
  • Title: Deputy Director
  • -
+ <%= govuk_list ["Name: Sandra Tudor", "Title: Deputy Director"], type: :bullet %> <% if current_user.is_dpo? && !(@organisation.data_protection_confirmed?) %>
diff --git a/app/views/organisations/duplicate_schemes.html.erb b/app/views/organisations/duplicate_schemes.html.erb index 79f7d435f..a1f341f7f 100644 --- a/app/views/organisations/duplicate_schemes.html.erb +++ b/app/views/organisations/duplicate_schemes.html.erb @@ -29,11 +29,11 @@

Since your organisation recently merged, we’ve reviewed your schemes for possible duplicates.

These sets of schemes and locations might be duplicates because they have the same answers for certain fields.

What you need to do

-
    -
  • Review each set of schemes or locations and decide if they are duplicates.
  • -
  • If they are, choose one to keep and deactivate the others on the date your organisation merged.
  • -
  • When you have resolved all duplicates, confirm below.
  • -
+ <%= govuk_list [ + "Review each set of schemes or locations and decide if they are duplicates.", + "If they are, choose one to keep and deactivate the others on the date your organisation merged.", + "When you have resolved all duplicates, confirm below.", + ], type: :bullet %>

If you need help with this, <%= govuk_link_to "contact the helpdesk (opens in a new tab)", GlobalConstants::HELPDESK_URL, target: "#" %>.

<% if @duplicate_schemes.any? %> @@ -43,17 +43,17 @@

These schemes have the same answers for the following fields:

-
    -
  • Type of scheme
  • -
  • Registered under Care Standards Act 2000
  • -
  • Housing stock owned by
  • -
  • Support services provided by
  • -
  • Primary client group
  • -
  • Has another client group
  • -
  • Secondary client group
  • -
  • Level of support given
  • -
  • Intended length of stay
  • -
+ <%= govuk_list [ + "Type of scheme", + "Registered under Care Standards Act 2000", + "Housing stock owned by", + "Support services provided by", + "Primary client group", + "Has another client group", + "Secondary client group", + "Level of support given", + "Intended length of stay", + ], type: :bullet %> <% end %>

The links below open in a new tab.

@@ -68,13 +68,7 @@ <% @duplicate_schemes.each do |duplicate_set| %> <% body.with_row do |row| %> <% row.with_cell do %> -
    - <% duplicate_set.each do |scheme| %> -
  1. - <%= govuk_link_to scheme.service_name, scheme, target: "#" %> -
  2. - <% end %> -
+ <%= govuk_list duplicate_set.map { |scheme| govuk_link_to(scheme.service_name, scheme, target: "#") }, type: :number %> <% end %> <% end %> <% end %> @@ -89,10 +83,7 @@

These locations belong to the same scheme and have the same answers for the following fields:

-
    -
  • Postcode
  • -
  • Mobility standards
  • -
+ <%= govuk_list ["Postcode", "Mobility standards"], type: :bullet %> <% end %>

The links below open in a new tab.

@@ -108,13 +99,7 @@ <% @duplicate_locations.each do |duplicate_set| %> <% body.with_row do |row| %> <% row.with_cell do %> -
    - <% duplicate_set[:locations].each do |location| %> -
  1. - <%= govuk_link_to location.name, scheme_location_path(location), target: "#" %> -
  2. - <% end %> -
+ <%= govuk_list duplicate_set[:locations].map { |location| govuk_link_to(location.name, scheme_location_path(location), target: "#") }, type: :number %> <% end %> <% row.with_cell do %> <%= govuk_link_to duplicate_set[:scheme].service_name, duplicate_set[:scheme], target: "#" %> diff --git a/app/views/schemes/changes.html.erb b/app/views/schemes/changes.html.erb index 9040d7a05..03ec75e0c 100644 --- a/app/views/schemes/changes.html.erb +++ b/app/views/schemes/changes.html.erb @@ -15,11 +15,11 @@

We have restructured the way we group supported housing scheme data.

On old CORE, a scheme’s data was split into management group and scheme. On new CORE, the data is split into scheme and location.

These are the main changes:

-
    -
  • Schemes now store data about the stock owner and support provider. This was previously stored in management group.
  • -
  • Schemes still store data about the type of support, as they did in old CORE.
  • -
  • Schemes no longer store data about postcodes where support is provided. These are now in locations.
  • -
+ <%= govuk_list [ + "Schemes now store data about the stock owner and support provider. This was previously stored in management group.", + "Schemes still store data about the type of support, as they did in old CORE.", + "Schemes no longer store data about postcodes where support is provided. These are now in locations.", + ], type: :bullet %>

This new structure means data coordinators only needs to fill in support details once.

How schemes are migrated from old CORE

If your organisation has migrated from old CORE to new CORE, your existing schemes are on the <%= govuk_link_to("schemes page", schemes_path) %>, with the same details.

diff --git a/app/views/start/guidance.html.erb b/app/views/start/guidance.html.erb index 6fbd157f0..367c6f05f 100644 --- a/app/views/start/guidance.html.erb +++ b/app/views/start/guidance.html.erb @@ -21,46 +21,50 @@ <%= accordion.with_section(heading_text: "Types of lettings you should create logs for") do %>

You’ll need to create a log for:

-
    -
  • Tenants in general needs housing allocated a new letting. This includes tenants moving into the social rented sector from outside, existing social tenants moving between properties or landlords, and existing social tenants renewing lettings in the same property. If fixed-term and social or affordable rent, only include tenancies of 2 years or more.
  • -
  • Tenants in supported housing (social housing, sheltered accommodation and care homes) allocated a new letting. This includes tenants moving into the social rented sector from outside, existing social tenants moving between properties or landlords, and existing social tenants renewing lettings in the same property. All supported housing tenancies should be reported regardless of length.
  • -
  • Starter tenancies provided by local authorities (LAs) and lettings with an introductory period provided by private registered providers (PRPs) should be completed in CORE at the beginning of the starter or introductory period. The tenancy type and length entered should be based on the tenancy the tenant will roll onto once the starter or introductory period has been completed. You do not need to submit another CORE log once the period has been completed.
  • -
  • Room moves within a shared housing unit that result in a different property type or support needs – this is classed as an internal transfer of an existing social tenant to another property.
  • -
  • Existing tenants who are issued with a new tenancy agreement when stock is acquired, transferred or permanently decanted.
  • -
  • Tenants under the Rough Sleepers Initiative or Rough Sleeping Accommodation Programme, where accommodation is permanent.
  • -
  • Households previously provided with temporary accommodation to meet a duty under the homelessness legislation who are allocated a tenancy as a settled home ending the duty (this may be the same property).
  • -
  • Refugees and asylum seekers who have been granted indefinite leave to remain, humanitarian protection or exceptional leave to remain.
  • -
  • Affordable Rent lettings – where up to 80% of market rent can be charged and a new supply agreement is signed.
  • -
  • London Affordable Rent lettings – a type of Affordable Rent available in London through the Greater London Authority (GLA).
  • -
  • Intermediate Rent lettings – where the rent must not exceed 80% of the current market rate (including any service charges).
  • -
  • Rent to Buy lettings – where a discount of up to 20% market rent is charged for a single rental period for a minimum of 5 years. After that period, the tenant is offered the chance to purchase the property (either shared ownership or outright) at full market value.
  • -
  • London Living Rent lettings – a type of Intermediate Rent available in London through the Greater London Authority (GLA).
  • -
+ <%= govuk_list [ + "Tenants in general needs housing allocated a new letting. This includes tenants moving into the social rented sector from outside, existing social tenants moving between properties or landlords, and existing social tenants renewing lettings in the same property. If fixed-term and social or affordable rent, only include tenancies of 2 years or more.", + "Tenants in supported housing (social housing, sheltered accommodation and care homes) allocated a new letting. This includes tenants moving into the social rented sector from outside, existing social tenants moving between properties or landlords, and existing social tenants renewing lettings in the same property. All supported housing tenancies should be reported regardless of length.", + "Starter tenancies provided by local authorities (LAs) and lettings with an introductory period provided by private registered providers (PRPs) should be completed in CORE at the beginning of the starter or introductory period. The tenancy type and length entered should be based on the tenancy the tenant will roll onto once the starter or introductory period has been completed. You do not need to submit another CORE log once the period has been completed.", + "Room moves within a shared housing unit that result in a different property type or support needs – this is classed as an internal transfer of an existing social tenant to another property.", + "Existing tenants who are issued with a new tenancy agreement when stock is acquired, transferred or permanently decanted.", + "Tenants under the Rough Sleepers Initiative or Rough Sleeping Accommodation Programme, where accommodation is permanent.", + "Households previously provided with temporary accommodation to meet a duty under the homelessness legislation who are allocated a tenancy as a settled home ending the duty (this may be the same property).", + "Refugees and asylum seekers who have been granted indefinite leave to remain, humanitarian protection or exceptional leave to remain.", + "Affordable Rent lettings – where up to 80% of market rent can be charged and a new supply agreement is signed.", + "London Affordable Rent lettings – a type of Affordable Rent available in London through the Greater London Authority (GLA).", + "Intermediate Rent lettings – where the rent must not exceed 80% of the current market rate (including any service charges).", + "Rent to Buy lettings – where a discount of up to 20% market rent is charged for a single rental period for a minimum of 5 years. After that period, the tenant is offered the chance to purchase the property (either shared ownership or outright) at full market value.", + "London Living Rent lettings – a type of Intermediate Rent available in London through the Greater London Authority (GLA).", + ], + type: :bullet %> <% end %> <%= accordion.with_section(heading_text: "Types of lettings you should not create logs for") do %>

You don’t need to create a log for:

-
    -
  • Temporary general needs housing with a fixed period of less than 2 years if they are social or affordable rent. (Temporary lettings for intermediate rent and supported housing should be recorded).
  • -
  • Starter tenancies or lettings with an introductory period that roll onto or convert into the main tenancy. The CORE log should be completed at the beginning of this period.
  • -
  • Changes from sole to joint or joint to sole tenancies, where the number of people in the household has not changed.
  • -
  • Moves within a shared housing unit resulting in the same support needs or property type, even if a new tenancy or licence agreement is issued.
  • -
  • Lettings where no new tenancy agreement is signed.
  • -
  • Where stock is acquired, transferred or permanently decanted and the existing tenants are not issued with a new tenancy agreement.
  • -
  • Mutual exchanges including lettings where registered provider tenants have exchanged homes, for example through the national HOMESWAP system.
  • -
  • Successions and assignments.
  • -
  • Demotion of a secure or assured tenancy, and any subsequent conversion of the demoted tenancy to a secure or assured tenancy.
  • -
  • Lettings made to asylum seekers who are awaiting a decision on their applications for asylum under the Immigration and Asylum Act 1999.
  • -
  • Non-social lettings, including market-rented properties, employer-provided housing where the employer provides financial support, homes for staff of social landlords linked to employment, homes social landlords manage for organisations who are not social landlords, homes social landlords own but lease in entirety to organisations who are not social landlords, and freehold housing with variable charges for services and communal facilities.
  • -
+ <%= govuk_list [ + "Temporary general needs housing with a fixed period of less than 2 years if they are social or affordable rent. (Temporary lettings for intermediate rent and supported housing should be recorded).", + "Starter tenancies or lettings with an introductory period that roll onto or convert into the main tenancy. The CORE log should be completed at the beginning of this period.", + "Changes from sole to joint or joint to sole tenancies, where the number of people in the household has not changed.", + "Moves within a shared housing unit resulting in the same support needs or property type, even if a new tenancy or licence agreement is issued.", + "Lettings where no new tenancy agreement is signed.", + "Where stock is acquired, transferred or permanently decanted and the existing tenants are not issued with a new tenancy agreement.", + "Mutual exchanges including lettings where registered provider tenants have exchanged homes, for example through the national HOMESWAP system.", + "Successions and assignments.", + "Demotion of a secure or assured tenancy, and any subsequent conversion of the demoted tenancy to a secure or assured tenancy.", + "Lettings made to asylum seekers who are awaiting a decision on their applications for asylum under the Immigration and Asylum Act 1999.", + "Non-social lettings, including market-rented properties, employer-provided housing where the employer provides financial support, homes for staff of social landlords linked to employment, homes social landlords manage for organisations who are not social landlords, homes social landlords own but lease in entirety to organisations who are not social landlords, and freehold housing with variable charges for services and communal facilities.", + ], + type: :bullet %> <% end %> <%= accordion.with_section(heading_text: "What if someone is reluctant to answer any questions?") do %>

If a tenant or buyer is reluctant to answer questions as part of a log, you should explain that:

-
    -
  • all information they provide is anonymous and will not affect their housing, benefits or other services they receive.
  • -
  • the data they provide is vital in helping to build a complete picture of social housing in England and is used to inform social housing policy.
  • -
+ <%= govuk_list [ + "all information they provide is anonymous and will not affect their housing, benefits or other services they receive.", + "the data they provide is vital in helping to build a complete picture of social housing in England and is used to inform social housing policy.", + ], + type: :bullet %> +

If a tenant or buyer is still unwilling or unable to answer questions, select the ‘Don’t know’ or ‘Tenant/person prefers not to say’ options.

<% end %> <% end %> diff --git a/package.json b/package.json index ef37dc8aa..32063907c 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "css-loader": "^6.7.1", "custom-event-polyfill": "^1.0.7", "file-loader": "^6.2.0", - "govuk-frontend": "5.1.0", + "govuk-frontend": "5.7.1", "html5shiv": "^3.7.3", "intersection-observer": "^0.12.0", "mini-css-extract-plugin": "^2.6.0", diff --git a/spec/components/primary_navigation_component_spec.rb b/spec/components/primary_navigation_component_spec.rb index f5f41bff0..aeefa6130 100644 --- a/spec/components/primary_navigation_component_spec.rb +++ b/spec/components/primary_navigation_component_spec.rb @@ -14,7 +14,7 @@ RSpec.describe PrimaryNavigationComponent, type: :component do it "then that item appears as selected" do result = render_inline(described_class.new(items:)) - expect(result.css('.app-primary-navigation__link[aria-current="page"]').text).to include("Organisations") + expect(result.css('.govuk-service-navigation__link[aria-current="page"]').text).to include("Organisations") end end diff --git a/spec/requests/auth/passwords_controller_spec.rb b/spec/requests/auth/passwords_controller_spec.rb index 7f9bdfa30..f35df1c5a 100644 --- a/spec/requests/auth/passwords_controller_spec.rb +++ b/spec/requests/auth/passwords_controller_spec.rb @@ -70,7 +70,7 @@ RSpec.describe Auth::PasswordsController, type: :request do put "/account/password", params: update_password_params # Devise redirects once after re-sign in with new password and then root redirects as well. follow_redirect! - expect(page).to have_css("div", class: "govuk-notification-banner__heading", text: message) + expect(page).to have_css("p", class: "govuk-notification-banner__heading", text: message) end end end diff --git a/spec/requests/organisation_relationships_controller_spec.rb b/spec/requests/organisation_relationships_controller_spec.rb index 8733fba4b..1b1b3169e 100644 --- a/spec/requests/organisation_relationships_controller_spec.rb +++ b/spec/requests/organisation_relationships_controller_spec.rb @@ -29,7 +29,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do end it "shows the tab navigation" do - expected_html = "
diff --git a/bin/rubocop b/bin/rubocop new file mode 100755 index 000000000..40330c0ff --- /dev/null +++ b/bin/rubocop @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby +require "rubygems" +require "bundler/setup" + +# explicit rubocop config increases performance slightly while avoiding config confusion. +ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__)) + +load Gem.bin_path("rubocop", "rubocop") diff --git a/bin/setup b/bin/setup index ec47b79b3..92bd38ead 100755 --- a/bin/setup +++ b/bin/setup @@ -1,11 +1,10 @@ #!/usr/bin/env ruby require "fileutils" -# path to your application root. APP_ROOT = File.expand_path("..", __dir__) def system!(*args) - system(*args) || abort("\n== Command #{args} failed ==") + system(*args, exception: true) end FileUtils.chdir APP_ROOT do diff --git a/config/application.rb b/config/application.rb index 2cda05fea..cb8979a78 100644 --- a/config/application.rb +++ b/config/application.rb @@ -12,7 +12,6 @@ require "action_mailbox/engine" # require "action_text/engine" require "action_view/railtie" # require "action_cable/engine" -# require "sprockets/railtie" # require "rails/test_unit/railtie" # Require the gems listed in Gemfile, including any gems @@ -22,8 +21,16 @@ Bundler.require(*Rails.groups) module DataCollector class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 7.0 + config.load_defaults 7.2 + # Please, add to the `ignore` list any other `lib` subdirectories that do + # not contain `.rb` files, or that should not be reloaded or eager loaded. + # Common ones are `templates`, `generators`, or `middleware`, for example. + config.autoload_lib(ignore: %w[assets tasks]) + + # it's strongly discouraged using add_autoload_paths_to_load_path, but rack_attack initializer can't load config files without it + config.add_autoload_paths_to_load_path = true + # Configuration for the application, engines, and railties goes here. # # These settings can be overridden in specific environments using the files @@ -32,6 +39,8 @@ module DataCollector config.time_zone = "London" # config.eager_load_paths << Rails.root.join("extras") + # Don't generate system test files. + config.generators.system_tests = nil config.exceptions_app = routes config.active_job.queue_adapter = :sidekiq diff --git a/config/environments/development.rb b/config/environments/development.rb index f75643524..286c9ca30 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -6,7 +6,7 @@ Rails.application.configure do # In the development environment your application's code is reloaded any time # it changes. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. - config.cache_classes = false + config.enable_reloading = true # Do not eager load code on boot. config.eager_load = false @@ -14,7 +14,7 @@ Rails.application.configure do # Show full error reports. config.consider_all_requests_local = true - # Enable server timing + # Enable server timing. config.server_timing = true # Enable/disable caching. By default caching is disabled. @@ -24,9 +24,7 @@ Rails.application.configure do config.action_controller.enable_fragment_cache_logging = true config.cache_store = :memory_store - config.public_file_server.headers = { - "Cache-Control" => "public, max-age=#{2.days.to_i}", - } + config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false @@ -39,6 +37,8 @@ Rails.application.configure do # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false + # Disable caching for Action Mailer templates even if Action Controller + # caching is enabled. config.action_mailer.perform_caching = false config.action_mailer.default_url_options = { host: "localhost", port: 3000 } @@ -72,15 +72,20 @@ Rails.application.configure do # Highlight code that triggered database queries in logs. config.active_record.verbose_query_logs = true + # Highlight code that enqueued background job in logs. + config.active_job.verbose_enqueue_logs = true + # Raises error for missing translations. config.i18n.raise_on_missing_translations = true # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true - # Uncomment if you wish to allow Action Cable access from any origin. - # config.action_cable.disable_request_forgery_protection = true + # Raise error when a before_action's only/except options reference missing actions. + # config.action_controller.raise_on_missing_callback_actions = true + # Apply autocorrection by RuboCop to files generated by `bin/rails generate`. + # config.generators.apply_rubocop_autocorrect_after_generate! Faker::Config.locale = "en-GB" # see https://discuss.rubyonrails.org/t/cve-2022-32224-possible-rce-escalation-bug-with-serialized-columns-in-active-record/81017 diff --git a/config/environments/production.rb b/config/environments/production.rb index 55f442b3d..c337be49b 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -4,7 +4,7 @@ Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. - config.cache_classes = true + config.enable_reloading = false # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web servers @@ -13,15 +13,14 @@ Rails.application.configure do config.eager_load = true # Full error reports are disabled and caching is turned on. - config.consider_all_requests_local = false + config.consider_all_requests_local = false config.action_controller.perform_caching = true - # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] - # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). + # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment + # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). # config.require_master_key = true - # Disable serving static files from the `/public` folder by default since - # Apache or NGINX already handles this. + # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead. config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? # Enable serving of images, stylesheets, and JavaScripts from an asset server. @@ -34,28 +33,38 @@ Rails.application.configure do # Store uploaded files on the local file system (see config/storage.yml for options). config.active_storage.service = :local - # Mount Action Cable outside main process or domain. - # config.action_cable.mount_path = nil - # config.action_cable.url = "wss://example.com/cable" - # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ] + # Assume all access to the app is happening through a SSL-terminating reverse proxy. + # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies. + # config.assume_ssl = true # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true + config.force_ssl = true - # Include generic and useful information about system operation, but avoid logging too much - # information to avoid inadvertent exposure of personally identifiable information (PII). - config.log_level = :info + # Skip http-to-https redirect for the default health check endpoint. + # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } } + + # Log to STDOUT by default + config.logger = ActiveSupport::Logger.new($stdout) + .tap { |logger| logger.formatter = ::Logger::Formatter.new } + .then { |logger| ActiveSupport::TaggedLogging.new(logger) } # Prepend all log lines with the following tags. config.log_tags = [:request_id] + # "info" includes generic and useful information about system operation, but avoids logging too much + # information to avoid inadvertent exposure of personally identifiable information (PII). If you + # want to log everything, set the level to "debug". + config.log_level = :info + # Use a different cache store in production. # config.cache_store = :mem_cache_store # Use a real queuing backend for Active Job (and separate queues per environment). - # config.active_job.queue_adapter = :resque + # config.active_job.queue_adapter = :resque # config.active_job.queue_name_prefix = "data_collector_production" + # Disable caching for Action Mailer templates even if Action Controller + # caching is enabled. config.action_mailer.perform_caching = false config.action_mailer.default_url_options = { host: ENV["APP_HOST"] } @@ -98,37 +107,16 @@ Rails.application.configure do # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false - # Inserts middleware to perform automatic connection switching. - # The `database_selector` hash is used to pass options to the DatabaseSelector - # middleware. The `delay` is used to determine how long to wait after a write - # to send a subsequent read to the primary. - # - # The `database_resolver` class is used by the middleware to determine which - # database is appropriate to use based on the time delay. - # - # The `database_resolver_context` class is used by the middleware to set - # timestamps for the last write to the primary. The resolver uses the context - # class timestamps to determine how long to wait before reading from the - # replica. - # - # By default Rails will store a last write timestamp in the session. The - # DatabaseSelector middleware is designed as such you can define your own - # strategy for connection switching and pass that into the middleware through - # these configuration options. - # config.active_record.database_selector = { delay: 2.seconds } - # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver - # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session - - # Inserts middleware to perform automatic shard swapping. The `shard_selector` hash - # can be used to pass options to the `ShardSelector` middleware. The `lock` option is - # used to determine whether shard swapping should be prohibited for the request. - # - # The `shard_resolver` option is used by the middleware to determine which shard - # to switch to. The application must provide a mechanism for finding the shard name - # in a proc. See guides for an example. - # config.active_record.shard_selector = { lock: true } - # config.active_record.shard_resolver = ->(request) { Tenant.find_by!(host: request.host).shard } + # Only use :id for inspections in production. + config.active_record.attributes_for_inspect = [:id] + # Enable DNS rebinding protection and other `Host` header attacks. + # config.hosts = [ + # "example.com", # Allow requests from example.com + # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` + # ] + # Skip DNS rebinding protection for the default health check endpoint. + # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } # see https://discuss.rubyonrails.org/t/cve-2022-32224-possible-rce-escalation-bug-with-serialized-columns-in-active-record/81017 config.active_record.yaml_column_permitted_classes = [Time, BigDecimal] diff --git a/config/environments/test.rb b/config/environments/test.rb index aa3fe7bba..0d6b14147 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,5 +1,4 @@ require "active_support/core_ext/integer/time" -require "faker" # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that @@ -9,26 +8,25 @@ require "faker" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. - # Turn false under Spring and add config.action_view.cache_template_loading = true - config.cache_classes = true + # While tests run files are not watched, reloading is not necessary. + config.enable_reloading = false - # Eager loading loads your whole application. When running a single test locally, - # this probably isn't necessary. It's a good idea to do in a continuous integration - # system, or in some way before deploying your code. + # Eager loading loads your entire application. When running a single test locally, + # this is usually not necessary, and can slow down your test suite. However, it's + # recommended that you enable it in continuous integration systems to ensure eager + # loading is working properly before deploying your code. config.eager_load = ENV["CI"].present? # Configure public file server for tests with Cache-Control for performance. config.public_file_server.enabled = true - config.public_file_server.headers = { - "Cache-Control" => "public, max-age=#{1.hour.to_i}", - } + config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{1.hour.to_i}" } # Show full error reports and disable caching. - config.consider_all_requests_local = true + config.consider_all_requests_local = true config.action_controller.perform_caching = false config.cache_store = :null_store - # Raise exceptions instead of rendering exception templates. + # Render exception templates for rescuable exceptions and raise for other exceptions. config.action_dispatch.show_exceptions = false # Disable request forgery protection in test environment. @@ -37,16 +35,20 @@ Rails.application.configure do # Store uploaded files on the local file system in a temporary directory. config.active_storage.service = :test + # Disable caching for Action Mailer templates even if Action Controller + # caching is enabled. config.action_mailer.perform_caching = false - config.action_mailer.default_url_options = { host: "localhost", port: 3000 } - config.action_mailer.default_options = { from: "test@gmail.com" } - # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test + # Unlike controllers, the mailer instance doesn't have any context about the + # incoming request so you'll need to provide the :host parameter yourself. + config.action_mailer.default_url_options = { host: "localhost", port: 3000 } + config.action_mailer.default_options = { from: "test@gmail.com" } + # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr @@ -61,6 +63,10 @@ Rails.application.configure do # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true + + # Raise error when a before_action's only/except options reference missing actions. + # config.action_controller.raise_on_missing_callback_actions = true + Faker::Config.locale = "en-GB" # see https://discuss.rubyonrails.org/t/cve-2022-32224-possible-rce-escalation-bug-with-serialized-columns-in-active-record/81017 diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index e4e6a0e6c..ece129f2b 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -1 +1,7 @@ +# Be sure to restart your server when you modify this file. + +# Version of your assets, change this if you want to expire all your assets. +Rails.application.config.assets.version = "1.0" + +# Add additional assets to the asset load path. Rails.application.config.assets.paths << Rails.root.join("node_modules/@fortawesome/fontawesome-free/webfonts") diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index 3621f97f8..b3076b38f 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -1,8 +1,8 @@ # Be sure to restart your server when you modify this file. -# Define an application-wide content security policy -# For further information see the following documentation -# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy +# Define an application-wide content security policy. +# See the Securing Rails Applications Guide for more information: +# https://guides.rubyonrails.org/security.html#content-security-policy-header # Rails.application.configure do # config.content_security_policy do |policy| @@ -16,11 +16,10 @@ # # policy.report_uri "/csp-violation-report-endpoint" # end # -# # Generate session nonces for permitted importmap and inline scripts +# # Generate session nonces for permitted importmap, inline scripts, and inline styles. # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } -# config.content_security_policy_nonce_directives = %w(script-src) +# config.content_security_policy_nonce_directives = %w(script-src style-src) # -# # Report CSP violations to a specified URI. See: -# # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only +# # Report violations without enforcing the policy. # # config.content_security_policy_report_only = true # end diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index 928c8f671..86f38ad46 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -1,6 +1,8 @@ # Be sure to restart your server when you modify this file. -# Configure sensitive parameters which will be filtered from the log file. +# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. +# Use this to limit dissemination of sensitive information. +# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. Rails.application.config.filter_parameters += %i[ - passw secret token crypt salt certificate otp ssn reset_password_token + passw secret email secret token _key crypt salt certificate otp ssn reset_password_token ] diff --git a/config/initializers/permissions_policy.rb b/config/initializers/permissions_policy.rb index 00f64d71b..7db3b9577 100644 --- a/config/initializers/permissions_policy.rb +++ b/config/initializers/permissions_policy.rb @@ -1,11 +1,13 @@ +# Be sure to restart your server when you modify this file. + # Define an application-wide HTTP permissions policy. For further -# information see https://developers.google.com/web/updates/2018/06/feature-policy -# -# Rails.application.config.permissions_policy do |f| -# f.camera :none -# f.gyroscope :none -# f.microphone :none -# f.usb :none -# f.fullscreen :self -# f.payment :self, "https://secure.example.com" +# information see: https://developers.google.com/web/updates/2018/06/feature-policy + +# Rails.application.config.permissions_policy do |policy| +# policy.camera :none +# policy.gyroscope :none +# policy.microphone :none +# policy.usb :none +# policy.fullscreen :self +# policy.payment :self, "https://secure.example.com" # end diff --git a/config/locales/en.yml b/config/locales/en.yml index 965c1f7a6..7a95aa6fd 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -382,6 +382,10 @@ en: organisation_part_of_another_merge: "This organisation is part of another merge - select a different one." organisation_part_of_another_incomplete_merge: "Another merge request records %{organisation} as merging into %{absorbing_organisation} on %{merge_date}. Select another organisation or remove this organisation from the other merge request." organisation_not_selected: "Select an organisation from the search list." + merge_request_id: + blank: "Select a merge request." + merging_organisation_id: + blank: "Select an organisation to merge." soft_validations: retirement: diff --git a/config/locales/test.en.yml b/config/locales/test.en.yml new file mode 100644 index 000000000..ca1a93282 --- /dev/null +++ b/config/locales/test.en.yml @@ -0,0 +1,17 @@ +en: + forms: + 2021: + lettings: + guidance: + what_counts_as_income: + title: "What counts as income?" + content: "What counts as income?" + finding_scheme: + title: "Can’t find your scheme?" + content: "

Schemes are attached to the organisation that owns the property. Check you have correctly answered question 1 \"Which organisation owns this property?\"

+

If your organisation’s schemes were migrated from old CORE, they may have new names and codes. Search by postcode to find your scheme.

" + scheme_changes_link_text: "Read more about how schemes have changed" + view_schemes_link_text: "View your organisation’s schemes" + soft_validations: + net_income: + hint_text: "hint text" diff --git a/config/puma.rb b/config/puma.rb index d9b3e836c..5d0898ea5 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,9 +1,25 @@ -# Puma can serve each request in a thread from an internal thread pool. -# The `threads` method setting takes two numbers: a minimum and maximum. -# Any libraries that use thread pools should be configured to match -# the maximum value specified for Puma. Default is set to 5 threads for minimum -# and maximum; this matches the default thread size of Active Record. +# This configuration file will be evaluated by Puma. The top-level methods that +# are invoked here are part of Puma's configuration DSL. For more information +# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. + +# Puma starts a configurable number of processes (workers) and each process +# serves each request in a thread from an internal thread pool. +# +# The ideal number of threads per worker depends both on how much time the +# application spends waiting for IO operations and on how much you wish to +# to prioritize throughput over latency. +# +# As a rule of thumb, increasing the number of threads will increase how much +# traffic a given process can handle (throughput), but due to CRuby's +# Global VM Lock (GVL) it has diminishing returns and will degrade the +# response time (latency) of the application. # +# The default is set to 3 threads as it's deemed a decent compromise between +# throughput and latency for the average Rails application. +# +# Any libraries that use a connection pool or another resource pool should +# be configured to provide at least as many connections as the number of +# threads. This includes Active Record's `pool` parameter in `database.yml`. max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } threads min_threads_count, max_threads_count @@ -14,30 +30,16 @@ threads min_threads_count, max_threads_count worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development" # Specifies the `port` that Puma will listen on to receive requests; default is 3000. -# +# port ENV.fetch("PORT") { 3000 } # Specifies the `environment` that Puma will run in. # environment ENV.fetch("RAILS_ENV") { "development" } -# Specifies the `pidfile` that Puma will use. +# Specify the PID file. Defaults to tmp/pids/server.pid in development. +# In other environments, only set the PID file if requested. pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } -# Specifies the number of `workers` to boot in clustered mode. -# Workers are forked web server processes. If using threads and workers together -# the concurrency of the application would be max `threads` * `workers`. -# Workers do not work on JRuby or Windows (both of which do not support -# processes). -# -# workers ENV.fetch("WEB_CONCURRENCY") { 2 } - -# Use the `preload_app!` method when specifying a `workers` number. -# This directive tells Puma to first boot the application and load code -# before forking the application. This takes advantage of Copy On Write -# process behavior so workers use less memory. -# -# preload_app! - -# Allow puma to be restarted by `rails restart` command. +# Allow puma to be restarted by `bin/rails restart` command. plugin :tmp_restart diff --git a/db/migrate/20241206142942_add_service_name_to_active_storage_blobs.active_storage.rb b/db/migrate/20241206142942_add_service_name_to_active_storage_blobs.active_storage.rb new file mode 100644 index 000000000..0a13344fc --- /dev/null +++ b/db/migrate/20241206142942_add_service_name_to_active_storage_blobs.active_storage.rb @@ -0,0 +1,22 @@ +# This migration comes from active_storage (originally 20190112182829) +class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0] + def up + return unless table_exists?(:active_storage_blobs) + + unless column_exists?(:active_storage_blobs, :service_name) + add_column :active_storage_blobs, :service_name, :string + + if configured_service = ActiveStorage::Blob.service.name # rubocop:disable Lint/AssignmentInCondition + ActiveStorage::Blob.unscoped.update_all(service_name: configured_service) + end + + change_column :active_storage_blobs, :service_name, :string, null: false + end + end + + def down + return unless table_exists?(:active_storage_blobs) + + remove_column :active_storage_blobs, :service_name + end +end diff --git a/db/migrate/20241206142943_create_active_storage_variant_records.active_storage.rb b/db/migrate/20241206142943_create_active_storage_variant_records.active_storage.rb new file mode 100644 index 000000000..78b8564cf --- /dev/null +++ b/db/migrate/20241206142943_create_active_storage_variant_records.active_storage.rb @@ -0,0 +1,28 @@ +# This migration comes from active_storage (originally 20191206030411) +class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0] + def change + return unless table_exists?(:active_storage_blobs) + + # Use Active Record's configured type for primary key + create_table :active_storage_variant_records, id: primary_key_type, if_not_exists: true do |t| # rubocop:disable Rails/CreateTableWithTimestamps + t.belongs_to :blob, null: false, index: false, type: blobs_primary_key_type + t.string :variation_digest, null: false + + t.index %i[blob_id variation_digest], name: "index_active_storage_variant_records_uniqueness", unique: true + t.foreign_key :active_storage_blobs, column: :blob_id + end + end + +private + + def primary_key_type + config = Rails.configuration.generators + config.options[config.orm][:primary_key_type] || :primary_key + end + + def blobs_primary_key_type + pkey_name = connection.primary_key(:active_storage_blobs) + pkey_column = connection.columns(:active_storage_blobs).find { |c| c.name == pkey_name } + pkey_column.bigint? ? :bigint : pkey_column.type + end +end diff --git a/db/migrate/20241206142944_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb b/db/migrate/20241206142944_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb new file mode 100644 index 000000000..93c8b85ad --- /dev/null +++ b/db/migrate/20241206142944_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb @@ -0,0 +1,8 @@ +# This migration comes from active_storage (originally 20211119233751) +class RemoveNotNullOnActiveStorageBlobsChecksum < ActiveRecord::Migration[6.0] + def change + return unless table_exists?(:active_storage_blobs) + + change_column_null(:active_storage_blobs, :checksum, true) + end +end diff --git a/db/schema.rb b/db/schema.rb index 1a1c127c6..bd7672c24 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_12_04_100518) do +ActiveRecord::Schema[7.2].define(version: 2024_12_06_142944) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" diff --git a/db/seeds.rb b/db/seeds.rb index 2f018be91..f3dcb688d 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -12,13 +12,13 @@ def find_or_create_user(organisation, email, name, role) end end -unless Rails.env.test? - if LocalAuthority.count.zero? - la_path = "config/local_authorities_data/initial_local_authorities.csv" - service = Imports::LocalAuthoritiesService.new(path: la_path) - service.call - end +if LocalAuthority.count.zero? + la_path = "config/local_authorities_data/initial_local_authorities.csv" + service = Imports::LocalAuthoritiesService.new(path: la_path) + service.call +end +unless Rails.env.test? if LaRentRange.count.zero? Dir.glob("config/rent_range_data/*.csv").each do |path| start_year = File.basename(path, ".csv") diff --git a/package.json b/package.json index 32063907c..c5734b348 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "html5shiv": "^3.7.3", "intersection-observer": "^0.12.0", "mini-css-extract-plugin": "^2.6.0", - "rails_admin": "3.1.3", + "rails_admin": "3.3.0", "regenerator-runtime": "^0.13.9", "sass": "^1.49.9", "sass-loader": "^12.6.0", diff --git a/spec/controllers/errors_controller_spec.rb b/spec/controllers/errors_controller_spec.rb index d8ae16165..30361ea42 100644 --- a/spec/controllers/errors_controller_spec.rb +++ b/spec/controllers/errors_controller_spec.rb @@ -18,7 +18,7 @@ RSpec.describe ErrorsController, type: :controller do describe "GET #unprocessable_entity" do it "returns unprocessable_entity" do get :unprocessable_entity - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end end end diff --git a/spec/features/organisation_spec.rb b/spec/features/organisation_spec.rb index 6f90428be..15bfecf39 100644 --- a/spec/features/organisation_spec.rb +++ b/spec/features/organisation_spec.rb @@ -206,14 +206,14 @@ RSpec.describe "User Features" do it "can filter lettings logs by year" do check("years-2022-field") click_button("Apply filters") - expect(page).to have_current_path("/organisations/#{org_id}/lettings-logs?years[]=&years[]=2022&status[]=&needstypes[]=&assigned_to=all&user_text_search=&user=&owning_organisation_select=all&owning_organisation_text_search=&owning_organisation=&managing_organisation_select=all&managing_organisation_text_search=&managing_organisation=") + expect(page).to have_current_path("/organisations/#{org_id}/lettings-logs?%5Byears%5D[]=&years[]=2022&%5Bstatus%5D[]=&%5Bneedstypes%5D[]=&assigned_to=all&user_text_search=&user=&owning_organisation_select=all&owning_organisation_text_search=&owning_organisation=&managing_organisation_select=all&managing_organisation_text_search=&managing_organisation=") expect(page).not_to have_link first_log.id.to_s, href: "/lettings-logs/#{first_log.id}" end it "can filter lettings logs by needstype" do check("needstypes-1-field") click_button("Apply filters") - expect(page).to have_current_path("/organisations/#{org_id}/lettings-logs?years[]=&status[]=&needstypes[]=&needstypes[]=1&assigned_to=all&user_text_search=&user=&owning_organisation_select=all&owning_organisation_text_search=&owning_organisation=&managing_organisation_select=all&managing_organisation_text_search=&managing_organisation=") + expect(page).to have_current_path("/organisations/#{org_id}/lettings-logs?%5Byears%5D[]=&%5Bstatus%5D[]=&%5Bneedstypes%5D[]=&needstypes[]=1&assigned_to=all&user_text_search=&user=&owning_organisation_select=all&owning_organisation_text_search=&owning_organisation=&managing_organisation_select=all&managing_organisation_text_search=&managing_organisation=") other_general_needs_logs.each do |general_needs_log| expect(page).to have_link general_needs_log.id.to_s, href: "/lettings-logs/#{general_needs_log.id}" end @@ -256,7 +256,7 @@ RSpec.describe "User Features" do end check("years-2022-field") click_button("Apply filters") - expect(page).to have_current_path("/organisations/#{org_id}/sales-logs?years[]=&years[]=2022&status[]=&assigned_to=all&user_text_search=&user=&owning_organisation_select=all&owning_organisation_text_search=&owning_organisation=&managing_organisation_select=all&managing_organisation_text_search=&managing_organisation=") + expect(page).to have_current_path("/organisations/#{org_id}/sales-logs?%5Byears%5D[]=&years[]=2022&%5Bstatus%5D[]=&assigned_to=all&user_text_search=&user=&owning_organisation_select=all&owning_organisation_text_search=&owning_organisation=&managing_organisation_select=all&managing_organisation_text_search=&managing_organisation=") expect(page).not_to have_link first_log.id.to_s, href: "/sales-logs/#{first_log.id}" end end diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb index dfb56665b..84572f35b 100644 --- a/spec/features/schemes_spec.rb +++ b/spec/features/schemes_spec.rb @@ -87,7 +87,7 @@ RSpec.describe "Schemes scheme Features" do it "displays the filters component with a correct count and clear button" do expect(page).to have_content("2 filters applied") - expect(page).to have_link("Clear", href: /clear-filters\?filter_type=schemes/) + expect(page).to have_link("Clear", href: /clear-filters\?.*filter_type=schemes/) end context "when clearing the filters" do @@ -326,7 +326,7 @@ RSpec.describe "Schemes scheme Features" do it "displays the filters component with a correct count and clear button" do expect(page).to have_content("2 filters applied") - expect(page).to have_link("Clear", href: /\/clear-filters\?filter_type=scheme_locations/) + expect(page).to have_link("Clear", href: /\/clear-filters\?.*filter_type=scheme_locations/) end context "when clearing the filters" do diff --git a/spec/features/user_spec.rb b/spec/features/user_spec.rb index 2e837abe2..de3f2cbc5 100644 --- a/spec/features/user_spec.rb +++ b/spec/features/user_spec.rb @@ -269,7 +269,7 @@ RSpec.describe "User Features" do it "displays the filters component with a correct count and clear button" do expect(page).to have_content("2 filters applied") - expect(page).to have_link("Clear", href: /clear-filters\?filter_type=users/) + expect(page).to have_link("Clear", href: /clear-filters\?.*filter_type=users/) end context "when clearing the filters" do @@ -678,7 +678,7 @@ RSpec.describe "User Features" do fill_in("code", with: otp) click_button("Submit") expect(page).to have_content("Check your email") - expect(page).to have_http_status(:unprocessable_entity) + expect(page).to have_http_status(:unprocessable_content) expect(page).to have_title("Error") expect(page).to have_selector(".govuk-error-summary__title") end @@ -691,7 +691,7 @@ RSpec.describe "User Features" do fill_in("code", with: otp) click_button("Submit") expect(page).to have_content("Check your email") - expect(page).to have_http_status(:unprocessable_entity) + expect(page).to have_http_status(:unprocessable_content) expect(page).to have_title("Error") expect(page).to have_selector(".govuk-error-summary__title") end diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 5f7529554..c663087d5 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -51,7 +51,7 @@ rescue ActiveRecord::PendingMigrationError => e end RSpec.configure do |config| # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures - config.fixture_path = "#{::Rails.root}/spec/fixtures" + config.fixture_paths = ["#{::Rails.root}/spec/fixtures"] # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, remove the following line or assign false diff --git a/spec/requests/auth/passwords_controller_spec.rb b/spec/requests/auth/passwords_controller_spec.rb index f35df1c5a..2685e19ab 100644 --- a/spec/requests/auth/passwords_controller_spec.rb +++ b/spec/requests/auth/passwords_controller_spec.rb @@ -107,7 +107,7 @@ RSpec.describe Auth::PasswordsController, type: :request do it "shows an error on the same page" do put "/account/password", headers: headers, params: params - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_css("h1", text: "Reset your password") expect(page).to have_content("passwords you entered do not match") end diff --git a/spec/requests/delete_logs_controller_spec.rb b/spec/requests/delete_logs_controller_spec.rb index cde0848f6..b055e9dd1 100644 --- a/spec/requests/delete_logs_controller_spec.rb +++ b/spec/requests/delete_logs_controller_spec.rb @@ -61,8 +61,9 @@ RSpec.describe "DeleteLogs", type: :request do allow(FilterManager).to receive(:filter_logs).and_return LettingsLog.all end - it "throws an error if selected ids are not provided" do - expect { post delete_logs_lettings_logs_path }.to raise_error ActionController::ParameterMissing + it "returns bad request if selected ids are not provided" do + post delete_logs_lettings_logs_path + expect(response).to have_http_status(:bad_request) end it "calls the filter service with the filters in the session and the search term from the query params" do @@ -120,7 +121,8 @@ RSpec.describe "DeleteLogs", type: :request do end it "requires delete logs form data to be provided" do - expect { post delete_logs_confirmation_lettings_logs_path }.to raise_error(ActionController::ParameterMissing) + post delete_logs_confirmation_lettings_logs_path + expect(response).to have_http_status(:bad_request) end it "shows the correct title" do @@ -346,8 +348,9 @@ RSpec.describe "DeleteLogs", type: :request do allow(FilterManager).to receive(:filter_logs).and_return SalesLog.all end - it "throws an error if selected ids are not provided" do - expect { post delete_logs_sales_logs_path }.to raise_error ActionController::ParameterMissing + it "returns bad request if selected ids are not provided" do + post delete_logs_sales_logs_path + expect(response).to have_http_status(:bad_request) end it "calls the filter service with the filters in the session and the search term from the query params" do @@ -405,7 +408,8 @@ RSpec.describe "DeleteLogs", type: :request do end it "requires delete logs form data to be provided" do - expect { post delete_logs_confirmation_sales_logs_path }.to raise_error(ActionController::ParameterMissing) + post delete_logs_confirmation_sales_logs_path + expect(response).to have_http_status(:bad_request) end it "shows the correct title" do @@ -635,8 +639,9 @@ RSpec.describe "DeleteLogs", type: :request do allow(FilterManager).to receive(:filter_logs).and_return LettingsLog.all end - it "throws an error if selected ids are not provided" do - expect { post delete_lettings_logs_organisation_path(id: organisation) }.to raise_error ActionController::ParameterMissing + it "returns bad request if selected ids are not provided" do + post delete_lettings_logs_organisation_path(id: organisation) + expect(response).to have_http_status(:bad_request) end it "calls the filter service with the filters in the session and the search term from the query params" do @@ -694,7 +699,8 @@ RSpec.describe "DeleteLogs", type: :request do end it "requires delete logs form data to be provided" do - expect { post delete_lettings_logs_confirmation_organisation_path(id: organisation) }.to raise_error(ActionController::ParameterMissing) + post delete_lettings_logs_confirmation_organisation_path(id: organisation) + expect(response).to have_http_status(:bad_request) end it "shows the correct title" do @@ -858,8 +864,9 @@ RSpec.describe "DeleteLogs", type: :request do allow(FilterManager).to receive(:filter_logs).and_return SalesLog.all end - it "throws an error if selected ids are not provided" do - expect { post delete_sales_logs_organisation_path(id: organisation) }.to raise_error ActionController::ParameterMissing + it "returns bad request if selected ids are not provided" do + post delete_sales_logs_organisation_path(id: organisation) + expect(response).to have_http_status(:bad_request) end it "calls the filter service with the filters in the session and the search term from the query params" do @@ -917,7 +924,8 @@ RSpec.describe "DeleteLogs", type: :request do end it "requires delete logs form data to be provided" do - expect { post delete_sales_logs_confirmation_organisation_path(id: organisation) }.to raise_error(ActionController::ParameterMissing) + post delete_sales_logs_confirmation_organisation_path + expect(response).to have_http_status(:bad_request) end it "shows the correct title" do diff --git a/spec/requests/form_controller_spec.rb b/spec/requests/form_controller_spec.rb index 0cbec27d2..6ab49e302 100644 --- a/spec/requests/form_controller_spec.rb +++ b/spec/requests/form_controller_spec.rb @@ -1159,7 +1159,6 @@ RSpec.describe FormController, type: :request do it "displays a success banner" do follow_redirect! - follow_redirect! expect(response.body).to include("You have successfully updated Q31: lead tenant’s age") end @@ -1182,7 +1181,6 @@ RSpec.describe FormController, type: :request do end it "displays a success banner without crashing" do - follow_redirect! follow_redirect! expect(response.body).to include("You have successfully updated") end diff --git a/spec/requests/lettings_logs_controller_spec.rb b/spec/requests/lettings_logs_controller_spec.rb index b902305ad..14cd3095c 100644 --- a/spec/requests/lettings_logs_controller_spec.rb +++ b/spec/requests/lettings_logs_controller_spec.rb @@ -81,7 +81,7 @@ RSpec.describe LettingsLogsController, type: :request do it "validates lettings log parameters" do json_response = JSON.parse(response.body) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(json_response["errors"]).to match_array([["offered", [I18n.t("validations.shared.numeric.within_range", field: "Times previously offered since becoming available", min: 0, max: 20)]], ["age1", [I18n.t("validations.shared.numeric.within_range", field: "Lead tenant’s age", min: 16, max: 120)]]]) end end @@ -1612,7 +1612,7 @@ RSpec.describe LettingsLogsController, type: :request do let(:params) { { age1: 200 } } it "returns 422" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it "returns an error message" do diff --git a/spec/requests/locations_controller_spec.rb b/spec/requests/locations_controller_spec.rb index 6de8e7d33..9afdc94f2 100644 --- a/spec/requests/locations_controller_spec.rb +++ b/spec/requests/locations_controller_spec.rb @@ -1192,7 +1192,7 @@ RSpec.describe LocationsController, type: :request do end it "displays the new page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.location.startdate_invalid")) end end @@ -1266,7 +1266,7 @@ RSpec.describe LocationsController, type: :request do end it "displays the new page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.location.startdate_invalid")) end end @@ -1702,7 +1702,7 @@ RSpec.describe LocationsController, type: :request do let(:params) { { location_deactivation_period: { "deactivation_date": "" } } } it "displays the new page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.location.toggle_date.not_selected")) end end @@ -1711,7 +1711,7 @@ RSpec.describe LocationsController, type: :request do let(:params) { { location_deactivation_period: { deactivation_date_type: "other", "deactivation_date(3i)": "10", "deactivation_date(2i)": "44", "deactivation_date(1i)": "2022" } } } it "displays the new page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.location.toggle_date.invalid")) end end @@ -1720,7 +1720,7 @@ RSpec.describe LocationsController, type: :request do let(:params) { { location_deactivation_period: { deactivation_date_type: "other", "deactivation_date(3i)": "10", "deactivation_date(2i)": "4", "deactivation_date(1i)": "2020" } } } it "displays the new page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.location.toggle_date.out_of_range", date: "1 April 2022")) end end @@ -1729,7 +1729,7 @@ RSpec.describe LocationsController, type: :request do let(:params) { { location_deactivation_period: { deactivation_date_type: "other", "deactivation_date(3i)": "", "deactivation_date(2i)": "2", "deactivation_date(1i)": "2022" } } } it "displays page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.location.toggle_date.invalid")) end end @@ -1738,7 +1738,7 @@ RSpec.describe LocationsController, type: :request do let(:params) { { location_deactivation_period: { deactivation_date_type: "other", "deactivation_date(3i)": "2", "deactivation_date(2i)": "", "deactivation_date(1i)": "2022" } } } it "displays page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.location.toggle_date.invalid")) end end @@ -1747,7 +1747,7 @@ RSpec.describe LocationsController, type: :request do let(:params) { { location_deactivation_period: { deactivation_date_type: "other", "deactivation_date(3i)": "2", "deactivation_date(2i)": "2", "deactivation_date(1i)": "" } } } it "displays page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.location.toggle_date.invalid")) end end @@ -1758,7 +1758,7 @@ RSpec.describe LocationsController, type: :request do let(:add_deactivations) { create(:location_deactivation_period, deactivation_date: Time.zone.local(2022, 5, 5), reactivation_date: Time.zone.local(2022, 10, 12), location:) } it "displays page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.location.deactivation.during_deactivated_period")) end end @@ -2110,7 +2110,7 @@ RSpec.describe LocationsController, type: :request do let(:params) { { location_deactivation_period: { "reactivation_date": "" } } } it "displays the new page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.location.toggle_date.not_selected")) end end @@ -2119,7 +2119,7 @@ RSpec.describe LocationsController, type: :request do let(:params) { { location_deactivation_period: { reactivation_date_type: "other", "reactivation_date(3i)": "10", "reactivation_date(2i)": "44", "reactivation_date(1i)": "2022" } } } it "displays the new page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.location.toggle_date.invalid")) end end @@ -2128,7 +2128,7 @@ RSpec.describe LocationsController, type: :request do let(:params) { { location_deactivation_period: { reactivation_date_type: "other", "reactivation_date(3i)": "10", "reactivation_date(2i)": "4", "reactivation_date(1i)": "2020" } } } it "displays the new page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.location.toggle_date.out_of_range", date: "1 April 2022")) end end @@ -2137,7 +2137,7 @@ RSpec.describe LocationsController, type: :request do let(:params) { { location_deactivation_period: { reactivation_date_type: "other", "reactivation_date(3i)": "", "reactivation_date(2i)": "2", "reactivation_date(1i)": "2022" } } } it "displays page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.location.toggle_date.invalid")) end end @@ -2146,7 +2146,7 @@ RSpec.describe LocationsController, type: :request do let(:params) { { location_deactivation_period: { reactivation_date_type: "other", "reactivation_date(3i)": "2", "reactivation_date(2i)": "", "reactivation_date(1i)": "2022" } } } it "displays page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.location.toggle_date.invalid")) end end @@ -2155,7 +2155,7 @@ RSpec.describe LocationsController, type: :request do let(:params) { { location_deactivation_period: { reactivation_date_type: "other", "reactivation_date(3i)": "2", "reactivation_date(2i)": "2", "reactivation_date(1i)": "" } } } it "displays page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.location.toggle_date.invalid")) end end @@ -2165,7 +2165,7 @@ RSpec.describe LocationsController, type: :request do let(:params) { { location_deactivation_period: { reactivation_date_type: "other", "reactivation_date(3i)": "8", "reactivation_date(2i)": "9", "reactivation_date(1i)": "2022" } } } it "displays page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.location.reactivation.before_deactivation", date: "10 October 2022")) end end diff --git a/spec/requests/merge_requests_controller_spec.rb b/spec/requests/merge_requests_controller_spec.rb index 074d2186c..4c07dbfb7 100644 --- a/spec/requests/merge_requests_controller_spec.rb +++ b/spec/requests/merge_requests_controller_spec.rb @@ -95,7 +95,7 @@ RSpec.describe MergeRequestsController, type: :request do end it "displays the page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content("Another merge request records #{another_organisation.name} as merging into #{other_merge_request.absorbing_organisation&.name} on 4 May 2022. Select another organisation or remove this organisation from the other merge request.") end end @@ -113,7 +113,7 @@ RSpec.describe MergeRequestsController, type: :request do it "does not update the merge request" do merge_request.reload expect(merge_request.merging_organisations.count).to eq(0) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.merge_request.organisation_part_of_another_merge")) end end @@ -159,7 +159,7 @@ RSpec.describe MergeRequestsController, type: :request do it "does not update the merge request" do merge_request.reload expect(merge_request.merging_organisations.count).to eq(0) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.merge_request.organisation_not_selected")) end end @@ -174,7 +174,7 @@ RSpec.describe MergeRequestsController, type: :request do it "does not update the merge request" do merge_request.reload expect(merge_request.merging_organisations.count).to eq(0) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.merge_request.organisation_not_selected")) end end @@ -363,7 +363,7 @@ RSpec.describe MergeRequestsController, type: :request do it "renders the error" do request - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content("Enter a merge date") end @@ -385,7 +385,7 @@ RSpec.describe MergeRequestsController, type: :request do it "displays the page with an error message" do request - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content("Enter a valid merge date") end end @@ -426,7 +426,7 @@ RSpec.describe MergeRequestsController, type: :request do it "displays the page with an error message" do request - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content("The merge date must not be later than a year from today’s date.") end end @@ -467,7 +467,7 @@ RSpec.describe MergeRequestsController, type: :request do it "renders the error" do request - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content("You must answer absorbing organisation already active?") end @@ -490,7 +490,7 @@ RSpec.describe MergeRequestsController, type: :request do it "renders the error" do request - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content("You must answer was this merge reported by a helpdesk ticket?") end @@ -511,7 +511,7 @@ RSpec.describe MergeRequestsController, type: :request do it "renders the error" do request - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content("You must answer the ticket number") end diff --git a/spec/requests/notifications_controller_spec.rb b/spec/requests/notifications_controller_spec.rb index 0982057ab..367c64550 100644 --- a/spec/requests/notifications_controller_spec.rb +++ b/spec/requests/notifications_controller_spec.rb @@ -37,7 +37,7 @@ RSpec.describe NotificationsController, type: :request do it "gives an error response" do request - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end end diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index af9027753..0a5614be3 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -1889,7 +1889,7 @@ RSpec.describe OrganisationsController, type: :request do it "displays the form with an error message" do request - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.organisation.name_missing")) expect(page).to have_content(I18n.t("validations.organisation.provider_type_missing")) end @@ -2055,7 +2055,7 @@ RSpec.describe OrganisationsController, type: :request do end it "has clear filters link" do - expect(page).to have_link("Clear", href: clear_filters_path(filter_type: "lettings_logs", path_params: { organisation_id: organisation.id })) + expect(page).to have_link("Clear", href: clear_filters_path(filter_type: "lettings_logs", filter_path_params: { organisation_id: organisation.id })) end end end @@ -2417,7 +2417,7 @@ RSpec.describe OrganisationsController, type: :request do it "displays an error" do post "/organisations/#{organisation.id}/schemes/duplicates", headers: headers, params: params - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content("You must resolve all duplicates or indicate that there are no duplicates") end end diff --git a/spec/requests/sales_logs_controller_spec.rb b/spec/requests/sales_logs_controller_spec.rb index 840613458..06461bf4f 100644 --- a/spec/requests/sales_logs_controller_spec.rb +++ b/spec/requests/sales_logs_controller_spec.rb @@ -92,7 +92,7 @@ RSpec.describe SalesLogsController, type: :request do it "validates sales log parameters" do json_response = JSON.parse(response.body) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(json_response["errors"]).to match_array([["beds", ["Number of bedrooms must be 1 if the property is a bedsit."]], ["proptype", ["Answer cannot be 'Bedsit' if the property has 2 or more bedrooms."]]]) end end diff --git a/spec/requests/schemes_controller_spec.rb b/spec/requests/schemes_controller_spec.rb index 2eb2330c8..713e54142 100644 --- a/spec/requests/schemes_controller_spec.rb +++ b/spec/requests/schemes_controller_spec.rb @@ -1057,7 +1057,7 @@ RSpec.describe SchemesController, type: :request do it "renders the same page with error message" do post "/schemes", params: params - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content("Create a new supported housing scheme") expect(page).to have_content(I18n.t("activerecord.errors.models.scheme.attributes.scheme_type.invalid")) expect(page).to have_content(I18n.t("activerecord.errors.models.scheme.attributes.registered_under_care_act.invalid")) @@ -1185,7 +1185,7 @@ RSpec.describe SchemesController, type: :request do it "renders the same page with error message" do post "/schemes", params: params - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content("Create a new supported housing scheme") expect(page).to have_content(I18n.t("activerecord.errors.models.scheme.attributes.scheme_type.invalid")) expect(page).to have_content(I18n.t("activerecord.errors.models.scheme.attributes.registered_under_care_act.invalid")) @@ -1318,7 +1318,7 @@ RSpec.describe SchemesController, type: :request do it "renders the same page with error message" do post "/schemes", params: params - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content("Create a new supported housing scheme") expect(page).to have_content(I18n.t("activerecord.errors.models.scheme.attributes.scheme_type.invalid")) expect(page).to have_content(I18n.t("activerecord.errors.models.scheme.attributes.registered_under_care_act.invalid")) @@ -1334,7 +1334,7 @@ RSpec.describe SchemesController, type: :request do it "displays the new page with an error message" do post "/schemes", params: params - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content("Enter an organisation that owns housing stock") end end @@ -1375,7 +1375,7 @@ RSpec.describe SchemesController, type: :request do let(:params) { { scheme: { owning_organisation_id: user.organisation.id, arrangement_type: nil, confirmed: true, page: "check-answers" } } } it "does not allow the scheme to be confirmed" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("activerecord.errors.models.scheme.attributes.arrangement_type.invalid")) end end @@ -1417,7 +1417,7 @@ RSpec.describe SchemesController, type: :request do end it "renders the same page with error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content("Create a new supported housing scheme") expect(page).to have_content(I18n.t("activerecord.errors.models.scheme.attributes.service_name.invalid")) expect(page).to have_content(I18n.t("activerecord.errors.models.scheme.attributes.scheme_type.invalid")) @@ -1684,7 +1684,7 @@ RSpec.describe SchemesController, type: :request do let(:params) { { scheme: { owning_organisation_id: user.organisation.id, arrangement_type: nil, confirmed: true, page: "check-answers" } } } it "does not allow the scheme to be confirmed" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("activerecord.errors.models.scheme.attributes.arrangement_type.invalid")) end end @@ -1728,7 +1728,7 @@ RSpec.describe SchemesController, type: :request do end it "renders the same page with error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content("Create a new supported housing scheme") expect(page).to have_content(I18n.t("activerecord.errors.models.scheme.attributes.owning_organisation_id.invalid")) expect(page).to have_content(I18n.t("activerecord.errors.models.scheme.attributes.service_name.invalid")) @@ -2895,7 +2895,7 @@ RSpec.describe SchemesController, type: :request do let(:params) { { scheme_deactivation_period: { "deactivation_date": "" } } } it "displays the new page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.scheme.toggle_date.not_selected")) end end @@ -2904,7 +2904,7 @@ RSpec.describe SchemesController, type: :request do let(:params) { { scheme_deactivation_period: { deactivation_date_type: "other", "deactivation_date(3i)": "10", "deactivation_date(2i)": "44", "deactivation_date(1i)": "2022" } } } it "displays the new page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.scheme.toggle_date.invalid")) end end @@ -2913,7 +2913,7 @@ RSpec.describe SchemesController, type: :request do let(:params) { { scheme_deactivation_period: { deactivation_date_type: "other", "deactivation_date(3i)": "10", "deactivation_date(2i)": "4", "deactivation_date(1i)": "2020" } } } it "displays the new page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.scheme.toggle_date.out_of_range", date: "1 April 2022")) end end @@ -2922,7 +2922,7 @@ RSpec.describe SchemesController, type: :request do let(:params) { { scheme_deactivation_period: { deactivation_date_type: "other", "deactivation_date(3i)": "", "deactivation_date(2i)": "2", "deactivation_date(1i)": "2022" } } } it "displays page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.scheme.toggle_date.invalid")) end end @@ -2931,7 +2931,7 @@ RSpec.describe SchemesController, type: :request do let(:params) { { scheme_deactivation_period: { deactivation_date_type: "other", "deactivation_date(3i)": "2", "deactivation_date(2i)": "", "deactivation_date(1i)": "2022" } } } it "displays page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.scheme.toggle_date.invalid")) end end @@ -2940,7 +2940,7 @@ RSpec.describe SchemesController, type: :request do let(:params) { { scheme_deactivation_period: { deactivation_date_type: "other", "deactivation_date(3i)": "2", "deactivation_date(2i)": "2", "deactivation_date(1i)": "" } } } it "displays page with an error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.scheme.toggle_date.invalid")) end end diff --git a/spec/requests/users_controller_spec.rb b/spec/requests/users_controller_spec.rb index 12418d532..257bd681a 100644 --- a/spec/requests/users_controller_spec.rb +++ b/spec/requests/users_controller_spec.rb @@ -67,7 +67,7 @@ RSpec.describe UsersController, type: :request do end it "shows an error on the same page if passwords don't match" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_css("h1", class: "govuk-heading-l", text: "Change your password") expect(page).to have_selector(".govuk-error-summary__title") expect(page).to have_content("passwords you entered do not match") @@ -349,7 +349,7 @@ RSpec.describe UsersController, type: :request do end it "show an error" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end end @@ -377,7 +377,7 @@ RSpec.describe UsersController, type: :request do end it "shows an error if passwords don't match" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_selector(".govuk-error-summary__title") end end @@ -792,9 +792,8 @@ RSpec.describe UsersController, type: :request do context "when the current user does not match the user ID" do it "there is no route" do - expect { - get "/users/#{other_user.id}/password/edit", headers:, params: {} - }.to raise_error(ActionController::RoutingError) + get "/users/#{other_user.id}/password/edit", headers:, params: {} + expect(response).to have_http_status(:not_found) end end end @@ -840,7 +839,7 @@ RSpec.describe UsersController, type: :request do end it "shows an error if passwords don't match" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_selector(".govuk-error-summary__title") end end @@ -955,7 +954,7 @@ RSpec.describe UsersController, type: :request do end it "show an error" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end end @@ -976,7 +975,7 @@ RSpec.describe UsersController, type: :request do let(:phone) { "" } it "validates telephone number" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("activerecord.errors.models.user.attributes.phone.blank")) end end @@ -985,7 +984,7 @@ RSpec.describe UsersController, type: :request do let(:phone) { "randomstring" } it "validates telephone number" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("activerecord.errors.models.user.attributes.phone.invalid")) end end @@ -994,7 +993,7 @@ RSpec.describe UsersController, type: :request do let(:phone) { "123" } it "validates telephone number" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("activerecord.errors.models.user.attributes.phone.invalid")) end end @@ -1075,7 +1074,7 @@ RSpec.describe UsersController, type: :request do it "shows an error" do request - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.email.taken")) end end @@ -1093,7 +1092,7 @@ RSpec.describe UsersController, type: :request do it "shows an error" do request - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("validations.role.invalid")) end end @@ -1111,7 +1110,7 @@ RSpec.describe UsersController, type: :request do it "shows an error" do request - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("activerecord.errors.models.user.attributes.name.blank")) expect(page).to have_content(I18n.t("activerecord.errors.models.user.attributes.email.blank")) end @@ -1131,7 +1130,7 @@ RSpec.describe UsersController, type: :request do it "validates telephone number" do request - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("activerecord.errors.models.user.attributes.phone.invalid")) end end @@ -1141,7 +1140,7 @@ RSpec.describe UsersController, type: :request do it "validates telephone number" do request - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("activerecord.errors.models.user.attributes.phone.invalid")) end end @@ -1748,9 +1747,8 @@ RSpec.describe UsersController, type: :request do context "when the current user does not match the user ID" do it "there is no route" do - expect { - get "/users/#{other_user.id}/password/edit", headers:, params: {} - }.to raise_error(ActionController::RoutingError) + get "/users/#{other_user.id}/password/edit", headers:, params: {} + expect(response).to have_http_status(:not_found) end end end @@ -1912,7 +1910,7 @@ RSpec.describe UsersController, type: :request do end it "shows an error if passwords don't match" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_selector(".govuk-error-summary__title") end end @@ -1928,7 +1926,7 @@ RSpec.describe UsersController, type: :request do let(:params) { { id: user.id, user: { organisation_id: "" } } } it "does not update the organisation" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_selector(".govuk-error-summary__title") end end @@ -2097,7 +2095,7 @@ RSpec.describe UsersController, type: :request do let(:params) { { id: other_user.id, user: { organisation_id: "" } } } it "does not update the organisation" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_selector(".govuk-error-summary__title") end end @@ -2136,7 +2134,7 @@ RSpec.describe UsersController, type: :request do end it "displays the error message" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content("Select if you want to reassign logs") end end @@ -2184,7 +2182,7 @@ RSpec.describe UsersController, type: :request do end it "required the new org to have stock owner relationship with the current user org" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content("New org must be a stock owner of #{other_user.organisation_name} to make this change.") end end @@ -2198,7 +2196,7 @@ RSpec.describe UsersController, type: :request do end it "required the new org to have stock owner relationship with the managing organisations" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content("New org must be a stock owner of #{other_user.organisation_name}, #{new_organisation_2.name}, and #{new_organisation_3.name} to make this change.") end end @@ -2215,7 +2213,7 @@ RSpec.describe UsersController, type: :request do end it "required the new org to have managing agent relationship with the current user org" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content("New org must be a managing agent of #{other_user.organisation_name} to make this change.") end end @@ -2229,7 +2227,7 @@ RSpec.describe UsersController, type: :request do end it "required the new org to have managing agent relationship with owning organisations" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content("New org must be a managing agent of #{other_user.organisation.name}, #{new_organisation_2.name}, and #{new_organisation_3.name} to make this change.") end end @@ -2246,7 +2244,7 @@ RSpec.describe UsersController, type: :request do end it "show an error" do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end end end @@ -2309,7 +2307,7 @@ RSpec.describe UsersController, type: :request do it "shows an error messages for all failed validations" do request - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("activerecord.errors.models.user.attributes.name.blank")) expect(page).to have_content(I18n.t("activerecord.errors.models.user.attributes.email.blank")) expect(page).to have_content(I18n.t("activerecord.errors.models.user.attributes.organisation_id.blank")) @@ -2324,7 +2322,7 @@ RSpec.describe UsersController, type: :request do it "shows an error" do request - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(page).to have_content(I18n.t("activerecord.errors.models.user.attributes.email.taken")) end end diff --git a/spec/services/merge/merge_organisations_service_spec.rb b/spec/services/merge/merge_organisations_service_spec.rb index fbb52c2a5..f20e16a16 100644 --- a/spec/services/merge/merge_organisations_service_spec.rb +++ b/spec/services/merge/merge_organisations_service_spec.rb @@ -16,7 +16,7 @@ RSpec.describe Merge::MergeOrganisationsService do end context "when merging a single organisation into an existing organisation" do - subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: absorbing_organisation.id, merging_organisation_ids: [merging_organisation_ids], merge_date: nil) } + subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: absorbing_organisation.id, merging_organisation_ids:, merge_date: nil) } let(:absorbing_organisation) { create(:organisation, holds_own_stock: false, name: "absorbing org") } let(:absorbing_organisation_user) { create(:user, organisation: absorbing_organisation) } @@ -53,7 +53,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(absorbing_organisation.id).and_return(absorbing_organisation) allow(absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -97,7 +97,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(absorbing_organisation.id).and_return(absorbing_organisation) allow(absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -134,7 +134,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(absorbing_organisation.id).and_return(absorbing_organisation) allow(absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -327,7 +327,7 @@ RSpec.describe Merge::MergeOrganisationsService do end context "and deactivation is after the merge date and before an open collection window" do - subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: absorbing_organisation.id, merging_organisation_ids: [merging_organisation_ids], merge_date: Time.zone.today - 6.years) } + subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: absorbing_organisation.id, merging_organisation_ids:, merge_date: Time.zone.today - 6.years) } let!(:scheme) { create(:scheme, owning_organisation: merging_organisation, old_id: "scheme_old_id", old_visible_id: "scheme_old_visible_id", startdate: nil) } let!(:location) { create(:location, scheme:, old_id: "location_old_id", old_visible_id: "location_old_visible_id", startdate: nil) } @@ -551,7 +551,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(absorbing_organisation.id).and_return(absorbing_organisation) allow(absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -584,7 +584,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(absorbing_organisation.id).and_return(absorbing_organisation) allow(absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -596,7 +596,7 @@ RSpec.describe Merge::MergeOrganisationsService do end context "with merge date in closed collection year" do - subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: absorbing_organisation.id, merging_organisation_ids: [merging_organisation_ids], merge_date: Time.zone.local(2021, 3, 3)) } + subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: absorbing_organisation.id, merging_organisation_ids:, merge_date: Time.zone.local(2021, 3, 3)) } it "does not validate saledate for closed collection years" do sales_log.saledate = Time.zone.local(2022, 5, 1) @@ -611,7 +611,7 @@ RSpec.describe Merge::MergeOrganisationsService do end context "and merge date is provided" do - subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: absorbing_organisation.id, merging_organisation_ids: [merging_organisation_ids], merge_date: Time.zone.yesterday) } + subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: absorbing_organisation.id, merging_organisation_ids:, merge_date: Time.zone.yesterday) } it "sets merge date on merged organisation" do merge_organisations_service.call @@ -646,7 +646,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(absorbing_organisation.id).and_return(absorbing_organisation) allow(absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -682,7 +682,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(absorbing_organisation.id).and_return(absorbing_organisation) allow(absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -706,7 +706,7 @@ RSpec.describe Merge::MergeOrganisationsService do end context "with merge date in closed collection year" do - subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: absorbing_organisation.id, merging_organisation_ids: [merging_organisation_ids], merge_date: Time.zone.local(2021, 3, 3)) } + subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: absorbing_organisation.id, merging_organisation_ids:, merge_date: Time.zone.local(2021, 3, 3)) } it "does not validate startdate for closed collection years" do owned_lettings_log.startdate = Time.zone.local(2022, 4, 1) @@ -825,7 +825,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(absorbing_organisation.id).and_return(absorbing_organisation) allow(absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -842,7 +842,7 @@ RSpec.describe Merge::MergeOrganisationsService do end context "and absorbing_organisation_active_from_merge_date is true" do - subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: absorbing_organisation.id, merging_organisation_ids: [merging_organisation_ids], merge_date: Time.zone.yesterday, absorbing_organisation_active_from_merge_date: true) } + subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: absorbing_organisation.id, merging_organisation_ids:, merge_date: Time.zone.yesterday, absorbing_organisation_active_from_merge_date: true) } it "sets available from to merge_date for absorbing organisation" do merge_organisations_service.call @@ -854,7 +854,7 @@ RSpec.describe Merge::MergeOrganisationsService do end context "and absorbing_organisation_active_from_merge_date is true" do - subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: absorbing_organisation.id, merging_organisation_ids: [merging_organisation_ids], absorbing_organisation_active_from_merge_date: true) } + subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: absorbing_organisation.id, merging_organisation_ids:, absorbing_organisation_active_from_merge_date: true) } it "sets available from to merge_date (today) for absorbing organisation" do merge_organisations_service.call @@ -910,7 +910,7 @@ RSpec.describe Merge::MergeOrganisationsService do end context "when merging a multiple organisations into an existing organisation" do - subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: absorbing_organisation.id, merging_organisation_ids: [merging_organisation_ids], merge_date: nil) } + subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: absorbing_organisation.id, merging_organisation_ids:, merge_date: nil) } let(:absorbing_organisation) { create(:organisation, holds_own_stock: false, name: "absorbing org") } let(:absorbing_organisation_user) { create(:user, organisation: absorbing_organisation) } @@ -944,7 +944,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(absorbing_organisation.id).and_return(absorbing_organisation) allow(absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -1069,7 +1069,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(absorbing_organisation.id).and_return(absorbing_organisation) allow(absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -1086,7 +1086,7 @@ RSpec.describe Merge::MergeOrganisationsService do end context "and merge date is provided" do - subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: absorbing_organisation.id, merging_organisation_ids: [merging_organisation_ids], merge_date: Time.zone.yesterday) } + subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: absorbing_organisation.id, merging_organisation_ids:, merge_date: Time.zone.yesterday) } it "sets merge date and absorbing organisation on merged organisations" do merge_organisations_service.call @@ -1102,7 +1102,7 @@ RSpec.describe Merge::MergeOrganisationsService do end context "when merging a single organisation into a new organisation" do - subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: new_absorbing_organisation.id, merging_organisation_ids: [merging_organisation_ids], merge_date: nil) } + subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: new_absorbing_organisation.id, merging_organisation_ids:, merge_date: nil) } let(:new_absorbing_organisation) { create(:organisation, :without_dpc, holds_own_stock: false) } let(:new_absorbing_organisation_user) { create(:user, organisation: new_absorbing_organisation) } @@ -1139,7 +1139,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(new_absorbing_organisation.id).and_return(new_absorbing_organisation) allow(new_absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -1183,7 +1183,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(new_absorbing_organisation.id).and_return(new_absorbing_organisation) allow(new_absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -1220,7 +1220,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(new_absorbing_organisation.id).and_return(new_absorbing_organisation) allow(new_absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -1325,7 +1325,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(new_absorbing_organisation.id).and_return(new_absorbing_organisation) allow(new_absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -1357,7 +1357,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(new_absorbing_organisation.id).and_return(new_absorbing_organisation) allow(new_absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -1370,7 +1370,7 @@ RSpec.describe Merge::MergeOrganisationsService do end context "and merge date is provided" do - subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: new_absorbing_organisation.id, merging_organisation_ids: [merging_organisation_ids], merge_date: Time.zone.yesterday) } + subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: new_absorbing_organisation.id, merging_organisation_ids:, merge_date: Time.zone.yesterday) } it "sets merge date on merged organisation" do merge_organisations_service.call @@ -1396,7 +1396,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(new_absorbing_organisation.id).and_return(new_absorbing_organisation) allow(new_absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -1432,7 +1432,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(new_absorbing_organisation.id).and_return(new_absorbing_organisation) allow(new_absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -1538,7 +1538,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(new_absorbing_organisation.id).and_return(new_absorbing_organisation) allow(new_absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -1555,7 +1555,7 @@ RSpec.describe Merge::MergeOrganisationsService do end context "and absorbing_organisation_active_from_merge_date is true" do - subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: new_absorbing_organisation.id, merging_organisation_ids: [merging_organisation_ids], merge_date: Time.zone.yesterday, absorbing_organisation_active_from_merge_date: true) } + subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: new_absorbing_organisation.id, merging_organisation_ids:, merge_date: Time.zone.yesterday, absorbing_organisation_active_from_merge_date: true) } it "sets available from to merge_date for absorbing organisation" do merge_organisations_service.call @@ -1567,7 +1567,7 @@ RSpec.describe Merge::MergeOrganisationsService do end context "and absorbing_organisation_active_from_merge_date is true" do - subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: new_absorbing_organisation.id, merging_organisation_ids: [merging_organisation_ids], absorbing_organisation_active_from_merge_date: true) } + subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: new_absorbing_organisation.id, merging_organisation_ids:, absorbing_organisation_active_from_merge_date: true) } it "sets available from to merge_date (today) for absorbing organisation" do merge_organisations_service.call @@ -1579,7 +1579,7 @@ RSpec.describe Merge::MergeOrganisationsService do end context "when merging multiple organisations into a new organisation" do - subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: new_absorbing_organisation.id, merging_organisation_ids: [merging_organisation_ids], merge_date: nil) } + subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: new_absorbing_organisation.id, merging_organisation_ids:, merge_date: nil) } let(:new_absorbing_organisation) { create(:organisation, :without_dpc, holds_own_stock: false) } let(:new_absorbing_organisation_user) { create(:user, organisation: new_absorbing_organisation) } @@ -1628,7 +1628,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(new_absorbing_organisation.id).and_return(new_absorbing_organisation) allow(new_absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -1670,7 +1670,7 @@ RSpec.describe Merge::MergeOrganisationsService do end it "rolls back if there's an error" do - allow(Organisation).to receive(:find).with([merging_organisation_ids]).and_return(Organisation.find(merging_organisation_ids)) + allow(Organisation).to receive(:find).with(merging_organisation_ids).and_return(Organisation.find(merging_organisation_ids)) allow(Organisation).to receive(:find).with(new_absorbing_organisation.id).and_return(new_absorbing_organisation) allow(new_absorbing_organisation).to receive(:save!).and_raise(ActiveRecord::RecordInvalid) expect(Rails.logger).to receive(:error).with("Organisation merge failed with: Record invalid") @@ -1687,7 +1687,7 @@ RSpec.describe Merge::MergeOrganisationsService do end context "and merge date is provided" do - subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: new_absorbing_organisation.id, merging_organisation_ids: [merging_organisation_ids], merge_date: Time.zone.yesterday) } + subject(:merge_organisations_service) { described_class.new(absorbing_organisation_id: new_absorbing_organisation.id, merging_organisation_ids:, merge_date: Time.zone.yesterday) } it "sets merge date and absorbing organisation on merged organisations" do merge_organisations_service.call diff --git a/yarn.lock b/yarn.lock index 483095046..0c84d632e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3961,7 +3961,7 @@ jest-worker@^27.4.5: merge-stream "^2.0.0" supports-color "^8.0.0" -jquery-ui@^1.12.1: +"jquery-ui@^1.12.1 <1.14.0": version "1.13.3" resolved "https://registry.yarnpkg.com/jquery-ui/-/jquery-ui-1.13.3.tgz#d9f5292b2857fa1f2fdbbe8f2e66081664eb9bc5" integrity sha512-D2YJfswSJRh/B8M/zCowDpNFfwsDmtfnMPwjJTyvl+CBqzpYwQ+gFYIbUUlzijy/Qvoy30H1YhoSui4MNYpRwA== @@ -4824,10 +4824,10 @@ queue-tick@^1.0.1: resolved "https://registry.yarnpkg.com/queue-tick/-/queue-tick-1.0.1.tgz#f6f07ac82c1fd60f82e098b417a80e52f1f4c142" integrity sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag== -rails_admin@3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/rails_admin/-/rails_admin-3.1.3.tgz#1da3f2214876f4ffd3a1db01452c28a8f7d4d989" - integrity sha512-79CBB2BMB3fSGPz1P8eNxCboHVlkBWBaxKxfo4QwCAFxsA3WAjfM0MeWUtGHI8Mn8XEZxCdEDz9oYlvlBpMtng== +rails_admin@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/rails_admin/-/rails_admin-3.3.0.tgz#58701b189e40b7c7f9a0a8ba2b996a41d5842017" + integrity sha512-sgdLMdJDOQmkEWYXY0uqLYxi7eMdhCEU4ZuKpVKdSssMoOr9iqCX8/sOP4ErRiC8Iez5x1vXVOv0Iki4ZKCNug== dependencies: "@babel/runtime" "^7.16.7" "@fortawesome/fontawesome-free" ">=5.15.0 <7.0.0" @@ -4837,7 +4837,7 @@ rails_admin@3.1.3: bootstrap "^5.1.3" flatpickr "^4.6.9" jquery "^3.6.0" - jquery-ui "^1.12.1" + jquery-ui "^1.12.1 <1.14.0" random-bytes@~1.0.0: version "1.0.0" From dace19377402cefccf43d40e808ae0040844013b Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Mon, 16 Dec 2024 09:07:36 +0000 Subject: [PATCH 22/30] CLDC-3677 Update BU content (#2845) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Change instances of “reupload” to “upload again”, remove inset text * Change bu filter wording * Update heading * Update fix choice content --- app/components/bulk_upload_error_row_component.html.erb | 2 +- app/helpers/logs_helper.rb | 2 +- .../forms/bulk_upload_lettings_resume/fix_choice.rb | 2 +- app/models/forms/bulk_upload_sales_resume/fix_choice.rb | 2 +- .../forms/prepare_your_file_2024.html.erb | 2 -- .../bulk_upload_lettings_resume/deletion_report.html.erb | 2 +- .../confirm.html.erb | 2 +- .../bulk_upload_sales_resume/deletion_report.html.erb | 2 +- .../confirm.html.erb | 2 +- app/views/bulk_upload_shared/_moved_user_banner.html.erb | 4 ++-- app/views/bulk_upload_shared/guidance.html.erb | 2 +- .../bulk_upload_lettings_results_controller_spec.rb | 8 ++++---- ...oad_lettings_soft_validations_check_controller_spec.rb | 2 +- .../requests/bulk_upload_sales_results_controller_spec.rb | 8 ++++---- ...upload_sales_soft_validations_check_controller_spec.rb | 2 +- spec/requests/lettings_logs_controller_spec.rb | 4 ++-- spec/requests/sales_logs_controller_spec.rb | 4 ++-- 17 files changed, 25 insertions(+), 27 deletions(-) diff --git a/app/components/bulk_upload_error_row_component.html.erb b/app/components/bulk_upload_error_row_component.html.erb index 4bd303957..db1ceab7a 100644 --- a/app/components/bulk_upload_error_row_component.html.erb +++ b/app/components/bulk_upload_error_row_component.html.erb @@ -38,7 +38,7 @@ <% if potential_errors.any? %>

Potential errors

-

The following groups of cells might have conflicting data. Check the answers and fix any incorrect data.

If the answers are correct, fix the critical errors and reupload the file. You'll need to confirm that the following data is correct when the file only contains potential errors.

+

The following groups of cells might have conflicting data. Check the answers and fix any incorrect data.

If the answers are correct, fix the critical errors and upload the file again. You'll need to confirm that the following data is correct when the file only contains potential errors.

<%= govuk_table(html_attributes: { class: "no-bottom-border" }) do |table| %> <%= table.with_head do |head| %> <% head.with_row do |row| %> diff --git a/app/helpers/logs_helper.rb b/app/helpers/logs_helper.rb index 4b8f6211f..981642f92 100644 --- a/app/helpers/logs_helper.rb +++ b/app/helpers/logs_helper.rb @@ -10,7 +10,7 @@ module LogsHelper def bulk_upload_options(bulk_upload) array = bulk_upload ? [bulk_upload.id] : [] - array.index_with { |_bulk_upload_id| "With logs from bulk upload" } + array.index_with { |_bulk_upload_id| "Only logs from this bulk upload" } end def search_label_for_controller(controller) diff --git a/app/models/forms/bulk_upload_lettings_resume/fix_choice.rb b/app/models/forms/bulk_upload_lettings_resume/fix_choice.rb index 5ee4d37fd..40ada602e 100644 --- a/app/models/forms/bulk_upload_lettings_resume/fix_choice.rb +++ b/app/models/forms/bulk_upload_lettings_resume/fix_choice.rb @@ -14,7 +14,7 @@ module Forms def options [ OpenStruct.new(id: "create-fix-inline", name: "Upload these logs and fix errors on CORE site"), - OpenStruct.new(id: "upload-again", name: "Fix errors in the CSV and re-upload"), + OpenStruct.new(id: "upload-again", name: "Fix errors in the CSV and upload the file again"), ] end diff --git a/app/models/forms/bulk_upload_sales_resume/fix_choice.rb b/app/models/forms/bulk_upload_sales_resume/fix_choice.rb index b34f50d3a..79d06529a 100644 --- a/app/models/forms/bulk_upload_sales_resume/fix_choice.rb +++ b/app/models/forms/bulk_upload_sales_resume/fix_choice.rb @@ -14,7 +14,7 @@ module Forms def options [ OpenStruct.new(id: "create-fix-inline", name: "Upload these logs and fix errors on CORE site"), - OpenStruct.new(id: "upload-again", name: "Fix errors in the CSV and re-upload"), + OpenStruct.new(id: "upload-again", name: "Fix errors in the CSV and upload the file again"), ] end diff --git a/app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2024.html.erb b/app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2024.html.erb index 3e7f0443c..ce873b6d7 100644 --- a/app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2024.html.erb +++ b/app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2024.html.erb @@ -27,8 +27,6 @@ "If you have reordered the headers, keep the headers in the file.", ], type: :bullet %> - <%= govuk_inset_text(text: "You can upload both general needs and supported housing logs in the same file for 2024 to 2025 data.") %> -

Save your file

<%= govuk_list ["Save your file as a CSV.", "Your file should now be ready to upload."], type: :bullet %> diff --git a/app/views/bulk_upload_lettings_resume/deletion_report.html.erb b/app/views/bulk_upload_lettings_resume/deletion_report.html.erb index a13979dfd..d3533a130 100644 --- a/app/views/bulk_upload_lettings_resume/deletion_report.html.erb +++ b/app/views/bulk_upload_lettings_resume/deletion_report.html.erb @@ -28,6 +28,6 @@
<%= form_with model: @form, scope: :form, url: page_bulk_upload_lettings_resume_path(@bulk_upload, "confirm"), method: :patch do |f| %> <%= f.govuk_submit "Clear this data and upload the logs" %> - <%= govuk_button_link_to "I have fixed these errors and I want to reupload the file", start_bulk_upload_lettings_logs_path, secondary: true %> + <%= govuk_button_link_to "I have fixed these errors and I want to upload the file again", start_bulk_upload_lettings_logs_path, secondary: true %> <% end %>
diff --git a/app/views/bulk_upload_lettings_soft_validations_check/confirm.html.erb b/app/views/bulk_upload_lettings_soft_validations_check/confirm.html.erb index 90f5a00b3..e17b55130 100644 --- a/app/views/bulk_upload_lettings_soft_validations_check/confirm.html.erb +++ b/app/views/bulk_upload_lettings_soft_validations_check/confirm.html.erb @@ -5,7 +5,7 @@
Upload lettings logs in bulk (<%= @bulk_upload.year_combo %>) -

You have chosen to upload all logs from this bulk upload.

+

Are you sure you want to upload all logs from this bulk upload?

<%= logs_and_soft_validations_warning(@bulk_upload) %>

diff --git a/app/views/bulk_upload_sales_resume/deletion_report.html.erb b/app/views/bulk_upload_sales_resume/deletion_report.html.erb index bcc044439..e9013a4e2 100644 --- a/app/views/bulk_upload_sales_resume/deletion_report.html.erb +++ b/app/views/bulk_upload_sales_resume/deletion_report.html.erb @@ -28,6 +28,6 @@
<%= form_with model: @form, scope: :form, url: page_bulk_upload_sales_resume_path(@bulk_upload, "confirm"), method: :patch do |f| %> <%= f.govuk_submit "Clear this data and upload the logs" %> - <%= govuk_button_link_to "I have fixed these errors and I want to reupload the file", start_bulk_upload_sales_logs_path, secondary: true %> + <%= govuk_button_link_to "I have fixed these errors and I want to upload the file again", start_bulk_upload_sales_logs_path, secondary: true %> <% end %>
diff --git a/app/views/bulk_upload_sales_soft_validations_check/confirm.html.erb b/app/views/bulk_upload_sales_soft_validations_check/confirm.html.erb index 2b4a6e981..5c81c179d 100644 --- a/app/views/bulk_upload_sales_soft_validations_check/confirm.html.erb +++ b/app/views/bulk_upload_sales_soft_validations_check/confirm.html.erb @@ -5,7 +5,7 @@
Upload sales logs in bulk (<%= @bulk_upload.year_combo %>) -

You have chosen to upload all logs from this bulk upload.

+

Are you sure you want to upload all logs from this bulk upload?

<%= logs_and_soft_validations_warning(@bulk_upload) %>

diff --git a/app/views/bulk_upload_shared/_moved_user_banner.html.erb b/app/views/bulk_upload_shared/_moved_user_banner.html.erb index 9ab97022e..220405cc5 100644 --- a/app/views/bulk_upload_shared/_moved_user_banner.html.erb +++ b/app/views/bulk_upload_shared/_moved_user_banner.html.erb @@ -4,9 +4,9 @@ This error report is out of date.

<% if current_user.id == @bulk_upload.moved_user_id %> - You moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report. + You moved to a different organisation since this file was uploaded. Upload the file again to get an accurate error report. <% else %> - Some logs in this upload are assigned to <%= @bulk_upload.moved_user_name %>, who has moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report. + Some logs in this upload are assigned to <%= @bulk_upload.moved_user_name %>, who has moved to a different organisation since this file was uploaded. Upload the file again to get an accurate error report. <% end %> <% end %> <% end %> diff --git a/app/views/bulk_upload_shared/guidance.html.erb b/app/views/bulk_upload_shared/guidance.html.erb index d3950fff7..54e8063f0 100644 --- a/app/views/bulk_upload_shared/guidance.html.erb +++ b/app/views/bulk_upload_shared/guidance.html.erb @@ -75,7 +75,7 @@

Once you've saved your CSV file, you can upload it via a button at the top of the lettings and sales logs pages.

When your file is done processing, you will receive an email explaining your next steps. If all your data is valid, your logs will be created. If some data is invalid, you’ll receive an email with instructions about how to resolve the errors.

If your file has errors on fields 1 through 15 for lettings, or 1 through 18 for sales, you must fix these in the CSV. This is because we need to know these answers to validate the rest of the data. Any errors in these fields will be featured in the error report’s summary tab.

-

If none of your errors are in fields 1 through 15 for lettings, or 1 through 18 for sales, you can choose how to fix the errors. You can either fix them in the CSV and reupload, or create partially complete logs and answer the remaining questions on the CORE site. Any errors that affect a significant number of logs will be featured in the error report’s summary tab to help you decide.

+

If none of your errors are in fields 1 through 15 for lettings, or 1 through 18 for sales, you can choose how to fix the errors. You can either fix them in the CSV and upload the file again, or create partially complete logs and answer the remaining questions on the CORE site. Any errors that affect a significant number of logs will be featured in the error report’s summary tab to help you decide.

<% end %> diff --git a/spec/requests/bulk_upload_lettings_results_controller_spec.rb b/spec/requests/bulk_upload_lettings_results_controller_spec.rb index b23cb2c17..3c84487ac 100644 --- a/spec/requests/bulk_upload_lettings_results_controller_spec.rb +++ b/spec/requests/bulk_upload_lettings_results_controller_spec.rb @@ -68,7 +68,7 @@ RSpec.describe BulkUploadLettingsResultsController, type: :request do get "/lettings-logs/bulk-upload-results/#{bulk_upload.id}/summary" expect(response.body).to include("This error report is out of date.") - expect(CGI.unescapeHTML(response.body)).to include("Some logs in this upload are assigned to #{user.name}, who has moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report.") + expect(CGI.unescapeHTML(response.body)).to include("Some logs in this upload are assigned to #{user.name}, who has moved to a different organisation since this file was uploaded. Upload the file again to get an accurate error report.") end end @@ -79,7 +79,7 @@ RSpec.describe BulkUploadLettingsResultsController, type: :request do get "/lettings-logs/bulk-upload-results/#{bulk_upload.id}/summary" expect(response.body).to include("This error report is out of date.") - expect(response.body).to include("You moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report.") + expect(response.body).to include("You moved to a different organisation since this file was uploaded. Upload the file again to get an accurate error report.") end end end @@ -138,7 +138,7 @@ RSpec.describe BulkUploadLettingsResultsController, type: :request do get "/lettings-logs/bulk-upload-results/#{bulk_upload.id}/summary" expect(response.body).to include("This error report is out of date.") - expect(response.body).to include("Some logs in this upload are assigned to #{other_user.name}, who has moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report.") + expect(response.body).to include("Some logs in this upload are assigned to #{other_user.name}, who has moved to a different organisation since this file was uploaded. Upload the file again to get an accurate error report.") end end @@ -149,7 +149,7 @@ RSpec.describe BulkUploadLettingsResultsController, type: :request do get "/lettings-logs/bulk-upload-results/#{bulk_upload.id}/summary" expect(response.body).to include("This error report is out of date.") - expect(response.body).to include("You moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report.") + expect(response.body).to include("You moved to a different organisation since this file was uploaded. Upload the file again to get an accurate error report.") end end end diff --git a/spec/requests/bulk_upload_lettings_soft_validations_check_controller_spec.rb b/spec/requests/bulk_upload_lettings_soft_validations_check_controller_spec.rb index 315235e0e..2a2668d60 100644 --- a/spec/requests/bulk_upload_lettings_soft_validations_check_controller_spec.rb +++ b/spec/requests/bulk_upload_lettings_soft_validations_check_controller_spec.rb @@ -98,7 +98,7 @@ RSpec.describe BulkUploadLettingsSoftValidationsCheckController, type: :request expect(response).to be_successful - expect(response.body).to include("You have chosen to upload all logs from this bulk upload.") + expect(response.body).to include("Are you sure you want to upload all logs from this bulk upload?") expect(response.body).to include("You will upload 2 logs. There are unexpected answers in 2 logs, and 2 unexpected answers in total. These unexpected answers will be marked as correct.") expect(response.body).not_to include("You’ve successfully uploaded") end diff --git a/spec/requests/bulk_upload_sales_results_controller_spec.rb b/spec/requests/bulk_upload_sales_results_controller_spec.rb index b7bb7a10c..e58303d68 100644 --- a/spec/requests/bulk_upload_sales_results_controller_spec.rb +++ b/spec/requests/bulk_upload_sales_results_controller_spec.rb @@ -30,7 +30,7 @@ RSpec.describe BulkUploadSalesResultsController, type: :request do get "/sales-logs/bulk-upload-results/#{bulk_upload.id}/summary" expect(response.body).to include("This error report is out of date.") - expect(response.body).to include("Some logs in this upload are assigned to #{user.name}, who has moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report.") + expect(response.body).to include("Some logs in this upload are assigned to #{user.name}, who has moved to a different organisation since this file was uploaded. Upload the file again to get an accurate error report.") end end @@ -41,7 +41,7 @@ RSpec.describe BulkUploadSalesResultsController, type: :request do get "/sales-logs/bulk-upload-results/#{bulk_upload.id}/summary" expect(response.body).to include("This error report is out of date.") - expect(response.body).to include("You moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report.") + expect(response.body).to include("You moved to a different organisation since this file was uploaded. Upload the file again to get an accurate error report.") end end end @@ -113,7 +113,7 @@ RSpec.describe BulkUploadSalesResultsController, type: :request do get "/sales-logs/bulk-upload-results/#{bulk_upload.id}/summary" expect(response.body).to include("This error report is out of date.") - expect(response.body).to include("Some logs in this upload are assigned to #{other_user.name}, who has moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report.") + expect(response.body).to include("Some logs in this upload are assigned to #{other_user.name}, who has moved to a different organisation since this file was uploaded. Upload the file again to get an accurate error report.") end end @@ -124,7 +124,7 @@ RSpec.describe BulkUploadSalesResultsController, type: :request do get "/sales-logs/bulk-upload-results/#{bulk_upload.id}/summary" expect(response.body).to include("This error report is out of date.") - expect(response.body).to include("You moved to a different organisation since this file was uploaded. Reupload the file to get an accurate error report.") + expect(response.body).to include("You moved to a different organisation since this file was uploaded. Upload the file again to get an accurate error report.") end end end diff --git a/spec/requests/bulk_upload_sales_soft_validations_check_controller_spec.rb b/spec/requests/bulk_upload_sales_soft_validations_check_controller_spec.rb index 90e44a4f7..a3a826ad3 100644 --- a/spec/requests/bulk_upload_sales_soft_validations_check_controller_spec.rb +++ b/spec/requests/bulk_upload_sales_soft_validations_check_controller_spec.rb @@ -98,7 +98,7 @@ RSpec.describe BulkUploadSalesSoftValidationsCheckController, type: :request do expect(response).to be_successful - expect(response.body).to include("You have chosen to upload all logs from this bulk upload.") + expect(response.body).to include("Are you sure you want to upload all logs from this bulk upload?") expect(response.body).to include("You will upload 2 logs. There are unexpected answers in 2 logs, and 2 unexpected answers in total. These unexpected answers will be marked as correct.") expect(response.body).not_to include("You’ve successfully uploaded") end diff --git a/spec/requests/lettings_logs_controller_spec.rb b/spec/requests/lettings_logs_controller_spec.rb index 14cd3095c..05d83a162 100644 --- a/spec/requests/lettings_logs_controller_spec.rb +++ b/spec/requests/lettings_logs_controller_spec.rb @@ -609,7 +609,7 @@ RSpec.describe LettingsLogsController, type: :request do it "displays filter" do get "/lettings-logs?bulk_upload_id[]=#{bulk_upload.id}" - expect(page).to have_content("With logs from bulk upload") + expect(page).to have_content("Only logs from this bulk upload") end it "hides collection year filter" do @@ -695,7 +695,7 @@ RSpec.describe LettingsLogsController, type: :request do context "without bulk_upload_id" do it "does not display filter" do get "/lettings-logs" - expect(page).not_to have_content("With logs from bulk upload") + expect(page).not_to have_content("Only logs from this bulk upload") end it "displays button to create a new log" do diff --git a/spec/requests/sales_logs_controller_spec.rb b/spec/requests/sales_logs_controller_spec.rb index 06461bf4f..d8209fa1d 100644 --- a/spec/requests/sales_logs_controller_spec.rb +++ b/spec/requests/sales_logs_controller_spec.rb @@ -452,7 +452,7 @@ RSpec.describe SalesLogsController, type: :request do it "displays filter" do get "/sales-logs?bulk_upload_id[]=#{bulk_upload.id}" - expect(page).to have_content("With logs from bulk upload") + expect(page).to have_content("Only logs from this bulk upload") end it "hides collection year filter" do @@ -536,7 +536,7 @@ RSpec.describe SalesLogsController, type: :request do context "without bulk_upload_id" do it "does not display filter" do get "/sales-logs" - expect(page).not_to have_content("With logs from bulk upload") + expect(page).not_to have_content("Only logs from this bulk upload") end it "displays button to create a new log" do From 6c97ba7634a594ff542296341834516d22bf6c4c Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Mon, 16 Dec 2024 10:03:21 +0000 Subject: [PATCH 23/30] Bug fix (#2870) --- config/locales/validations/sales/2024/bulk_upload.en.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/validations/sales/2024/bulk_upload.en.yml b/config/locales/validations/sales/2024/bulk_upload.en.yml index 2621386c1..4a2d88b46 100644 --- a/config/locales/validations/sales/2024/bulk_upload.en.yml +++ b/config/locales/validations/sales/2024/bulk_upload.en.yml @@ -18,8 +18,8 @@ en: owning_organisation: not_found: "The owning organisation code is incorrect." not_stock_owner: "The owning organisation code provided is for an organisation that does not own stock." - not_permitted: - support: "This owning organisation is not affiliated with %(name)." + not_permitted: + support: "This owning organisation is not affiliated with %{name}." not_support: "You do not have permission to add logs for this owning organisation." assigned_to: not_found: "User with the specified email could not be found." From 456d1e658628720808e03e376866bfeb733b9c92 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Mon, 16 Dec 2024 10:20:19 +0000 Subject: [PATCH 24/30] Do not run pregnancy validations if hhmemb is over 8 (#2869) --- app/models/validations/soft_validations.rb | 4 +++ .../validations/soft_validations_spec.rb | 28 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/app/models/validations/soft_validations.rb b/app/models/validations/soft_validations.rb index 0b76f792b..1a2c61138 100644 --- a/app/models/validations/soft_validations.rb +++ b/app/models/validations/soft_validations.rb @@ -84,6 +84,8 @@ module Validations::SoftValidations end def all_tenants_age_and_gender_information_completed? + return false if hhmemb.present? && hhmemb > 8 + person_count = hhmemb || 8 (1..person_count).all? do |n| @@ -235,6 +237,8 @@ private end def all_male_tenants_in_the_household? + return false if hhmemb.present? && hhmemb > 8 + person_count = hhmemb || 8 (1..person_count).all? do |n| diff --git a/spec/models/validations/soft_validations_spec.rb b/spec/models/validations/soft_validations_spec.rb index 8c7380fde..b4188ba8c 100644 --- a/spec/models/validations/soft_validations_spec.rb +++ b/spec/models/validations/soft_validations_spec.rb @@ -174,6 +174,20 @@ RSpec.describe Validations::SoftValidations do end end + context "when all tenants are male and household members are over 8" do + it "does not show the interruption screen" do + (1..8).each do |n| + record.send("sex#{n}=", "M") + record.send("age#{n}=", 30) + record.send("age#{n}_known=", 0) + record.send("details_known_#{n}=", 0) unless n == 1 + end + record.preg_occ = 1 + record.hhmemb = 9 + expect(record.all_male_tenants_in_a_pregnant_household?).to be false + end + end + context "when female tenants are under 16" do it "shows the interruption screen" do record.age2 = 14 @@ -219,6 +233,20 @@ RSpec.describe Validations::SoftValidations do expect(record.female_in_pregnant_household_in_soft_validation_range?).to be false end end + + context "when number of household members is over 8" do + it "does not show the interruption screen" do + (1..8).each do |n| + record.send("sex#{n}=", "F") + record.send("age#{n}=", 50) + record.send("age#{n}_known=", 0) + record.send("details_known_#{n}=", 0) unless n == 1 + end + record.preg_occ = 1 + record.hhmemb = 9 + expect(record.female_in_pregnant_household_in_soft_validation_range?).to be false + end + end end describe "major repairs date soft validations" do From b8503aa0c663eb221c7b1a6ce84edfe0ca858f42 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Mon, 16 Dec 2024 10:20:34 +0000 Subject: [PATCH 25/30] Remove old feature flags (#2862) --- app/controllers/lettings_logs_controller.rb | 2 +- app/controllers/organisations_controller.rb | 4 ++-- app/controllers/sales_logs_controller.rb | 2 +- app/services/feature_toggle.rb | 16 ---------------- app/views/locations/check_answers.html.erb | 2 +- app/views/locations/show.html.erb | 2 +- app/views/schemes/check_answers.html.erb | 2 +- app/views/schemes/show.html.erb | 2 +- app/views/users/show.html.erb | 2 +- 9 files changed, 9 insertions(+), 25 deletions(-) diff --git a/app/controllers/lettings_logs_controller.rb b/app/controllers/lettings_logs_controller.rb index af3a6c32f..7fef9499b 100644 --- a/app/controllers/lettings_logs_controller.rb +++ b/app/controllers/lettings_logs_controller.rb @@ -22,7 +22,7 @@ class LettingsLogsController < LogsController @total_count = all_logs.size @unresolved_count = all_logs.unresolved.assigned_to(current_user).count @filter_type = "lettings_logs" - @duplicate_sets_count = FeatureToggle.duplicate_summary_enabled? && !current_user.support? ? duplicate_sets_count(current_user, current_user.organisation) : 0 + @duplicate_sets_count = !current_user.support? ? duplicate_sets_count(current_user, current_user.organisation) : 0 render "logs/index" end diff --git a/app/controllers/organisations_controller.rb b/app/controllers/organisations_controller.rb index 93b667a99..a6d9fb61e 100644 --- a/app/controllers/organisations_controller.rb +++ b/app/controllers/organisations_controller.rb @@ -186,7 +186,7 @@ class OrganisationsController < ApplicationController @total_count = organisation_logs.size @log_type = :lettings @filter_type = "lettings_logs" - @duplicate_sets_count = FeatureToggle.duplicate_summary_enabled? ? duplicate_sets_count(current_user, @organisation) : 0 + @duplicate_sets_count = duplicate_sets_count(current_user, @organisation) render "logs", layout: "application" end @@ -218,7 +218,7 @@ class OrganisationsController < ApplicationController @total_count = organisation_logs.size @log_type = :sales @filter_type = "sales_logs" - @duplicate_sets_count = FeatureToggle.duplicate_summary_enabled? ? duplicate_sets_count(current_user, @organisation) : 0 + @duplicate_sets_count = duplicate_sets_count(current_user, @organisation) render "logs", layout: "application" end diff --git a/app/controllers/sales_logs_controller.rb b/app/controllers/sales_logs_controller.rb index 8799fe528..237fd94d7 100644 --- a/app/controllers/sales_logs_controller.rb +++ b/app/controllers/sales_logs_controller.rb @@ -24,7 +24,7 @@ class SalesLogsController < LogsController @searched = search_term.presence @total_count = all_logs.size @filter_type = "sales_logs" - @duplicate_sets_count = FeatureToggle.duplicate_summary_enabled? && !current_user.support? ? duplicate_sets_count(current_user, current_user.organisation) : 0 + @duplicate_sets_count = !current_user.support? ? duplicate_sets_count(current_user, current_user.organisation) : 0 render "logs/index" end diff --git a/app/services/feature_toggle.rb b/app/services/feature_toggle.rb index 065c3b54e..8c3fe9362 100644 --- a/app/services/feature_toggle.rb +++ b/app/services/feature_toggle.rb @@ -11,10 +11,6 @@ class FeatureToggle !Rails.env.development? end - def self.duplicate_summary_enabled? - true - end - def self.service_unavailable? false end @@ -23,18 +19,6 @@ class FeatureToggle false end - def self.delete_scheme_enabled? - true - end - - def self.delete_location_enabled? - true - end - - def self.delete_user_enabled? - true - end - def self.local_storage? Rails.env.development? end diff --git a/app/views/locations/check_answers.html.erb b/app/views/locations/check_answers.html.erb index 8cd8bde2a..7a3a72e13 100644 --- a/app/views/locations/check_answers.html.erb +++ b/app/views/locations/check_answers.html.erb @@ -42,7 +42,7 @@ <% if LocationPolicy.new(current_user, @location).create? %>
<%= govuk_button_to "Save and return to locations", scheme_location_confirm_path(@scheme, @location, route: params[:route]), method: :patch %> - <% if LocationPolicy.new(current_user, @location).delete? && FeatureToggle.delete_location_enabled? %> + <% if LocationPolicy.new(current_user, @location).delete? %> <%= delete_location_link(@location) %> <% end %> <%= govuk_button_link_to "Cancel", scheme_locations_path(@scheme), secondary: true %> diff --git a/app/views/locations/show.html.erb b/app/views/locations/show.html.erb index f9ba6496c..0cb09af8f 100644 --- a/app/views/locations/show.html.erb +++ b/app/views/locations/show.html.erb @@ -51,6 +51,6 @@ <%= toggle_location_link(@location) %> <% end %> -<% if LocationPolicy.new(current_user, @location).delete? && FeatureToggle.delete_location_enabled? %> +<% if LocationPolicy.new(current_user, @location).delete? %> <%= delete_location_link(@location) %> <% end %> diff --git a/app/views/schemes/check_answers.html.erb b/app/views/schemes/check_answers.html.erb index 3f8365f6e..a98c86a51 100644 --- a/app/views/schemes/check_answers.html.erb +++ b/app/views/schemes/check_answers.html.erb @@ -24,7 +24,7 @@ <%= f.govuk_submit button_label %> <% end %> - <% if SchemePolicy.new(current_user, @scheme).delete? && FeatureToggle.delete_scheme_enabled? %> + <% if SchemePolicy.new(current_user, @scheme).delete? %> <%= delete_scheme_link(@scheme) %> <% end %> <% end %> diff --git a/app/views/schemes/show.html.erb b/app/views/schemes/show.html.erb index 0aa25affc..58bcd521e 100644 --- a/app/views/schemes/show.html.erb +++ b/app/views/schemes/show.html.erb @@ -56,6 +56,6 @@ <%= toggle_scheme_link(@scheme) %> <% end %> -<% if SchemePolicy.new(current_user, @scheme).delete? && FeatureToggle.delete_scheme_enabled? %> +<% if SchemePolicy.new(current_user, @scheme).delete? %> <%= delete_scheme_link(@scheme) %> <% end %> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index a43b03f82..d6f2c1e88 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -157,7 +157,7 @@ <% end %> <% end %> - <% if UserPolicy.new(current_user, @user).delete? && FeatureToggle.delete_user_enabled? %> + <% if UserPolicy.new(current_user, @user).delete? %> <%= delete_user_link(@user) %> <% end %>
From 9a164dfa687515d2f06b111f2df667a433655078 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:26:29 +0000 Subject: [PATCH 26/30] Export dates as iso8601 (#2871) --- app/services/exports/organisation_export_service.rb | 6 ++++-- app/services/exports/user_export_service.rb | 1 + spec/fixtures/exports/user.xml | 2 +- spec/services/exports/organisation_export_service_spec.rb | 2 +- spec/services/exports/user_export_service_spec.rb | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/services/exports/organisation_export_service.rb b/app/services/exports/organisation_export_service.rb index 2b2da71c8..afcf16cb0 100644 --- a/app/services/exports/organisation_export_service.rb +++ b/app/services/exports/organisation_export_service.rb @@ -56,11 +56,13 @@ module Exports def apply_cds_transformation(organisation) attribute_hash = organisation.attributes - attribute_hash["deleted_at"] = organisation.discarded_at + attribute_hash["deleted_at"] = organisation.discarded_at&.iso8601 attribute_hash["dsa_signed"] = organisation.data_protection_confirmed? - attribute_hash["dsa_signed_at"] = organisation.data_protection_confirmation&.signed_at + attribute_hash["dsa_signed_at"] = organisation.data_protection_confirmation&.signed_at&.iso8601 attribute_hash["dpo_email"] = organisation.data_protection_confirmation&.data_protection_officer_email attribute_hash["provider_type"] = organisation.provider_type_before_type_cast + attribute_hash["merge_date"] = organisation.merge_date&.iso8601 + attribute_hash["available_from"] = organisation.available_from&.iso8601 attribute_hash["profit_status"] = nil # will need update when we add the field to the org attribute_hash["group"] = nil # will need update when we add the field to the org diff --git a/app/services/exports/user_export_service.rb b/app/services/exports/user_export_service.rb index aaa30c424..707d13c14 100644 --- a/app/services/exports/user_export_service.rb +++ b/app/services/exports/user_export_service.rb @@ -60,6 +60,7 @@ module Exports attribute_hash["organisation_name"] = user.organisation.name attribute_hash["active"] = user.active? attribute_hash["phone"] = [user.phone, user.phone_extension].compact.join(" ") + attribute_hash["last_sign_in_at"] = user.last_sign_in_at&.iso8601 attribute_hash end end diff --git a/spec/fixtures/exports/user.xml b/spec/fixtures/exports/user.xml index d29a33225..4c5286c68 100644 --- a/spec/fixtures/exports/user.xml +++ b/spec/fixtures/exports/user.xml @@ -6,7 +6,7 @@ Danny Rojas {organisation_id} 5 - + 2022-03-03T00:00:00+00:00 data_provider 1234512345123 123 false diff --git a/spec/services/exports/organisation_export_service_spec.rb b/spec/services/exports/organisation_export_service_spec.rb index 51c8fe8cf..199ee239e 100644 --- a/spec/services/exports/organisation_export_service_spec.rb +++ b/spec/services/exports/organisation_export_service_spec.rb @@ -17,7 +17,7 @@ RSpec.describe Exports::OrganisationExportService do def replace_entity_ids(organisation, export_template) export_template.sub!(/\{id\}/, organisation["id"].to_s) export_template.sub!(/\{name\}/, organisation["name"]) - export_template.sub!(/\{dsa_signed_at\}/, organisation.data_protection_confirmation&.signed_at.to_s) + export_template.sub!(/\{dsa_signed_at\}/, organisation.data_protection_confirmation&.signed_at&.iso8601) export_template.sub!(/\{dpo_email\}/, organisation.data_protection_confirmation&.data_protection_officer_email) end diff --git a/spec/services/exports/user_export_service_spec.rb b/spec/services/exports/user_export_service_spec.rb index 854dd1ce7..3f4ece76d 100644 --- a/spec/services/exports/user_export_service_spec.rb +++ b/spec/services/exports/user_export_service_spec.rb @@ -43,7 +43,7 @@ RSpec.describe Exports::UserExportService do end context "and one user is available for export" do - let!(:user) { create(:user, organisation:, name: "Danny Rojas", phone_extension: "123") } + let!(:user) { create(:user, organisation:, name: "Danny Rojas", phone_extension: "123", last_sign_in_at: Time.zone.local(2022, 3, 3)) } it "generates a ZIP export file with the expected filename" do expect(storage_service).to receive(:write_file).with(expected_zip_filename, any_args) From 5e0f3ebbb4f16ff575767c572ed09a30b3fb64af Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:26:51 +0000 Subject: [PATCH 27/30] update mini profiler (#2872) --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 98479cd34..033706b39 100644 --- a/Gemfile +++ b/Gemfile @@ -90,7 +90,7 @@ group :development do # Display performance information such as SQL time and flame graphs for each request in your browser. # Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md gem "erb_lint", require: false - gem "rack-mini-profiler", "~> 2.0" + gem "rack-mini-profiler", "~> 3.3.0" gem "rubocop-govuk", "4.3.0", require: false gem "rubocop-performance", require: false gem "rubocop-rails", require: false diff --git a/Gemfile.lock b/Gemfile.lock index 8a678576c..5017836a1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -340,7 +340,7 @@ GEM rack (3.1.8) rack-attack (6.7.0) rack (>= 1.0, < 4) - rack-mini-profiler (2.3.4) + rack-mini-profiler (3.3.1) rack (>= 1.2.0) rack-session (2.0.0) rack (>= 3.0.0) @@ -581,7 +581,7 @@ DEPENDENCIES pundit rack (>= 2.2.6.3) rack-attack - rack-mini-profiler (~> 2.0) + rack-mini-profiler (~> 3.3.0) rails (~> 7.2.2) rails_admin (~> 3.1) redcarpet (~> 3.6) From 5b56b9d015a2fe2d77357d3f416cfa028a4165fb Mon Sep 17 00:00:00 2001 From: Rachael Booth Date: Tue, 17 Dec 2024 09:51:55 +0000 Subject: [PATCH 28/30] Update version of govuk-prototype-components (#2867) --- package.json | 2 +- yarn.lock | 1649 +------------------------------------------------- 2 files changed, 33 insertions(+), 1618 deletions(-) diff --git a/package.json b/package.json index c5734b348..5e32d4f11 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "@hotwired/stimulus": "^3.0.0", "@stimulus/polyfills": "^2.0.0", "@webcomponents/webcomponentsjs": "^2.6.0", - "@x-govuk/govuk-prototype-components": "^3.0.1", + "@x-govuk/govuk-prototype-components": "^3.0.9", "accessible-autocomplete": "^2.0.3", "babel-loader": "^8.2.3", "babel-plugin-macros": "^3.1.0", diff --git a/yarn.lock b/yarn.lock index 0c84d632e..11ea50b9a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1145,11 +1145,6 @@ resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-6.1.7.tgz#b09dc5b2105dd267e8374c47e4490240451dc7f6" integrity sha512-0e7WQ4LE/+LEfW2zfAw9ppsB6A8RmxbdAUPAF++UT80epY+7emuQDkKXmaK0a9lp6An50RvzezI0cIQjp1A58w== -"@socket.io/component-emitter@~3.1.0": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz#821f8442f4175d8f0467b9daf26e3a18e2d02af2" - integrity sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA== - "@stimulus/polyfills@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@stimulus/polyfills/-/polyfills-2.0.0.tgz#64b3e247c762330f80d88e993d1d26b24e3c13b1" @@ -1160,37 +1155,11 @@ eventlistener-polyfill "^1.0.5" mutation-observer-inner-html-shim "^1.0.0" -"@types/concat-stream@^1.6.0": - version "1.6.1" - resolved "https://registry.yarnpkg.com/@types/concat-stream/-/concat-stream-1.6.1.tgz#24bcfc101ecf68e886aaedce60dfd74b632a1b74" - integrity sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA== - dependencies: - "@types/node" "*" - -"@types/cookie@^0.4.1": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.4.1.tgz#bfd02c1f2224567676c1545199f87c3a861d878d" - integrity sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q== - -"@types/cors@^2.8.12": - version "2.8.17" - resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.17.tgz#5d718a5e494a8166f569d986794e49c48b216b2b" - integrity sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA== - dependencies: - "@types/node" "*" - "@types/estree@^1.0.5": version "1.0.5" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== -"@types/form-data@0.0.33": - version "0.0.33" - resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-0.0.33.tgz#c9ac85b2a5fd18435b8c85d9ecb50e6d6c893ff8" - integrity sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw== - dependencies: - "@types/node" "*" - "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" @@ -1201,33 +1170,18 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== -"@types/node@*", "@types/node@>=10.0.0": +"@types/node@*": version "22.3.0" resolved "https://registry.yarnpkg.com/@types/node/-/node-22.3.0.tgz#7f8da0e2b72c27c4f9bd3cb5ef805209d04d4f9e" integrity sha512-nrWpWVaDZuaVc5X84xJ0vNrLvomM205oQyLsRt7OHNZbSHslcWsvgFR7O7hire2ZonjLrWBbedmotmIlJDVd6g== dependencies: undici-types "~6.18.2" -"@types/node@^10.0.3": - version "10.17.60" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" - integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== - -"@types/node@^8.0.0": - version "8.10.66" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3" - integrity sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw== - "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== -"@types/qs@^6.2.31": - version "6.9.15" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.15.tgz#adde8a060ec9c305a82de1babc1056e73bd64dce" - integrity sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg== - "@ungap/structured-clone@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" @@ -1376,15 +1330,13 @@ resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.7.0.tgz#e1993689ac42d2b16e9194376cfb6753f6254db1" integrity sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q== -"@x-govuk/govuk-prototype-components@^3.0.1": - version "3.0.6" - resolved "https://registry.yarnpkg.com/@x-govuk/govuk-prototype-components/-/govuk-prototype-components-3.0.6.tgz#29d9d50640b33ff396c540f5cd5757cb865ffe88" - integrity sha512-5HsOl5QdDZs/3zMWs7UzB0D+kEm2dczdWBfCeCW0fdT960ysbycnhUfJQ82SOU5TSJj36GrEgxSgBz+TCAL+1Q== +"@x-govuk/govuk-prototype-components@^3.0.9": + version "3.0.9" + resolved "https://registry.yarnpkg.com/@x-govuk/govuk-prototype-components/-/govuk-prototype-components-3.0.9.tgz#9a00daecad9d4a333a034999f76222ac56f19eb6" + integrity sha512-SvYSaeM465IEKZFRLO244FAZqP0GPyoWkq6m5LNIsfudYFAyd16BRQBQktY9t/TUOx1HRpGJJi2WZeqyVKRxkw== dependencies: accessible-autocomplete "^3.0.0" eventslibjs "^1.2.0" - optionalDependencies: - govuk-prototype-kit "^13.14.1" "@xtuc/ieee754@^1.2.0": version "1.2.0" @@ -1396,19 +1348,6 @@ resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== -a-sync-waterfall@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz#75b6b6aa72598b497a125e7a2770f14f4c8a1fa7" - integrity sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA== - -accepts@~1.3.4, accepts@~1.3.8: - version "1.3.8" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" - integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== - dependencies: - mime-types "~2.1.34" - negotiator "0.6.3" - accessible-autocomplete@^2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/accessible-autocomplete/-/accessible-autocomplete-2.0.4.tgz#e295256c8d268b97c5ab456a1cb084b553ed3eb0" @@ -1441,14 +1380,6 @@ acorn@^8.7.1, acorn@^8.8.2, acorn@^8.9.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== -aggregate-error@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" - integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== - dependencies: - clean-stack "^2.0.0" - indent-string "^4.0.0" - ajv-formats@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" @@ -1488,18 +1419,6 @@ ajv@^8.0.0, ajv@^8.0.1, ajv@^8.9.0: json-schema-traverse "^1.0.0" require-from-string "^2.0.2" -ansi-colors@^4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" - integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== - -ansi-escapes@^4.2.1: - version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" @@ -1560,11 +1479,6 @@ array-buffer-byte-length@^1.0.1: call-bind "^1.0.5" is-array-buffer "^3.0.4" -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== - array-flatten@^2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" @@ -1661,33 +1575,11 @@ arraybuffer.prototype.slice@^1.0.3: is-array-buffer "^3.0.4" is-shared-array-buffer "^1.0.2" -asap@^2.0.3, asap@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" - integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== - astral-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== -async-each-series@0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/async-each-series/-/async-each-series-0.1.1.tgz#7617c1917401fd8ca4a28aadce3dbae98afeb432" - integrity sha512-p4jj6Fws4Iy2m0iCmI2am2ZNZCgbdgE+P8F/8csmn2vx7ixXrO2zGcuNsD46X5uZSVecmkEy/M06X2vG8KD6dQ== - -async@^2.6.0: - version "2.6.4" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" - integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== - dependencies: - lodash "^4.17.14" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - available-typed-arrays@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" @@ -1695,11 +1587,6 @@ available-typed-arrays@^1.0.7: dependencies: possible-typed-array-names "^1.0.0" -b4a@^1.6.4: - version "1.6.6" - resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.6.6.tgz#a4cc349a3851987c3c4ac2d7785c18744f6da9ba" - integrity sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg== - babel-loader@^8.2.3: version "8.3.0" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.3.0.tgz#124936e841ba4fe8176786d6ff28add1f134d6a8" @@ -1753,26 +1640,6 @@ balanced-match@^2.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-2.0.0.tgz#dc70f920d78db8b858535795867bf48f820633d9" integrity sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA== -bare-events@^2.2.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/bare-events/-/bare-events-2.4.2.tgz#3140cca7a0e11d49b3edc5041ab560659fd8e1f8" - integrity sha512-qMKFd2qG/36aA4GwvKq8MxnPgCQAmBWmSyLWsJcbn8v03wvIPQ/hG1Ms8bPzndZxMDoHpxez5VOS+gC9Yi24/Q== - -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -base64id@2.0.0, base64id@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6" - integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== - -batch@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" - integrity sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw== - big.js@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" @@ -1783,33 +1650,6 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== -bl@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" - integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - -body-parser@1.20.3, body-parser@^1.20.2: - version "1.20.3" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.3.tgz#1953431221c6fb5cd63c4b36d53fab0928e548c6" - integrity sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g== - dependencies: - bytes "3.1.2" - content-type "~1.0.5" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.13.0" - raw-body "2.5.2" - type-is "~1.6.18" - unpipe "1.0.0" - bootstrap@^5.1.3: version "5.3.3" resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.3.tgz#de35e1a765c897ac940021900fcbb831602bac38" @@ -1830,62 +1670,6 @@ braces@^3.0.3, braces@~3.0.2: dependencies: fill-range "^7.1.1" -browser-sync-client@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/browser-sync-client/-/browser-sync-client-3.0.2.tgz#6fbe9a7aada25cf14c824683e089ec9ace91cfe1" - integrity sha512-tBWdfn9L0wd2Pjuz/NWHtNEKthVb1Y67vg8/qyGNtCqetNz5lkDkFnrsx5UhPNPYUO8vci50IWC/BhYaQskDiQ== - dependencies: - etag "1.8.1" - fresh "0.5.2" - mitt "^1.1.3" - -browser-sync-ui@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/browser-sync-ui/-/browser-sync-ui-3.0.2.tgz#8136efcff4ec8cc55084b32b91be02094194f0c4" - integrity sha512-V3FwWAI+abVbFLTyJjXJlCMBwjc3GXf/BPGfwO2fMFACWbIGW9/4SrBOFYEOOtqzCjQE0Di+U3VIb7eES4omNA== - dependencies: - async-each-series "0.1.1" - chalk "4.1.2" - connect-history-api-fallback "^1" - immutable "^3" - server-destroy "1.0.1" - socket.io-client "^4.4.1" - stream-throttle "^0.1.3" - -browser-sync@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/browser-sync/-/browser-sync-3.0.2.tgz#cc763cdbf4180193978fe16ebfc506b910225ae4" - integrity sha512-PC9c7aWJFVR4IFySrJxOqLwB9ENn3/TaXCXtAa0SzLwocLN3qMjN+IatbjvtCX92BjNXsY6YWg9Eb7F3Wy255g== - dependencies: - browser-sync-client "^3.0.2" - browser-sync-ui "^3.0.2" - bs-recipes "1.3.4" - chalk "4.1.2" - chokidar "^3.5.1" - connect "3.6.6" - connect-history-api-fallback "^1" - dev-ip "^1.0.1" - easy-extender "^2.3.4" - eazy-logger "^4.0.1" - etag "^1.8.1" - fresh "^0.5.2" - fs-extra "3.0.1" - http-proxy "^1.18.1" - immutable "^3" - micromatch "^4.0.2" - opn "5.3.0" - portscanner "2.2.0" - raw-body "^2.3.2" - resp-modifier "6.0.2" - rx "4.1.0" - send "0.16.2" - serve-index "1.9.1" - serve-static "1.13.2" - server-destroy "1.0.1" - socket.io "^4.4.1" - ua-parser-js "^1.0.33" - yargs "^17.3.1" - browserslist@^4.21.10, browserslist@^4.23.1, browserslist@^4.23.3: version "4.23.3" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.3.tgz#debb029d3c93ebc97ffbc8d9cbb03403e227c800" @@ -1896,24 +1680,11 @@ browserslist@^4.21.10, browserslist@^4.23.1, browserslist@^4.23.3: node-releases "^2.0.18" update-browserslist-db "^1.1.0" -bs-recipes@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/bs-recipes/-/bs-recipes-1.3.4.tgz#0d2d4d48a718c8c044769fdc4f89592dc8b69585" - integrity sha512-BXvDkqhDNxXEjeGM8LFkSbR+jzmP/CYpCiVKYn+soB1dDldeU15EBNDkwVXndKuX35wnNUaPd0qSoQEAkmQtMw== - buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -buffer@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - builtins@^5.0.1: version "5.1.0" resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.1.0.tgz#6d85eeb360c4ebc166c3fdef922a15aa7316a5e8" @@ -1921,11 +1692,6 @@ builtins@^5.0.1: dependencies: semver "^7.0.0" -bytes@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" - integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== - call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" @@ -1947,19 +1713,6 @@ caniuse-lite@^1.0.30001646: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz#52de59529e8b02b1aedcaaf5c05d9e23c0c28138" integrity sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg== -caseless@^0.12.0, caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== - -chalk@4.1.2, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -1969,12 +1722,15 @@ chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chardet@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" - integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" -"chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.1, chokidar@^3.5.2, chokidar@^3.6.0: +"chokidar@>=3.0.0 <4.0.0": version "3.6.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== @@ -1994,37 +1750,6 @@ chrome-trace-event@^1.0.2: resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz#05bffd7ff928465093314708c93bdfa9bd1f0f5b" integrity sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ== -clean-stack@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" - integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== - -cli-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" - integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== - dependencies: - restore-cursor "^3.1.0" - -cli-spinners@^2.5.0: - version "2.9.2" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" - integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== - -cli-width@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" - integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== - -cliui@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" - integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.1" - wrap-ansi "^7.0.0" - clone-deep@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" @@ -2034,11 +1759,6 @@ clone-deep@^4.0.1: kind-of "^6.0.2" shallow-clone "^3.0.0" -clone@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" - integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== - color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -2073,23 +1793,11 @@ colorette@^2.0.14: resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== -combined-stream@^1.0.6: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -commander@^2.19.0, commander@^2.2.0, commander@^2.20.0: +commander@^2.19.0, commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" - integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== - commander@^7.0.0: version "7.2.0" resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" @@ -2105,81 +1813,11 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -concat-stream@^1.6.0, concat-stream@^1.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -connect-history-api-fallback@^1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" - integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== - -connect@3.6.6: - version "3.6.6" - resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.6.tgz#09eff6c55af7236e137135a72574858b6786f524" - integrity sha512-OO7axMmPpu/2XuX1+2Yrg0ddju31B6xLZMWkJ5rYBu4YRmRVlOjvlY6kw2FJKiAzyxGwnrDUAG4s1Pf0sbBMCQ== - dependencies: - debug "2.6.9" - finalhandler "1.1.0" - parseurl "~1.3.2" - utils-merge "1.0.1" - -content-disposition@0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" - integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== - dependencies: - safe-buffer "5.2.1" - -content-type@~1.0.4, content-type@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" - integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== - convert-source-map@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== -cookie-parser@^1.4.6: - version "1.4.6" - resolved "https://registry.yarnpkg.com/cookie-parser/-/cookie-parser-1.4.6.tgz#3ac3a7d35a7a03bbc7e365073a26074824214594" - integrity sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA== - dependencies: - cookie "0.4.1" - cookie-signature "1.0.6" - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== - -cookie-signature@1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.7.tgz#ab5dd7ab757c54e60f37ef6550f481c426d10454" - integrity sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA== - -cookie@0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1" - integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA== - -cookie@0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051" - integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw== - -cookie@~0.4.1: - version "0.4.2" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" - integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== - copy-webpack-plugin@^10.2.4: version "10.2.4" resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-10.2.4.tgz#6c854be3fdaae22025da34b9112ccf81c63308fe" @@ -2209,19 +1847,6 @@ core-js@^3.4.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.25.2.tgz#2d3670c1455432b53fa780300a6fc1bd8304932c" integrity sha512-YB4IAT1bjEfxTJ1XYy11hJAKskO+qmhuDBM8/guIfMz4JvdsAQAqvyb97zXX7JgSrfPLG5mRGFWJwJD39ruq2A== -core-util-is@~1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - -cors@~2.8.5: - version "2.8.5" - resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" - integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== - dependencies: - object-assign "^4" - vary "^1" - cosmiconfig@^7.0.0: version "7.0.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d" @@ -2252,13 +1877,6 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -csrf-csrf@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/csrf-csrf/-/csrf-csrf-2.3.0.tgz#dfcd4e4f1c9efd9896b9ed5fe6074f3474b8ee5d" - integrity sha512-bUVpFobukoKdE2h0VNTgRmPelVnsGcnVavUOCYLFBnl6ss98bW7hPFWsQyuHMVdYK2NGRlQvthUEb4iX5nUb1w== - dependencies: - http-errors "^2.0.0" - css-functions-list@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/css-functions-list/-/css-functions-list-3.2.2.tgz#9a54c6dd8416ed25c1079cd88234e927526c1922" @@ -2323,13 +1941,6 @@ data-view-byte-offset@^1.0.0: es-errors "^1.3.0" is-data-view "^1.0.1" -debug@2.6.9, debug@^2.2.0: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -2337,7 +1948,7 @@ debug@^3.2.7: dependencies: ms "^2.1.1" -debug@^4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.6, debug@~4.3.1, debug@~4.3.2, debug@~4.3.4: +debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.6: version "4.3.6" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== @@ -2349,13 +1960,6 @@ deep-is@^0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -defaults@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" - integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== - dependencies: - clone "^1.0.2" - define-data-property@^1.0.1, define-data-property@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" @@ -2374,50 +1978,6 @@ define-properties@^1.1.3, define-properties@^1.2.0, define-properties@^1.2.1: has-property-descriptors "^1.0.0" object-keys "^1.1.1" -del@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/del/-/del-6.1.1.tgz#3b70314f1ec0aa325c6b14eb36b95786671edb7a" - integrity sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg== - dependencies: - globby "^11.0.1" - graceful-fs "^4.2.4" - is-glob "^4.0.1" - is-path-cwd "^2.2.0" - is-path-inside "^3.0.2" - p-map "^4.0.0" - rimraf "^3.0.2" - slash "^3.0.0" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -depd@2.0.0, depd@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== - -destroy@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" - integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg== - -dev-ip@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/dev-ip/-/dev-ip-1.0.1.tgz#a76a3ed1855be7a012bb8ac16cb80f3c00dc28f0" - integrity sha512-LmVkry/oDShEgSZPNgqCIp2/TlqtExeGmymru3uCELnfyjY11IzpAproLYs+1X88fXO6DBoYP3ul2Xo2yz2j6A== - dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -2439,30 +1999,6 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dotenv@^16.4.5: - version "16.4.5" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" - integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== - -easy-extender@^2.3.4: - version "2.3.4" - resolved "https://registry.yarnpkg.com/easy-extender/-/easy-extender-2.3.4.tgz#298789b64f9aaba62169c77a2b3b64b4c9589b8f" - integrity sha512-8cAwm6md1YTiPpOvDULYJL4ZS6WfM5/cTeVVh4JsvyYZAoqlRVUpHL9Gr5Fy7HA6xcSZicUia3DeAgO3Us8E+Q== - dependencies: - lodash "^4.17.10" - -eazy-logger@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/eazy-logger/-/eazy-logger-4.0.1.tgz#2e9fe487fb14ed6ac20d5f01d90dff377d403041" - integrity sha512-2GSFtnnC6U4IEKhEI7+PvdxrmjJ04mdsj3wHZTFiw0tUtG4HCWzTr13ZYTk8XOGnA1xQMaDljoBOYlk3D/MMSw== - dependencies: - chalk "4.1.2" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== - electron-to-chromium@^1.5.4: version "1.5.9" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.9.tgz#3e92950e3a409d109371b7a153a9c5712e2509fd" @@ -2483,48 +2019,6 @@ emojis-list@^3.0.0: resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== -encodeurl@~1.0.1, encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== - -encodeurl@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" - integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg== - -engine.io-client@~6.5.2: - version "6.5.4" - resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-6.5.4.tgz#b8bc71ed3f25d0d51d587729262486b4b33bd0d0" - integrity sha512-GeZeeRjpD2qf49cZQ0Wvh/8NJNfeXkXXcoGh+F77oEAgo9gUHwT1fCRxSNU+YEEaysOJTnsFHmM5oAcPy4ntvQ== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.1" - engine.io-parser "~5.2.1" - ws "~8.17.1" - xmlhttprequest-ssl "~2.0.0" - -engine.io-parser@~5.2.1: - version "5.2.3" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.2.3.tgz#00dc5b97b1f233a23c9398d0209504cf5f94d92f" - integrity sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q== - -engine.io@~6.5.2: - version "6.5.5" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.5.5.tgz#430b80d8840caab91a50e9e23cb551455195fc93" - integrity sha512-C5Pn8Wk+1vKBoHghJODM63yk8MvrO9EWZUfkAt5HAqIgPE4/8FF0PEGHXtEd40l223+cE5ABWuPzm38PHFXfMA== - dependencies: - "@types/cookie" "^0.4.1" - "@types/cors" "^2.8.12" - "@types/node" ">=10.0.0" - accepts "~1.3.4" - base64id "2.0.0" - cookie "~0.4.1" - cors "~2.8.5" - debug "~4.3.1" - engine.io-parser "~5.2.1" - ws "~8.17.1" - enhanced-resolve@^5.17.1: version "5.17.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" @@ -2671,16 +2165,11 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -escalade@^3.1.1, escalade@^3.1.2: +escalade@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== - escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -2918,16 +2407,6 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -etag@1.8.1, etag@^1.8.1, etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== - -eventemitter3@^4.0.0: - version "4.0.7" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" - integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== - eventlistener-polyfill@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/eventlistener-polyfill/-/eventlistener-polyfill-1.0.5.tgz#d3c96e57d52ca4dc30b3b8f3cf9698dc8e277d8a" @@ -2943,76 +2422,11 @@ eventslibjs@^1.2.0: resolved "https://registry.yarnpkg.com/eventslibjs/-/eventslibjs-1.2.0.tgz#5d242b1d71d7376b999611448e91b7947d8cb9d0" integrity sha512-nui7FHXHeeZjWkQ1dZ4R3RchkT+164+y1/puiOY1Zc3CPU9W8XzAzdhqvuVQ4EJt7F/W94O5U26/oVFpBOPY3w== -express-session@^1.18.0: - version "1.18.0" - resolved "https://registry.yarnpkg.com/express-session/-/express-session-1.18.0.tgz#a6ae39d9091f2efba5f20fc5c65a3ce7c9ce16a3" - integrity sha512-m93QLWr0ju+rOwApSsyso838LQwgfs44QtOP/WBiwtAgPIo/SAh1a5c6nn2BR6mFNZehTpqKDESzP+fRHVbxwQ== - dependencies: - cookie "0.6.0" - cookie-signature "1.0.7" - debug "2.6.9" - depd "~2.0.0" - on-headers "~1.0.2" - parseurl "~1.3.3" - safe-buffer "5.2.1" - uid-safe "~2.1.5" - -express@^4.18.2: - version "4.21.0" - resolved "https://registry.yarnpkg.com/express/-/express-4.21.0.tgz#d57cb706d49623d4ac27833f1cbc466b668eb915" - integrity sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng== - dependencies: - accepts "~1.3.8" - array-flatten "1.1.1" - body-parser "1.20.3" - content-disposition "0.5.4" - content-type "~1.0.4" - cookie "0.6.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "2.0.0" - encodeurl "~2.0.0" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.3.1" - fresh "0.5.2" - http-errors "2.0.0" - merge-descriptors "1.0.3" - methods "~1.1.2" - on-finished "2.4.1" - parseurl "~1.3.3" - path-to-regexp "0.1.10" - proxy-addr "~2.0.7" - qs "6.13.0" - range-parser "~1.2.1" - safe-buffer "5.2.1" - send "0.19.0" - serve-static "1.16.2" - setprototypeof "1.2.0" - statuses "2.0.1" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -external-editor@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" - integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== - dependencies: - chardet "^0.7.0" - iconv-lite "^0.4.24" - tmp "^0.0.33" - fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-fifo@^1.2.0, fast-fifo@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c" - integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== - fast-glob@^3.2.7: version "3.3.0" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.0.tgz#7c40cb491e1e2ed5664749e87bfb516dbe8727c0" @@ -3062,13 +2476,6 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" -figures@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" - integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== - dependencies: - escape-string-regexp "^1.0.5" - file-entry-cache@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" @@ -3098,32 +2505,6 @@ fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" -finalhandler@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.0.tgz#ce0b6855b45853e791b2fcc680046d88253dd7f5" - integrity sha512-ejnvM9ZXYzp6PUPUyQBMBf0Co5VX2gr5H2VQe2Ui2jWXNlxv+PYZo8wpAymJNJdLsG1R4p+M4aynF8KuoUEwRw== - dependencies: - debug "2.6.9" - encodeurl "~1.0.1" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.2" - statuses "~1.3.1" - unpipe "~1.0.0" - -finalhandler@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.3.1.tgz#0c575f1d1d324ddd1da35ad7ece3df7d19088019" - integrity sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ== - dependencies: - debug "2.6.9" - encodeurl "~2.0.0" - escape-html "~1.0.3" - on-finished "2.4.1" - parseurl "~1.3.3" - statuses "2.0.1" - unpipe "~1.0.0" - find-cache-dir@^3.3.1: version "3.3.2" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" @@ -3183,11 +2564,6 @@ flatted@^3.2.9, flatted@^3.3.1: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== -follow-redirects@^1.0.0: - version "1.15.6" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" - integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== - for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -3195,43 +2571,6 @@ for-each@^0.3.3: dependencies: is-callable "^1.1.3" -form-data@^2.2.0: - version "2.5.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" - integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -forwarded@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" - integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== - -fresh@0.5.2, fresh@^0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== - -fs-extra@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" - integrity sha512-V3Z3WZWVUYd8hoCL5xfXJCaHWYzmtwW5XWYSlLgERi8PWd8bx1kUHUk8L1BT57e49oKnDDD180mjfrHc1yA9rg== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^3.0.0" - universalify "^0.1.0" - -fs-extra@^11.2.0: - version "11.2.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b" - integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -3267,11 +2606,6 @@ gensync@^1.0.0-beta.2: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" @@ -3283,11 +2617,6 @@ get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@ has-symbols "^1.0.3" hasown "^2.0.0" -get-port@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" - integrity sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg== - get-stdin@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" @@ -3369,7 +2698,7 @@ globalthis@^1.0.3: define-properties "^1.2.1" gopd "^1.0.1" -globby@^11.0.1, globby@^11.1.0: +globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -3405,48 +2734,12 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -govuk-frontend@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-5.2.0.tgz#f8e0bf98b771b8ee1501fd45bbba24a091f3846d" - integrity sha512-beD3wztHpkKz6JUpPwnwop1ejb4rTFMPLCutKLCIDmUS4BPpW59ggVUfctsRqHd2Zjw9wxljdRdeIJ8AZFyyTw== - govuk-frontend@5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-5.7.1.tgz#d4c561ebf8c0b76130f31df8c2e4d70d340cd63f" integrity sha512-jF1cq5rn57kxZmJRprUZhTQ31zaBBK4b5AyeJaPX3Yhg22lk90Mx/dQLvOk/ycV3wM7e0y+s4IPvb2fFaPlCGg== -govuk-prototype-kit@^13.14.1: - version "13.16.2" - resolved "https://registry.yarnpkg.com/govuk-prototype-kit/-/govuk-prototype-kit-13.16.2.tgz#a491d36ebd49d5aa818934fa767d833e138a9119" - integrity sha512-pl7fjA66d7hluIembKY8tLdO6HKGhfd9YWZs+KBTmzd4IOLNIeBaS28uF6/NwKxLrPYkA+nDBalOXtKEKkD71A== - dependencies: - ansi-colors "^4.1.3" - body-parser "^1.20.2" - browser-sync "^3.0.2" - chokidar "^3.6.0" - cookie-parser "^1.4.6" - cross-spawn "^7.0.3" - csrf-csrf "^2.3.0" - del "^6.1.1" - dotenv "^16.4.5" - express "^4.18.2" - express-session "^1.18.0" - fs-extra "^11.2.0" - govuk-frontend "5.2.0" - inquirer "^8.2.6" - lodash "^4.17.21" - marked "^4.3.0" - nodemon "^3.0.3" - nunjucks "^3.2.4" - portscanner "^2.2.0" - require-dir "^1.2.0" - sass "^1.71.1" - sync-request "^6.1.0" - tar-stream "^3.1.7" - universal-analytics "^0.5.3" - uuid "^9.0.1" - -graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4: +graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -3512,75 +2805,11 @@ html5shiv@^3.7.3: resolved "https://registry.yarnpkg.com/html5shiv/-/html5shiv-3.7.3.tgz#d78a84a367bcb9a710100d57802c387b084631d2" integrity sha512-SZwGvLGNtgp8GbgFX7oXEp8OR1aBt5LliX6dG0kdD1kl3KhMonN0QcSa/A3TsTgFewaGCbIryQunjayWDXzxmw== -http-basic@^8.1.1: - version "8.1.3" - resolved "https://registry.yarnpkg.com/http-basic/-/http-basic-8.1.3.tgz#a7cabee7526869b9b710136970805b1004261bbf" - integrity sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw== - dependencies: - caseless "^0.12.0" - concat-stream "^1.6.2" - http-response-object "^3.0.1" - parse-cache-control "^1.0.1" - -http-errors@2.0.0, http-errors@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" - integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== - dependencies: - depd "2.0.0" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses "2.0.1" - toidentifier "1.0.1" - -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - integrity sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A== - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - -http-proxy@^1.18.1: - version "1.18.1" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" - integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== - dependencies: - eventemitter3 "^4.0.0" - follow-redirects "^1.0.0" - requires-port "^1.0.0" - -http-response-object@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/http-response-object/-/http-response-object-3.0.2.tgz#7f435bb210454e4360d074ef1f989d5ea8aa9810" - integrity sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA== - dependencies: - "@types/node" "^10.0.3" - -iconv-lite@0.4.24, iconv-lite@^0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - icss-utils@^5.0.0, icss-utils@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== -ieee754@^1.1.13: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -ignore-by-default@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" - integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA== - ignore@^5.1.1, ignore@^5.2.0, ignore@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" @@ -3591,11 +2820,6 @@ ignore@^5.1.9: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== -immutable@^3: - version "3.8.2" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.2.tgz#c2439951455bb39913daf281376f1530e104adf3" - integrity sha512-15gZoQ38eYjEjxkorfbcgBKBL6R7T459OuK+CpcWt7O3KF4uPCx2tD0uFETlUDIyo+1789crbMhTvQBSR5yBMg== - immutable@^4.0.0: version "4.3.7" resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.7.tgz#c70145fc90d89fb02021e65c84eb0226e4e5a381" @@ -3622,11 +2846,6 @@ imurmurhash@^0.1.4: resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" - integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== - inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -3635,42 +2854,16 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: +inherits@2: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== - ini@^1.3.5: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -inquirer@^8.2.6: - version "8.2.6" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.6.tgz#733b74888195d8d400a67ac332011b5fae5ea562" - integrity sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg== - dependencies: - ansi-escapes "^4.2.1" - chalk "^4.1.1" - cli-cursor "^3.1.0" - cli-width "^3.0.0" - external-editor "^3.0.3" - figures "^3.0.0" - lodash "^4.17.21" - mute-stream "0.0.8" - ora "^5.4.1" - run-async "^2.4.0" - rxjs "^7.5.5" - string-width "^4.1.0" - strip-ansi "^6.0.0" - through "^2.3.6" - wrap-ansi "^6.0.1" - internal-slot@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" @@ -3690,11 +2883,6 @@ intersection-observer@^0.12.0: resolved "https://registry.yarnpkg.com/intersection-observer/-/intersection-observer-0.12.2.tgz#4a45349cc0cd91916682b1f44c28d7ec737dc375" integrity sha512-7m1vEcPCxXYI8HqnL8CKI6siDyD+eIWSwgB3DZA+ZTogxk9I4CDnj4wilt9x/+/QbHI4YG5YZNmC6458/e9Ktg== -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - is-array-buffer@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98" @@ -3794,11 +2982,6 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" -is-interactive@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" - integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== - is-map@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.3.tgz#ede96b7fe1e270b3c4465e3a465658764926d62e" @@ -3809,13 +2992,6 @@ is-negative-zero@^2.0.3: resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== -is-number-like@^1.0.3: - version "1.0.8" - resolved "https://registry.yarnpkg.com/is-number-like/-/is-number-like-1.0.8.tgz#2e129620b50891042e44e9bbbb30593e75cfbbe3" - integrity sha512-6rZi3ezCyFcn5L71ywzz2bS5b2Igl1En3eTlZlvKjpz1n3IZLAYMbKYAIQgFmEu0GENg92ziU/faEOA/aixjbA== - dependencies: - lodash.isfinite "^3.3.2" - is-number-object@^1.0.4: version "1.0.7" resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" @@ -3828,12 +3004,7 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-path-cwd@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" - integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== - -is-path-inside@^3.0.2, is-path-inside@^3.0.3: +is-path-inside@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== @@ -3891,11 +3062,6 @@ is-typed-array@^1.1.13: dependencies: which-typed-array "^1.1.14" -is-unicode-supported@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" - integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== - is-weakmap@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.2.tgz#bf72615d649dfe5f699079c54b83e47d1ae19cfd" @@ -3916,21 +3082,11 @@ is-weakset@^2.0.3: call-bind "^1.0.7" get-intrinsic "^1.2.4" -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - integrity sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw== - isarray@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== - isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -4037,22 +3193,6 @@ json5@^2.1.2, json5@^2.2.3: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -jsonfile@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" - integrity sha512-oBko6ZHlubVB5mRFkur5vgYR1UyqX+S6Y/oCfLhqNdcc2fYFlDpIoNc7AfKS1KOGcnNAkvsr0grLck9ANM815w== - optionalDependencies: - graceful-fs "^4.1.6" - -jsonfile@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" - integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== - dependencies: - universalify "^2.0.0" - optionalDependencies: - graceful-fs "^4.1.6" - "jsx-ast-utils@^2.4.1 || ^3.0.0": version "3.3.5" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz#4766bd05a8e2a11af222becd19e15575e52a853a" @@ -4093,11 +3233,6 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -limiter@^1.0.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/limiter/-/limiter-1.1.5.tgz#8f92a25b3b16c6131293a0cc834b4a838a2aa7c2" - integrity sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA== - lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" @@ -4155,11 +3290,6 @@ lodash.debounce@^4.0.8: resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== -lodash.isfinite@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz#fb89b65a9a80281833f0b7478b3a5104f898ebb3" - integrity sha512-7FGG40uhC8Mm633uKW1r58aElFlBlxCrg9JfSi3P6aYiWmfiWF0PgMd86ZUsxE5GwWPdHoS2+48bwTh2VPkIQA== - lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" @@ -4170,19 +3300,6 @@ lodash.truncate@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== -lodash@^4.17.10, lodash@^4.17.14, lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -log-symbols@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" - integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== - dependencies: - chalk "^4.1.0" - is-unicode-supported "^0.1.0" - loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -4204,11 +3321,6 @@ make-dir@^3.0.2, make-dir@^3.1.0: dependencies: semver "^6.0.0" -marked@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" - integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== - mathml-tag-names@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3" @@ -4219,21 +3331,11 @@ mdn-data@2.0.30: resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.30.tgz#ce4df6f80af6cfbe218ecd5c552ba13c4dfa08cc" integrity sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA== -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== - meow@^13.2.0: version "13.2.0" resolved "https://registry.yarnpkg.com/meow/-/meow-13.2.0.tgz#6b7d63f913f984063b3cc261b6e8800c4cd3474f" integrity sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA== -merge-descriptors@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz#d80319a65f3c7935351e5cfdac8f9318504dbed5" - integrity sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ== - merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -4244,12 +3346,7 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== - -micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.7: +micromatch@^4.0.4, micromatch@^4.0.7: version "4.0.8" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== @@ -4262,28 +3359,13 @@ mime-db@1.52.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.12, mime-types@^2.1.27, mime-types@~2.1.17, mime-types@~2.1.24, mime-types@~2.1.34: +mime-types@^2.1.27: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" -mime@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - mini-css-extract-plugin@^2.6.0: version "2.9.0" resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.9.0.tgz#c73a1327ccf466f69026ac22a8e8fd707b78a235" @@ -4292,7 +3374,7 @@ mini-css-extract-plugin@^2.6.0: schema-utils "^4.0.0" tapable "^2.2.1" -minimatch@^3.0.2, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -4304,22 +3386,12 @@ minimist@^1.2.0, minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== -mitt@^1.1.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mitt/-/mitt-1.2.0.tgz#cb24e6569c806e31bd4e3995787fe38a04fdf90d" - integrity sha512-r6lj77KlwqLhIUku9UWYes7KJtsczvolZkzp8hbaDPPaE24OmWl5s539Mytlj22siEQKosZ26qCBgda2PKwoJw== - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.1.1: +ms@^2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -4329,11 +3401,6 @@ mutation-observer-inner-html-shim@^1.0.0: resolved "https://registry.yarnpkg.com/mutation-observer-inner-html-shim/-/mutation-observer-inner-html-shim-1.0.1.tgz#84349f51dfc390d0af85011de8fa14e645fb400e" integrity sha512-YmJPDSUWJgBhwqRJP6AMvjdfDHU1gsrT5YdgpxMit2+x1khLYhdYq9fvp4clPsYecVT3JOprBf/KjEX7IqlU+g== -mute-stream@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" - integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== - nanoid@^3.3.7: version "3.3.8" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" @@ -4344,11 +3411,6 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -negotiator@0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - neo-async@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" @@ -4359,37 +3421,12 @@ node-releases@^2.0.18: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== -nodemon@^3.0.3: - version "3.1.4" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.1.4.tgz#c34dcd8eb46a05723ccde60cbdd25addcc8725e4" - integrity sha512-wjPBbFhtpJwmIeY2yP7QF+UKzPfltVGtfce1g/bB15/8vCGZj8uxD62b/b9M9/WVgme0NZudpownKN+c0plXlQ== - dependencies: - chokidar "^3.5.2" - debug "^4" - ignore-by-default "^1.0.1" - minimatch "^3.1.2" - pstree.remy "^1.1.8" - semver "^7.5.3" - simple-update-notifier "^2.0.0" - supports-color "^5.5.0" - touch "^3.1.0" - undefsafe "^2.0.5" - normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -nunjucks@^3.2.4: - version "3.2.4" - resolved "https://registry.yarnpkg.com/nunjucks/-/nunjucks-3.2.4.tgz#f0878eef528ce7b0aa35d67cc6898635fd74649e" - integrity sha512-26XRV6BhkgK0VOxfbU5cQI+ICFUtMLixv1noZn1tGU38kQH5A5nmmbk/O45xdyBhD1esk47nKrY0mvQpZIhRjQ== - dependencies: - a-sync-waterfall "^1.0.0" - asap "^2.0.3" - commander "^5.1.0" - -object-assign@^4, object-assign@^4.1.1: +object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -4451,25 +3488,6 @@ object.values@^1.1.6, object.values@^1.1.7, object.values@^1.2.0: define-properties "^1.2.1" es-object-atoms "^1.0.0" -on-finished@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" - integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== - dependencies: - ee-first "1.1.1" - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww== - dependencies: - ee-first "1.1.1" - -on-headers@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" - integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== - once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -4477,20 +3495,6 @@ once@^1.3.0: dependencies: wrappy "1" -onetime@^5.1.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -opn@5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.3.0.tgz#64871565c863875f052cfdf53d3e3cb5adb53b1c" - integrity sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g== - dependencies: - is-wsl "^1.1.0" - optionator@^0.9.3: version "0.9.4" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" @@ -4503,26 +3507,6 @@ optionator@^0.9.3: type-check "^0.4.0" word-wrap "^1.2.5" -ora@^5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" - integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== - dependencies: - bl "^4.1.0" - chalk "^4.1.0" - cli-cursor "^3.1.0" - cli-spinners "^2.5.0" - is-interactive "^1.0.0" - is-unicode-supported "^0.1.0" - log-symbols "^4.1.0" - strip-ansi "^6.0.0" - wcwidth "^1.0.1" - -os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== - p-limit@^2.0.0, p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -4558,13 +3542,6 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -4577,11 +3554,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-cache-control@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parse-cache-control/-/parse-cache-control-1.0.1.tgz#8eeab3e54fa56920fe16ba38f77fa21aacc2d74e" - integrity sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg== - parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" @@ -4600,11 +3572,6 @@ parse-json@^5.0.0, parse-json@^5.2.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" -parseurl@~1.3.2, parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -4630,11 +3597,6 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-to-regexp@0.1.10: - version "0.1.10" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.10.tgz#67e9108c5c0551b9e5326064387de4763c4d5f8b" - integrity sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w== - path-type@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" @@ -4670,14 +3632,6 @@ pkg-dir@^4.1.0, pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -portscanner@2.2.0, portscanner@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/portscanner/-/portscanner-2.2.0.tgz#6059189b3efa0965c9d96a56b958eb9508411cf1" - integrity sha512-IFroCz/59Lqa2uBvzK3bKDbDDIEaAY8XJ1jFxcLWTqosrsc32//P4VuSB2vZXoHiHqOmx8B5L5hnKOxL/7FlPw== - dependencies: - async "^2.6.0" - is-number-like "^1.0.3" - possible-typed-array-names@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" @@ -4768,18 +3722,6 @@ prettier@3.3.3: resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105" integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew== -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -promise@^8.0.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/promise/-/promise-8.3.0.tgz#8cb333d1edeb61ef23869fbb8a4ea0279ab60e0a" - integrity sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg== - dependencies: - asap "~2.0.6" - prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" @@ -4789,41 +3731,16 @@ prop-types@^15.8.1: object-assign "^4.1.1" react-is "^16.13.1" -proxy-addr@~2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" - integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== - dependencies: - forwarded "0.2.0" - ipaddr.js "1.9.1" - -pstree.remy@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a" - integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w== - punycode@^2.1.0: version "2.3.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== -qs@6.13.0, qs@^6.4.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" - integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== - dependencies: - side-channel "^1.0.6" - queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -queue-tick@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/queue-tick/-/queue-tick-1.0.1.tgz#f6f07ac82c1fd60f82e098b417a80e52f1f4c142" - integrity sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag== - rails_admin@3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/rails_admin/-/rails_admin-3.3.0.tgz#58701b189e40b7c7f9a0a8ba2b996a41d5842017" @@ -4839,11 +3756,6 @@ rails_admin@3.3.0: jquery "^3.6.0" jquery-ui "^1.12.1 <1.14.0" -random-bytes@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/random-bytes/-/random-bytes-1.0.0.tgz#4f68a1dc0ae58bd3fb95848c30324db75d64360b" - integrity sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ== - randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -4851,48 +3763,11 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" -range-parser@~1.2.0, range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.5.2, raw-body@^2.3.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" - integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== - dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" - react-is@^16.13.1: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== -readable-stream@^2.2.2: - version "2.3.8" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" - integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@^3.4.0: - version "3.6.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -4983,26 +3858,11 @@ regjsparser@^0.9.1: dependencies: jsesc "~0.5.0" -require-dir@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/require-dir/-/require-dir-1.2.0.tgz#0d443b75e96012d3ca749cf19f529a789ae74817" - integrity sha512-LY85DTSu+heYgDqq/mK+7zFHWkttVNRXC9NKcKGyuGLdlsfbjEPrIEYdCVrx6hqnJb+xSu3Lzaoo8VnmOhhjNA== - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - require-from-string@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== - resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" @@ -5047,22 +3907,6 @@ resolve@^2.0.0-next.5: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resp-modifier@6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/resp-modifier/-/resp-modifier-6.0.2.tgz#b124de5c4fbafcba541f48ffa73970f4aa456b4f" - integrity sha512-U1+0kWC/+4ncRFYqQWTx/3qkfE6a4B/h3XXgmXypfa0SPZ3t7cbbaFk297PjQS/yov24R18h6OZe6iZwj3NSLw== - dependencies: - debug "^2.2.0" - minimatch "^3.0.2" - -restore-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" - integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== - dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" - reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -5075,11 +3919,6 @@ rimraf@^3.0.2: dependencies: glob "^7.1.3" -run-async@^2.4.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" - integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== - run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -5087,18 +3926,6 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -rx@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782" - integrity sha512-CiaiuN6gapkdl+cZUr67W6I8jquN4lkak3vtIsIWCl4XIPP8ffsoyN6/+PuGXnQy8Cu8W2y9Xxh31Rq4M6wUug== - -rxjs@^7.5.5: - version "7.8.1" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" - integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== - dependencies: - tslib "^2.1.0" - safe-array-concat@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb" @@ -5109,16 +3936,11 @@ safe-array-concat@^1.1.2: has-symbols "^1.0.3" isarray "^2.0.5" -safe-buffer@5.2.1, safe-buffer@^5.1.0, safe-buffer@~5.2.0: +safe-buffer@^5.1.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - safe-regex-test@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" @@ -5128,11 +3950,6 @@ safe-regex-test@^1.0.3: es-errors "^1.3.0" is-regex "^1.1.4" -"safer-buffer@>= 2.1.2 < 3": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - sass-loader@^12.6.0: version "12.6.0" resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-12.6.0.tgz#5148362c8e2cdd4b950f3c63ac5d16dbfed37bcb" @@ -5141,7 +3958,7 @@ sass-loader@^12.6.0: klona "^2.0.4" neo-async "^2.6.2" -sass@^1.49.9, sass@^1.71.1: +sass@^1.49.9: version "1.77.8" resolved "https://registry.yarnpkg.com/sass/-/sass-1.77.8.tgz#9f18b449ea401759ef7ec1752a16373e296b52bd" integrity sha512-4UHg6prsrycW20fqLGPShtEvo/WyHRVRHwOP4DzkUrObWoWI05QBSfzU71TVB7PFaL104TwNaHpjlWXAZbQiNQ== @@ -5183,49 +4000,11 @@ semver@^6.0.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.0.0, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4: +semver@^7.0.0, semver@^7.3.8, semver@^7.5.4: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== -send@0.16.2: - version "0.16.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" - integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.6.2" - mime "1.4.1" - ms "2.0.0" - on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.4.0" - -send@0.19.0: - version "0.19.0" - resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" - integrity sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw== - dependencies: - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "2.0.0" - mime "1.6.0" - ms "2.1.3" - on-finished "2.4.1" - range-parser "~1.2.1" - statuses "2.0.1" - serialize-javascript@^6.0.0, serialize-javascript@^6.0.1: version "6.0.2" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" @@ -5233,44 +4012,6 @@ serialize-javascript@^6.0.0, serialize-javascript@^6.0.1: dependencies: randombytes "^2.1.0" -serve-index@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" - integrity sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw== - dependencies: - accepts "~1.3.4" - batch "0.6.1" - debug "2.6.9" - escape-html "~1.0.3" - http-errors "~1.6.2" - mime-types "~2.1.17" - parseurl "~1.3.2" - -serve-static@1.13.2: - version "1.13.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" - integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.2" - send "0.16.2" - -serve-static@1.16.2: - version "1.16.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296" - integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw== - dependencies: - encodeurl "~2.0.0" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.19.0" - -server-destroy@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/server-destroy/-/server-destroy-1.0.1.tgz#f13bf928e42b9c3e79383e61cc3998b5d14e6cdd" - integrity sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ== - set-function-length@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" @@ -5293,16 +4034,6 @@ set-function-name@^2.0.1, set-function-name@^2.0.2: functions-have-names "^1.2.3" has-property-descriptors "^1.0.2" -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== - -setprototypeof@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - shallow-clone@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" @@ -5332,23 +4063,11 @@ side-channel@^1.0.4, side-channel@^1.0.6: get-intrinsic "^1.2.4" object-inspect "^1.13.1" -signal-exit@^3.0.2: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - signal-exit@^4.0.1: version "4.1.0" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== -simple-update-notifier@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz#d70b92bdab7d6d90dfd73931195a30b6e3d7cebb" - integrity sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w== - dependencies: - semver "^7.5.3" - slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -5368,45 +4087,6 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" -socket.io-adapter@~2.5.2: - version "2.5.5" - resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.5.5.tgz#c7a1f9c703d7756844751b6ff9abfc1780664082" - integrity sha512-eLDQas5dzPgOWCk9GuuJC2lBqItuhKI4uxGgo9aIV7MYbk2h9Q6uULEh8WBzThoI7l+qU9Ast9fVUmkqPP9wYg== - dependencies: - debug "~4.3.4" - ws "~8.17.1" - -socket.io-client@^4.4.1: - version "4.7.5" - resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-4.7.5.tgz#919be76916989758bdc20eec63f7ee0ae45c05b7" - integrity sha512-sJ/tqHOCe7Z50JCBCXrsY3I2k03iOiUe+tj1OmKeD2lXPiGH/RUCdTZFoqVyN7l1MnpIzPrGtLcijffmeouNlQ== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.2" - engine.io-client "~6.5.2" - socket.io-parser "~4.2.4" - -socket.io-parser@~4.2.4: - version "4.2.4" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.4.tgz#c806966cf7270601e47469ddeec30fbdfda44c83" - integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.1" - -socket.io@^4.4.1: - version "4.7.5" - resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.7.5.tgz#56eb2d976aef9d1445f373a62d781a41c7add8f8" - integrity sha512-DmeAkF6cwM9jSfmp6Dr/5/mfMwb5Z5qRrSXLpo3Fq5SqyU8CMF15jIN4ZhfSwu35ksM1qmHZDQ/DK5XTccSTvA== - dependencies: - accepts "~1.3.4" - base64id "~2.0.0" - cors "~2.8.5" - debug "~4.3.2" - engine.io "~6.5.2" - socket.io-adapter "~2.5.2" - socket.io-parser "~4.2.4" - "source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.1, source-map-js@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" @@ -5450,46 +4130,7 @@ standard@^17.0.0: standard-engine "^15.0.0" version-guard "^1.1.1" -statuses@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" - integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== - -"statuses@>= 1.4.0 < 2": - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== - -statuses@~1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" - integrity sha512-wuTCPGlJONk/a1kqZ4fQM2+908lC7fa7nPYpTC1EhnvqLX/IICbeP1OZGDtA374trpSq68YubKUMo8oRhN46yg== - -statuses@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" - integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== - -stream-throttle@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/stream-throttle/-/stream-throttle-0.1.3.tgz#add57c8d7cc73a81630d31cd55d3961cfafba9c3" - integrity sha512-889+B9vN9dq7/vLbGyuHeZ6/ctf5sNuGWsDy89uNxkFTAgzy0eK7+w5fL3KLNRTkLle7EgZGvHUphZW0Q26MnQ== - dependencies: - commander "^2.2.0" - limiter "^1.0.5" - -streamx@^2.15.0: - version "2.18.0" - resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.18.0.tgz#5bc1a51eb412a667ebfdcd4e6cf6a6fc65721ac7" - integrity sha512-LLUC1TWdjVdn1weXGcSxyTR3T4+acB6tVGXT95y0nGbca4t4o/ng1wKAGTljm9VicuCVLvRlqFYXYy5GwgM7sQ== - dependencies: - fast-fifo "^1.3.2" - queue-tick "^1.0.1" - text-decoder "^1.1.0" - optionalDependencies: - bare-events "^2.2.0" - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -5552,21 +4193,7 @@ string.prototype.trimstart@^1.0.8: define-properties "^1.2.1" es-object-atoms "^1.0.0" -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: +strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -5685,7 +4312,7 @@ stylelint@^16.8.2: table "^6.8.2" write-file-atomic "^5.0.1" -supports-color@^5.3.0, supports-color@^5.5.0: +supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== @@ -5724,22 +4351,6 @@ svg-tags@^1.0.0: resolved "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764" integrity sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA== -sync-request@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/sync-request/-/sync-request-6.1.0.tgz#e96217565b5e50bbffe179868ba75532fb597e68" - integrity sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw== - dependencies: - http-response-object "^3.0.1" - sync-rpc "^1.2.1" - then-request "^6.0.0" - -sync-rpc@^1.2.1: - version "1.3.6" - resolved "https://registry.yarnpkg.com/sync-rpc/-/sync-rpc-1.3.6.tgz#b2e8b2550a12ccbc71df8644810529deb68665a7" - integrity sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw== - dependencies: - get-port "^3.1.0" - table@^6.8.2: version "6.8.2" resolved "https://registry.yarnpkg.com/table/-/table-6.8.2.tgz#c5504ccf201213fa227248bdc8c5569716ac6c58" @@ -5756,15 +4367,6 @@ tapable@^2.1.1, tapable@^2.2.0, tapable@^2.2.1: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== -tar-stream@^3.1.7: - version "3.1.7" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-3.1.7.tgz#24b3fb5eabada19fe7338ed6d26e5f7c482e792b" - integrity sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ== - dependencies: - b4a "^1.6.4" - fast-fifo "^1.2.0" - streamx "^2.15.0" - terser-webpack-plugin@^5.3.10: version "5.3.10" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" @@ -5786,47 +4388,11 @@ terser@^5.26.0: commander "^2.20.0" source-map-support "~0.5.20" -text-decoder@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/text-decoder/-/text-decoder-1.1.1.tgz#5df9c224cebac4a7977720b9f083f9efa1aefde8" - integrity sha512-8zll7REEv4GDD3x4/0pW+ppIxSNs7H1J10IKFZsuOMscumCdM2a+toDGLPA3T+1+fLBql4zbt5z83GEQGGV5VA== - dependencies: - b4a "^1.6.4" - text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== -then-request@^6.0.0: - version "6.0.2" - resolved "https://registry.yarnpkg.com/then-request/-/then-request-6.0.2.tgz#ec18dd8b5ca43aaee5cb92f7e4c1630e950d4f0c" - integrity sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA== - dependencies: - "@types/concat-stream" "^1.6.0" - "@types/form-data" "0.0.33" - "@types/node" "^8.0.0" - "@types/qs" "^6.2.31" - caseless "~0.12.0" - concat-stream "^1.6.0" - form-data "^2.2.0" - http-basic "^8.1.1" - http-response-object "^3.0.1" - promise "^8.0.0" - qs "^6.4.0" - -through@^2.3.6: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== - -tmp@^0.0.33: - version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== - dependencies: - os-tmpdir "~1.0.2" - to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" @@ -5839,16 +4405,6 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -toidentifier@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" - integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== - -touch@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.1.tgz#097a23d7b161476435e5c1344a95c0f75b4a5694" - integrity sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA== - tsconfig-paths@^3.15.0: version "3.15.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" @@ -5859,11 +4415,6 @@ tsconfig-paths@^3.15.0: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^2.1.0: - version "2.6.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" - integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== - type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" @@ -5876,24 +4427,11 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - type-fest@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== -type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - typed-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" @@ -5938,23 +4476,6 @@ typed-array-length@^1.0.6: is-typed-array "^1.1.13" possible-typed-array-names "^1.0.0" -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== - -ua-parser-js@^1.0.33: - version "1.0.38" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-1.0.38.tgz#66bb0c4c0e322fe48edfe6d446df6042e62f25e2" - integrity sha512-Aq5ppTOfvrCMgAPneW1HfWj66Xi7XL+/mIy996R1/CLS/rcyJQm6QZdsKrUeivDFQ+Oc9Wyuwor8Ze8peEoUoQ== - -uid-safe@~2.1.5: - version "2.1.5" - resolved "https://registry.yarnpkg.com/uid-safe/-/uid-safe-2.1.5.tgz#2b3d5c7240e8fc2e58f8aa269e5ee49c0857bd3a" - integrity sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA== - dependencies: - random-bytes "~1.0.0" - unbox-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" @@ -5965,11 +4486,6 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undefsafe@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c" - integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA== - undici-types@~6.18.2: version "6.18.2" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.18.2.tgz#8b678cf939d4fc9ec56be3c68ed69c619dee28b0" @@ -6003,29 +4519,6 @@ unicode-property-aliases-ecmascript@^2.0.0: resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz#43d41e3be698bd493ef911077c9b131f827e8ccd" integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== -universal-analytics@^0.5.3: - version "0.5.3" - resolved "https://registry.yarnpkg.com/universal-analytics/-/universal-analytics-0.5.3.tgz#ff2d9b850062cdd4a8f652448047982a183c8e96" - integrity sha512-HXSMyIcf2XTvwZ6ZZQLfxfViRm/yTGoRgDeTbojtq6rezeyKB0sTBcKH2fhddnteAHRcHiKgr/ACpbgjGOC6RQ== - dependencies: - debug "^4.3.1" - uuid "^8.0.0" - -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -universalify@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" - integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== - update-browserslist-db@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz#7ca61c0d8650766090728046e416a8cde682859e" @@ -6041,31 +4534,11 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: +util-deprecate@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== - -uuid@^8.0.0: - version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - -uuid@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" - integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== - -vary@^1, vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== - version-guard@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/version-guard/-/version-guard-1.1.2.tgz#f87524249db225bf802498d25bc0e5c2b8c584dc" @@ -6079,13 +4552,6 @@ watchpack@^2.4.1: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" -wcwidth@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" - integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== - dependencies: - defaults "^1.0.3" - webpack-cli@^4.9.2: version "4.10.0" resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.10.0.tgz#37c1d69c8d85214c5a65e589378f53aec64dab31" @@ -6227,24 +4693,6 @@ word-wrap@^1.2.5: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== -wrap-ansi@^6.0.1: - version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -6258,26 +4706,11 @@ write-file-atomic@^5.0.1: imurmurhash "^0.1.4" signal-exit "^4.0.1" -ws@~8.17.1: - version "8.17.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" - integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== - xdg-basedir@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13" integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== -xmlhttprequest-ssl@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz#91360c86b914e67f44dce769180027c0da618c67" - integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - yallist@^3.0.2: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" @@ -6288,24 +4721,6 @@ yaml@^1.10.0: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== -yargs-parser@^21.1.1: - version "21.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" - integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - -yargs@^17.3.1: - version "17.7.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" - integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" From 32ea1303402dd16b4503f580ce7381c826f2ee21 Mon Sep 17 00:00:00 2001 From: Rachael Booth Date: Tue, 17 Dec 2024 16:05:58 +0000 Subject: [PATCH 29/30] CLDC-3811: Upgrade postgres used in tests and docker compose to 13.18 (#2874) --- .github/workflows/run_tests.yml | 12 ++++++------ docker-compose.yml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 1965a4034..41a65be92 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -20,7 +20,7 @@ jobs: services: postgres: - image: postgres:13.5 + image: postgres:13.18 env: POSTGRES_PASSWORD: password POSTGRES_USER: postgres @@ -79,7 +79,7 @@ jobs: services: postgres: - image: postgres:13.5 + image: postgres:13.18 env: POSTGRES_PASSWORD: password POSTGRES_USER: postgres @@ -137,7 +137,7 @@ jobs: services: postgres: - image: postgres:13.5 + image: postgres:13.18 env: POSTGRES_PASSWORD: password POSTGRES_USER: postgres @@ -195,7 +195,7 @@ jobs: services: postgres: - image: postgres:13.5 + image: postgres:13.18 env: POSTGRES_PASSWORD: password POSTGRES_USER: postgres @@ -254,7 +254,7 @@ jobs: services: postgres: - image: postgres:13.5 + image: postgres:13.18 env: POSTGRES_PASSWORD: password POSTGRES_USER: postgres @@ -313,7 +313,7 @@ jobs: services: postgres: - image: postgres:13.5 + image: postgres:13.18 env: POSTGRES_PASSWORD: password POSTGRES_USER: postgres diff --git a/docker-compose.yml b/docker-compose.yml index cb96343b5..699e894d9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ volumes: services: db: - image: postgres:13.5-alpine + image: postgres:13.18-alpine restart: always # To preserve data between runs of docker-compose, we mount a folder from the host machine. volumes: From 3f4cbc2010eb93381d273b6c88504ed29b838afb Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Wed, 18 Dec 2024 08:20:20 +0000 Subject: [PATCH 30/30] Do not assign invalid postcode (#2855) * Do not assign invalid postcode * Make postcode full required if routed to * Update tests --- app/models/lettings_log.rb | 3 +-- app/models/log.rb | 2 +- app/models/sales_log.rb | 3 +-- spec/features/lettings_log_spec.rb | 27 +++++++++++++++++++++++++++ spec/features/sales_log_spec.rb | 27 +++++++++++++++++++++++++++ spec/models/lettings_log_spec.rb | 14 -------------- spec/models/sales_log_spec.rb | 16 ---------------- 7 files changed, 57 insertions(+), 35 deletions(-) diff --git a/app/models/lettings_log.rb b/app/models/lettings_log.rb index d1ff6f738..67cafb75b 100644 --- a/app/models/lettings_log.rb +++ b/app/models/lettings_log.rb @@ -779,8 +779,7 @@ private not_required << "previous_la_known" if postcode_known? not_required << "tshortfall" if tshortfall_unknown? not_required << "tenancylength" if tenancylength_optional? - - not_required |= %w[address_line2 county postcode_full] if startdate && collection_start_year_for_date(startdate) >= 2023 + not_required += %w[address_line2 county] not_required end diff --git a/app/models/log.rb b/app/models/log.rb index 5a9bde77e..94f0ff58d 100644 --- a/app/models/log.rb +++ b/app/models/log.rb @@ -110,7 +110,7 @@ class Log < ApplicationRecord self.address_line2 = nil self.town_or_city = nil self.county = nil - self.postcode_full = postcode_full_input + self.postcode_full = postcode_full_input if postcode_full_input.match(POSTCODE_REGEXP) process_postcode_changes! else self.uprn = uprn_selection diff --git a/app/models/sales_log.rb b/app/models/sales_log.rb index 361aab6f6..3064cba31 100644 --- a/app/models/sales_log.rb +++ b/app/models/sales_log.rb @@ -132,8 +132,7 @@ class SalesLog < Log not_required << "mortlen" if mortlen_optional? not_required << "frombeds" if frombeds_optional? not_required << "deposit" if form.start_year_2024_or_later? && stairowned_100? - - not_required |= %w[address_line2 county postcode_full] if saledate && collection_start_year_for_date(saledate) >= 2023 + not_required += %w[address_line2 county] not_required end diff --git a/spec/features/lettings_log_spec.rb b/spec/features/lettings_log_spec.rb index b10dfc6e5..525dee9ff 100644 --- a/spec/features/lettings_log_spec.rb +++ b/spec/features/lettings_log_spec.rb @@ -1018,6 +1018,33 @@ RSpec.describe "Lettings Log Features" do end end + context "and the user selects 'address_not_listed' when partial postcode is entered" do + before do + fill_in("lettings_log[address_line1_input]", with: "Address line 1") + fill_in("lettings_log[postcode_full_input]", with: "AA1") + click_button("Search") + choose "The address is not listed, I want to enter the address manually" + click_button("Save and continue") + end + + it "sets correct address fields" do + lettings_log.reload + expect(lettings_log.uprn_known).to eq(0) # no + expect(lettings_log.uprn).to eq(nil) + expect(lettings_log.uprn_confirmed).to eq(nil) + expect(lettings_log.uprn_selection).to eq("uprn_not_listed") + expect(lettings_log.postcode_known).to eq(nil) + expect(lettings_log.postcode_full).to eq(nil) + expect(lettings_log.address_line1).to eq("Address line 1") + expect(lettings_log.address_line2).to eq(nil) + expect(lettings_log.town_or_city).to eq(nil) + expect(lettings_log.address_line1_input).to eq("Address line 1") + expect(lettings_log.postcode_full_input).to eq("AA1") + expect(lettings_log.address_search_value_check).to eq(nil) + expect(lettings_log.la).to eq(nil) + end + end + context "and the user selects 'address_not_listed' and then changes their mind and selects an address" do before do fill_in("lettings_log[address_line1_input]", with: "Address line 1") diff --git a/spec/features/sales_log_spec.rb b/spec/features/sales_log_spec.rb index d418bcb37..663a4f7ac 100644 --- a/spec/features/sales_log_spec.rb +++ b/spec/features/sales_log_spec.rb @@ -599,6 +599,33 @@ RSpec.describe "Sales Log Features" do end end + context "and the user selects 'address_not_listed' when partial postcode is given" do + before do + fill_in("sales_log[address_line1_input]", with: "Address line 1") + fill_in("sales_log[postcode_full_input]", with: "1AA") + click_button("Search") + choose "The address is not listed, I want to enter the address manually" + click_button("Save and continue") + end + + it "sets correct address fields" do + sales_log.reload + expect(sales_log.uprn_known).to eq(0) # no + expect(sales_log.uprn).to eq(nil) + expect(sales_log.uprn_confirmed).to eq(nil) + expect(sales_log.uprn_selection).to eq("uprn_not_listed") + expect(sales_log.pcodenk).to eq(nil) + expect(sales_log.postcode_full).to eq(nil) + expect(sales_log.address_line1).to eq("Address line 1") + expect(sales_log.address_line2).to eq(nil) + expect(sales_log.town_or_city).to eq(nil) + expect(sales_log.address_line1_input).to eq("Address line 1") + expect(sales_log.postcode_full_input).to eq("1AA") + expect(sales_log.address_search_value_check).to eq(nil) + expect(sales_log.la).to eq(nil) + end + end + context "and the user selects 'address_not_listed' and then changes their mind and selects an address" do before do fill_in("sales_log[address_line1_input]", with: "Address line 1") diff --git a/spec/models/lettings_log_spec.rb b/spec/models/lettings_log_spec.rb index 17cad1c5e..e9493a017 100644 --- a/spec/models/lettings_log_spec.rb +++ b/spec/models/lettings_log_spec.rb @@ -861,19 +861,6 @@ RSpec.describe LettingsLog do end end - context "when startdate is before 2023" do - let(:lettings_log) { build(:lettings_log, startdate: Time.zone.parse("2022-07-01")) } - - it "returns optional fields" do - expect(lettings_log.optional_fields).to eq(%w[ - tenancycode - propcode - chcharge - tenancylength - ]) - end - end - context "when startdate is after 2023" do let(:lettings_log) { build(:lettings_log, startdate: Time.zone.parse("2023-07-01")) } @@ -885,7 +872,6 @@ RSpec.describe LettingsLog do tenancylength address_line2 county - postcode_full ]) end end diff --git a/spec/models/sales_log_spec.rb b/spec/models/sales_log_spec.rb index 9fe5a02a9..0c854c221 100644 --- a/spec/models/sales_log_spec.rb +++ b/spec/models/sales_log_spec.rb @@ -76,21 +76,6 @@ RSpec.describe SalesLog, type: :model do end describe "#optional_fields" do - context "when saledate is before 2023" do - let(:sales_log) { build(:sales_log, saledate: Time.zone.parse("2022-07-01")) } - - it "returns optional fields" do - expect(sales_log.optional_fields).to eq(%w[ - purchid - othtype - buyers_organisations - proplen - mortlen - frombeds - ]) - end - end - context "when saledate is after 2023" do let(:sales_log) { build(:sales_log, saledate: Time.zone.parse("2023-07-01")) } @@ -101,7 +86,6 @@ RSpec.describe SalesLog, type: :model do buyers_organisations address_line2 county - postcode_full ]) end end
Google Analytics cookies