diff --git a/app/components/bulk_upload_summary_component.html.erb b/app/components/bulk_upload_summary_component.html.erb
index abbff4493..a7ac57da3 100644
--- a/app/components/bulk_upload_summary_component.html.erb
+++ b/app/components/bulk_upload_summary_component.html.erb
@@ -4,7 +4,7 @@
<%= bulk_upload.filename %>
-
+
diff --git a/app/views/bulk_upload_lettings_resume/chosen.html.erb b/app/views/bulk_upload_lettings_resume/chosen.html.erb index 47ed9bbfd..a50af7524 100644 --- a/app/views/bulk_upload_lettings_resume/chosen.html.erb +++ b/app/views/bulk_upload_lettings_resume/chosen.html.erb @@ -4,7 +4,7 @@
You have chosen to create logs from your recent bulk upload. To view and complete these logs, return to the list of lettings logs.
diff --git a/app/views/bulk_upload_lettings_resume/completed.html.erb b/app/views/bulk_upload_lettings_resume/completed.html.erb index 0487d1921..59f58b710 100644 --- a/app/views/bulk_upload_lettings_resume/completed.html.erb +++ b/app/views/bulk_upload_lettings_resume/completed.html.erb @@ -4,7 +4,7 @@You have created logs from your bulk upload, and the logs are complete. Return to lettings logs to view them.
diff --git a/app/views/bulk_upload_lettings_resume/confirm.html.erb b/app/views/bulk_upload_lettings_resume/confirm.html.erb index 368f16f60..bb15c7101 100644 --- a/app/views/bulk_upload_lettings_resume/confirm.html.erb +++ b/app/views/bulk_upload_lettings_resume/confirm.html.erb @@ -4,7 +4,7 @@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 881f9026c..a13979dfd 100644 --- a/app/views/bulk_upload_lettings_resume/deletion_report.html.erb +++ b/app/views/bulk_upload_lettings_resume/deletion_report.html.erb @@ -4,7 +4,7 @@
The following cells contain data this is incorrect.
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 87aff25ae..383cdbfa1 100644 --- a/app/views/bulk_upload_lettings_resume/fix_choice.html.erb +++ b/app/views/bulk_upload_lettings_resume/fix_choice.html.erb @@ -3,7 +3,7 @@ <%= form_with model: @form, scope: :form, url: page_bulk_upload_lettings_resume_path(@bulk_upload, page: "fix-choice"), method: :patch do |f| %> <%= f.govuk_error_summary %> - +You have created logs from your bulk upload, and the logs are complete. Return to lettings logs to view them.
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 fcb039eac..90f5a00b3 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 @@ -4,7 +4,7 @@<%= logs_and_soft_validations_warning(@bulk_upload) %>
diff --git a/app/views/bulk_upload_lettings_soft_validations_check/confirm_soft_errors.html.erb b/app/views/bulk_upload_lettings_soft_validations_check/confirm_soft_errors.html.erb index 087557b3f..8a2a9d371 100644 --- a/app/views/bulk_upload_lettings_soft_validations_check/confirm_soft_errors.html.erb +++ b/app/views/bulk_upload_lettings_soft_validations_check/confirm_soft_errors.html.erb @@ -3,7 +3,7 @@Some data from your bulk upload might not be right. Check your file for any errors in the fields below.
diff --git a/app/views/bulk_upload_sales_results/show.html.erb b/app/views/bulk_upload_sales_results/show.html.erb index 6d0863617..24b09ce6a 100644 --- a/app/views/bulk_upload_sales_results/show.html.erb +++ b/app/views/bulk_upload_sales_results/show.html.erb @@ -6,7 +6,7 @@diff --git a/app/views/bulk_upload_sales_resume/chosen.html.erb b/app/views/bulk_upload_sales_resume/chosen.html.erb index 0d381e6a6..1f88a76b5 100644 --- a/app/views/bulk_upload_sales_resume/chosen.html.erb +++ b/app/views/bulk_upload_sales_resume/chosen.html.erb @@ -4,7 +4,7 @@
You have chosen to create logs from your recent bulk upload. To view and complete these logs, return to the list of sales logs.
diff --git a/app/views/bulk_upload_sales_resume/completed.html.erb b/app/views/bulk_upload_sales_resume/completed.html.erb index 9fcc656ad..737f56385 100644 --- a/app/views/bulk_upload_sales_resume/completed.html.erb +++ b/app/views/bulk_upload_sales_resume/completed.html.erb @@ -4,7 +4,7 @@You have created logs from your bulk upload, and the logs are complete. Return to sales logs to view them.
diff --git a/app/views/bulk_upload_sales_resume/confirm.html.erb b/app/views/bulk_upload_sales_resume/confirm.html.erb index 3d02e025a..b47619053 100644 --- a/app/views/bulk_upload_sales_resume/confirm.html.erb +++ b/app/views/bulk_upload_sales_resume/confirm.html.erb @@ -4,7 +4,7 @@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 299cff4f4..bcc044439 100644 --- a/app/views/bulk_upload_sales_resume/deletion_report.html.erb +++ b/app/views/bulk_upload_sales_resume/deletion_report.html.erb @@ -4,7 +4,7 @@
The following cells contain data this is incorrect.
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 5fcc1d5ea..946426d0c 100644 --- a/app/views/bulk_upload_sales_resume/fix_choice.html.erb +++ b/app/views/bulk_upload_sales_resume/fix_choice.html.erb @@ -3,7 +3,7 @@ <%= form_with model: @form, scope: :form, url: page_bulk_upload_sales_resume_path(@bulk_upload, page: "fix-choice"), method: :patch do |f| %> <%= f.govuk_error_summary %> - +You have created logs from your bulk upload, and the logs are complete. Return to sales logs to view them.
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 ca9f7fd4f..2b4a6e981 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 @@ -4,7 +4,7 @@<%= logs_and_soft_validations_warning(@bulk_upload) %>
diff --git a/app/views/bulk_upload_sales_soft_validations_check/confirm_soft_errors.html.erb b/app/views/bulk_upload_sales_soft_validations_check/confirm_soft_errors.html.erb index 4a2765ab4..0bf5553b3 100644 --- a/app/views/bulk_upload_sales_soft_validations_check/confirm_soft_errors.html.erb +++ b/app/views/bulk_upload_sales_soft_validations_check/confirm_soft_errors.html.erb @@ -3,7 +3,7 @@Some data from your bulk upload might not be right. Check your file for any errors in the fields below.
diff --git a/config/locales/en.yml b/config/locales/en.yml index 53154eab2..afa157034 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -290,9 +290,9 @@ en: startdate: current_collection_year: - "Enter a date within the %{current_start_year_short}/%{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}." + "Enter a date within the %{current_start_year_short} to %{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}." previous_and_current_collection_year: - "Enter a date within the %{previous_start_year_short}/%{previous_end_year_short} or %{previous_end_year_short}/%{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}." + "Enter a date within the %{previous_start_year_short} to %{previous_end_year_short} or %{previous_end_year_short} to %{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}." later_than_14_days_after: "The tenancy start date must not be later than 14 days from today’s date." before_scheme_end_date: "The tenancy start date must be before the end date for this supported housing scheme." after_void_date: "Enter a tenancy start date that is after the void date." diff --git a/config/locales/validations/sales/setup.en.yml b/config/locales/validations/sales/setup.en.yml index 2741464b0..9dd13b525 100644 --- a/config/locales/validations/sales/setup.en.yml +++ b/config/locales/validations/sales/setup.en.yml @@ -7,9 +7,9 @@ en: next_two_weeks: "Sale completion date must not be later than 14 days from today’s date." must_be_within: current_collection_year: - "Enter a date within the %{current_start_year_short}/%{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}." + "Enter a date within the %{current_start_year_short} to %{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}." previous_and_current_collection_year: - "Enter a date within the %{previous_start_year_short}/%{previous_end_year_short} or %{previous_end_year_short}/%{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}." + "Enter a date within the %{previous_start_year_short} to %{previous_end_year_short} or %{previous_end_year_short} to %{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}." invalid: merged_organisations: "Enter a date when the owning organisation was active. %{owning_organisation} became inactive on %{merge_date} and was replaced by %{absorbing_organisation}." diff --git a/spec/components/bulk_upload_summary_component_spec.rb b/spec/components/bulk_upload_summary_component_spec.rb index 9c0c68731..544befcb3 100644 --- a/spec/components/bulk_upload_summary_component_spec.rb +++ b/spec/components/bulk_upload_summary_component_spec.rb @@ -12,7 +12,7 @@ RSpec.describe BulkUploadSummaryComponent, type: :component do it "shows the collection year" do result = render_inline(described_class.new(bulk_upload:)) - expect(result).to have_content("2024/2025") + expect(result).to have_content("2024 to 2025") end it "includes a download file link" do diff --git a/spec/features/bulk_upload_lettings_logs_spec.rb b/spec/features/bulk_upload_lettings_logs_spec.rb index 5d48d9ee0..315e1461e 100644 --- a/spec/features/bulk_upload_lettings_logs_spec.rb +++ b/spec/features/bulk_upload_lettings_logs_spec.rb @@ -5,8 +5,7 @@ RSpec.describe "Bulk upload lettings log" do let(:user) { create(:user) } let(:current_year) { current_collection_start_year } - let(:current_formatted_year) { "#{current_year}/#{current_year + 1}" } - let(:current_formatted_short_year) { "#{current_year}/#{current_year - 2000 + 1}" } + let(:current_formatted_year) { "#{current_year} to #{current_year + 1}" } let(:stub_file_upload) do vcap_services = { "aws-s3-bucket" => {} } @@ -47,12 +46,12 @@ RSpec.describe "Bulk upload lettings log" do expect(page.find_field("form-year-#{current_year}-field")).to be_checked click_button("Continue") - expect(page).to have_content("Upload lettings logs in bulk (#{current_formatted_short_year})") + expect(page).to have_content("Upload lettings logs in bulk (#{current_formatted_year})") click_button("Continue") expect(page).not_to have_content("What is the needs type?") - expect(page).to have_content("Upload lettings logs in bulk (#{current_formatted_short_year})") + expect(page).to have_content("Upload lettings logs in bulk (#{current_formatted_year})") expect(page).to have_content("Upload your file") click_button("Upload") @@ -88,7 +87,7 @@ RSpec.describe "Bulk upload lettings log" do expect(page).to have_link("Upload lettings logs in bulk") click_link("Upload lettings logs in bulk") - expect(page).to have_content("Upload lettings logs in bulk (#{current_formatted_short_year})") + expect(page).to have_content("Upload lettings logs in bulk (#{current_formatted_year})") click_button("Continue") expect(page).to have_content("Upload your file") @@ -107,7 +106,7 @@ RSpec.describe "Bulk upload lettings log" do expect(page).to have_content("Prepare your file") click_button("Continue") - expect(page).to have_content("Upload lettings logs in bulk (#{current_formatted_short_year})") + expect(page).to have_content("Upload lettings logs in bulk (#{current_formatted_year})") expect(page).to have_content("Upload your file") click_button("Upload") diff --git a/spec/features/bulk_upload_sales_logs_spec.rb b/spec/features/bulk_upload_sales_logs_spec.rb index e47273cdc..b7098999d 100644 --- a/spec/features/bulk_upload_sales_logs_spec.rb +++ b/spec/features/bulk_upload_sales_logs_spec.rb @@ -38,7 +38,7 @@ RSpec.describe "Bulk upload sales log" do click_button("Continue") expect(page).to have_content("You must select a collection period to upload for") - choose("2023/2024") + choose("2023 to 2024") click_button("Continue") click_link("Back") @@ -46,7 +46,7 @@ RSpec.describe "Bulk upload sales log" do expect(page.find_field("form-year-2023-field")).to be_checked click_button("Continue") - expect(page).to have_content("Upload sales logs in bulk (2023/24)") + expect(page).to have_content("Upload sales logs in bulk (2023 to 2024)") click_button("Continue") expect(page).to have_content("Upload your file") @@ -88,7 +88,7 @@ RSpec.describe "Bulk upload sales log" do expect(page).to have_link("Upload sales logs in bulk") click_link("Upload sales logs in bulk") - expect(page).to have_content("Upload sales logs in bulk (2023/24)") + expect(page).to have_content("Upload sales logs in bulk (2023 to 2024)") click_button("Continue") expect(page).to have_content("Upload your file") diff --git a/spec/features/sales_log_spec.rb b/spec/features/sales_log_spec.rb index 8e4ffba42..ceff00f94 100644 --- a/spec/features/sales_log_spec.rb +++ b/spec/features/sales_log_spec.rb @@ -191,7 +191,7 @@ RSpec.describe "Sales Log Features" do context "when one year filter is selected" do before do - check("2024") + check("2024 to 2025") click_button("Apply filters") end diff --git a/spec/helpers/filters_helper_spec.rb b/spec/helpers/filters_helper_spec.rb index 58c82f0c9..b709a16ac 100644 --- a/spec/helpers/filters_helper_spec.rb +++ b/spec/helpers/filters_helper_spec.rb @@ -491,7 +491,7 @@ RSpec.describe FiltersHelper do it "has the correct options" do expect(collection_year_options).to eq( { - "2023" => "2023/24", "2022" => "2022/23", "2021" => "2021/22" + "2023" => "2023 to 2024", "2022" => "2022 to 2023", "2021" => "2021 to 2022" }, ) end @@ -505,7 +505,7 @@ RSpec.describe FiltersHelper do it "has the correct options" do expect(collection_year_options).to eq( { - "2023" => "2023/24", "2022" => "2022/23" + "2023" => "2023 to 2024", "2022" => "2022 to 2023" }, ) end @@ -520,7 +520,7 @@ RSpec.describe FiltersHelper do it "has the correct options" do expect(collection_year_options).to eq( { - "2024" => "2024/25", "2023" => "2023/24", "2022" => "2022/23" + "2024" => "2024 to 2025", "2023" => "2023 to 2024", "2022" => "2022 to 2023" }, ) end @@ -541,7 +541,7 @@ RSpec.describe FiltersHelper do it "has the correct options" do expect(collection_year_radio_options).to eq( { - "2023" => { label: "2023/24" }, "2022" => { label: "2022/23" }, "2021" => { label: "2021/22" } + "2023" => { label: "2023 to 2024" }, "2022" => { label: "2022 to 2023" }, "2021" => { label: "2021 to 2022" } }, ) end @@ -555,7 +555,7 @@ RSpec.describe FiltersHelper do it "has the correct options" do expect(collection_year_radio_options).to eq( { - "2023" => { label: "2023/24" }, "2022" => { label: "2022/23" } + "2023" => { label: "2023 to 2024" }, "2022" => { label: "2022 to 2023" } }, ) end @@ -570,7 +570,7 @@ RSpec.describe FiltersHelper do it "has the correct options" do expect(collection_year_radio_options).to eq( { - "2024" => { label: "2024/25" }, "2023" => { label: "2023/24" }, "2022" => { label: "2022/23" } + "2024" => { label: "2024 to 2025" }, "2023" => { label: "2023 to 2024" }, "2022" => { label: "2022 to 2023" } }, ) end diff --git a/spec/helpers/tasklist_helper_spec.rb b/spec/helpers/tasklist_helper_spec.rb index 5d3bd4f91..c5e1bd784 100644 --- a/spec/helpers/tasklist_helper_spec.rb +++ b/spec/helpers/tasklist_helper_spec.rb @@ -143,7 +143,7 @@ RSpec.describe TasklistHelper do end it "returns relevant text" do - expect(review_log_text(sales_log)).to eq("This log is from the 2022/2023 collection window, which is now closed.") + expect(review_log_text(sales_log)).to eq("This log is from the 2022 to 2023 collection window, which is now closed.") end end @@ -156,7 +156,7 @@ RSpec.describe TasklistHelper do end it "returns relevant text" do - expect(review_log_text(sales_log)).to eq("This log is from the 2021/2022 collection window, which is now closed.") + expect(review_log_text(sales_log)).to eq("This log is from the 2021 to 2022 collection window, which is now closed.") end end end @@ -186,7 +186,7 @@ RSpec.describe TasklistHelper do end it "returns relevant text" do - expect(review_log_text(lettings_log)).to eq("This log is from the 2022/2023 collection window, which is now closed.") + expect(review_log_text(lettings_log)).to eq("This log is from the 2022 to 2023 collection window, which is now closed.") end end @@ -199,7 +199,7 @@ RSpec.describe TasklistHelper do end it "returns relevant text" do - expect(review_log_text(lettings_log)).to eq("This log is from the 2021/2022 collection window, which is now closed.") + expect(review_log_text(lettings_log)).to eq("This log is from the 2021 to 2022 collection window, which is now closed.") end end end diff --git a/spec/models/bulk_upload_spec.rb b/spec/models/bulk_upload_spec.rb index af2547d7a..db475709a 100644 --- a/spec/models/bulk_upload_spec.rb +++ b/spec/models/bulk_upload_spec.rb @@ -39,8 +39,8 @@ RSpec.describe BulkUpload, type: :model do describe "year_combo" do [ - { year: 2023, expected_value: "2023/24" }, - { year: 2024, expected_value: "2024/25" }, + { year: 2023, expected_value: "2023 to 2024" }, + { year: 2024, expected_value: "2024 to 2025" }, ].each do |test_case| context "when the bulk upload year is #{test_case[:year]}" do let(:bulk_upload) { build(:bulk_upload, year: test_case[:year]) } diff --git a/spec/models/forms/bulk_upload_lettings/year_spec.rb b/spec/models/forms/bulk_upload_lettings/year_spec.rb index 70d6af4bf..c4429b98b 100644 --- a/spec/models/forms/bulk_upload_lettings/year_spec.rb +++ b/spec/models/forms/bulk_upload_lettings/year_spec.rb @@ -17,7 +17,7 @@ RSpec.describe Forms::BulkUploadLettings::Year do it "returns current and previous years" do expect(form.options.map(&:id)).to eql([2024, 2023]) - expect(form.options.map(&:name)).to eql(%w[2024/2025 2023/2024]) + expect(form.options.map(&:name)).to eql(["2024 to 2025", "2023 to 2024"]) end end @@ -28,7 +28,7 @@ RSpec.describe Forms::BulkUploadLettings::Year do it "returns the current year" do expect(form.options.map(&:id)).to eql([2024]) - expect(form.options.map(&:name)).to eql(%w[2024/2025]) + expect(form.options.map(&:name)).to eql(["2024 to 2025"]) end end @@ -40,7 +40,7 @@ RSpec.describe Forms::BulkUploadLettings::Year do it "returns current and next years" do expect(form.options.map(&:id)).to eql([2024, 2025]) - expect(form.options.map(&:name)).to eql(%w[2024/2025 2025/2026]) + expect(form.options.map(&:name)).to eql(["2024 to 2025", "2025 to 2026"]) end end end diff --git a/spec/models/forms/bulk_upload_sales/year_spec.rb b/spec/models/forms/bulk_upload_sales/year_spec.rb index 2cfa8babc..b1b22bb8d 100644 --- a/spec/models/forms/bulk_upload_sales/year_spec.rb +++ b/spec/models/forms/bulk_upload_sales/year_spec.rb @@ -17,7 +17,7 @@ RSpec.describe Forms::BulkUploadSales::Year do it "returns current and previous years" do expect(form.options.map(&:id)).to eql([2024, 2023]) - expect(form.options.map(&:name)).to eql(%w[2024/2025 2023/2024]) + expect(form.options.map(&:name)).to eql(["2024 to 2025", "2023 to 2024"]) end end @@ -28,7 +28,7 @@ RSpec.describe Forms::BulkUploadSales::Year do it "returns the current year" do expect(form.options.map(&:id)).to eql([2024]) - expect(form.options.map(&:name)).to eql(%w[2024/2025]) + expect(form.options.map(&:name)).to eql(["2024 to 2025"]) end end @@ -44,7 +44,7 @@ RSpec.describe Forms::BulkUploadSales::Year do it "returns current and next years" do expect(form.options.map(&:id)).to eql([2024, 2025]) - expect(form.options.map(&:name)).to eql(%w[2024/2025 2025/2026]) + expect(form.options.map(&:name)).to eql(["2024 to 2025", "2025 to 2026"]) end end end diff --git a/spec/models/validations/sales/setup_validations_spec.rb b/spec/models/validations/sales/setup_validations_spec.rb index 797b0c22c..659cde23f 100644 --- a/spec/models/validations/sales/setup_validations_spec.rb +++ b/spec/models/validations/sales/setup_validations_spec.rb @@ -37,7 +37,7 @@ RSpec.describe Validations::Sales::SetupValidations do it "adds error" do setup_validator.validate_saledate_collection_year(record) - expect(record.errors[:saledate]).to include(/Enter a date within the \d{2}\/\d{2} collection year, which is between 1st April \d{4} and 31st March \d{4}/) + expect(record.errors[:saledate]).to include(/Enter a date within the \d{4} to \d{4} collection year, which is between 1st April \d{4} and 31st March \d{4}/) end end @@ -47,7 +47,7 @@ RSpec.describe Validations::Sales::SetupValidations do it "adds error" do setup_validator.validate_saledate_collection_year(record) - expect(record.errors[:saledate]).to include(/Enter a date within the \d{2}\/\d{2} collection year, which is between 1st April \d{4} and 31st March \d{4}/) + expect(record.errors[:saledate]).to include(/Enter a date within the \d{4} to \d{4} collection year, which is between 1st April \d{4} and 31st March \d{4}/) end end end @@ -91,7 +91,7 @@ RSpec.describe Validations::Sales::SetupValidations do it "adds error" do setup_validator.validate_saledate_collection_year(record) - expect(record.errors[:saledate]).to include("Enter a date within the 23/24 or 24/25 collection years, which is between 1st April 2023 and 31st March 2025.") + expect(record.errors[:saledate]).to include("Enter a date within the 2023 to 2024 or 2024 to 2025 collection years, which is between 1st April 2023 and 31st March 2025.") end end @@ -105,7 +105,7 @@ RSpec.describe Validations::Sales::SetupValidations do it "adds error" do setup_validator.validate_saledate_collection_year(record) - expect(record.errors[:saledate]).to include("Enter a date within the 23/24 or 24/25 collection years, which is between 1st April 2023 and 31st March 2025.") + expect(record.errors[:saledate]).to include("Enter a date within the 2023 to 2024 or 2024 to 2025 collection years, which is between 1st April 2023 and 31st March 2025.") end end @@ -119,7 +119,7 @@ RSpec.describe Validations::Sales::SetupValidations do it "cannot create new logs for the archived collection year" do record.saledate = Time.zone.local(2023, 1, 1) setup_validator.validate_saledate_collection_year(record) - expect(record.errors["saledate"]).to include(match "Enter a date within the 23/24 or 24/25 collection years, which is between 1st April 2023 and 31st March 2025.") + expect(record.errors["saledate"]).to include(match "Enter a date within the 2023 to 2024 or 2024 to 2025 collection years, which is between 1st April 2023 and 31st March 2025.") end it "can edit already created logs for the previous collection year" do @@ -127,7 +127,7 @@ RSpec.describe Validations::Sales::SetupValidations do record.save!(validate: false) record.saledate = Time.zone.local(2024, 1, 1) setup_validator.validate_saledate_collection_year(record) - expect(record.errors["saledate"]).not_to include(match "Enter a date within the 24/25 collection year, which is between 1st April 2024 and 31st March 2025.") + expect(record.errors["saledate"]).not_to include(match "Enter a date within the 2024 to 2025 collection year, which is between 1st April 2024 and 31st March 2025.") end end @@ -142,7 +142,7 @@ RSpec.describe Validations::Sales::SetupValidations do record.update!(saledate: nil) record.saledate = Time.zone.local(2023, 1, 1) setup_validator.validate_saledate_collection_year(record) - expect(record.errors["saledate"]).to include(match "Enter a date within the 23/24 or 24/25 collection years, which is between 1st April 2023 and 31st March 2025.") + expect(record.errors["saledate"]).to include(match "Enter a date within the 2023 to 2024 or 2024 to 2025 collection years, which is between 1st April 2023 and 31st March 2025.") end it "cannot edit already created logs for the archived collection year" do @@ -150,7 +150,7 @@ RSpec.describe Validations::Sales::SetupValidations do record.save!(validate: false) record.saledate = Time.zone.local(2023, 1, 1) setup_validator.validate_saledate_collection_year(record) - expect(record.errors["saledate"]).to include(match "Enter a date within the 23/24 or 24/25 collection years, which is between 1st April 2023 and 31st March 2025.") + expect(record.errors["saledate"]).to include(match "Enter a date within the 2023 to 2024 or 2024 to 2025 collection years, which is between 1st April 2023 and 31st March 2025.") end end end diff --git a/spec/models/validations/setup_validations_spec.rb b/spec/models/validations/setup_validations_spec.rb index f39b71328..f1e306a89 100644 --- a/spec/models/validations/setup_validations_spec.rb +++ b/spec/models/validations/setup_validations_spec.rb @@ -7,7 +7,7 @@ RSpec.describe Validations::SetupValidations do let(:record) { build(:lettings_log) } describe "tenancy start date" do - context "when in 22/23 collection" do + context "when in 2022 to 2023 collection" do context "when in the crossover period" do before do allow(Time).to receive(:now).and_return(Time.zone.local(2022, 4, 1)) @@ -18,14 +18,14 @@ RSpec.describe Validations::SetupValidations do record.startdate = Time.zone.local(2021, 1, 1) setup_validator.validate_startdate_setup(record) setup_validator.validate_merged_organisations_start_date(record) - expect(record.errors["startdate"]).to include(match "Enter a date within the 21/22 or 22/23 collection years, which is between 1st April 2021 and 31st March 2023") + expect(record.errors["startdate"]).to include(match "Enter a date within the 2021 to 2022 or 2022 to 2023 collection years, which is between 1st April 2021 and 31st March 2023") end it "cannot be after the second collection window end date" do record.startdate = Time.zone.local(2023, 7, 1, 6) setup_validator.validate_startdate_setup(record) setup_validator.validate_merged_organisations_start_date(record) - expect(record.errors["startdate"]).to include(match "Enter a date within the 21/22 or 22/23 collection years, which is between 1st April 2021 and 31st March 2023") + expect(record.errors["startdate"]).to include(match "Enter a date within the 2021 to 2022 or 2022 to 2023 collection years, which is between 1st April 2021 and 31st March 2023") end end @@ -39,19 +39,19 @@ RSpec.describe Validations::SetupValidations do record.startdate = Time.zone.local(2022, 1, 1) setup_validator.validate_startdate_setup(record) setup_validator.validate_merged_organisations_start_date(record) - expect(record.errors["startdate"]).to include(match "Enter a date within the 22/23 collection year, which is between 1st April 2022 and 31st March 2023") + expect(record.errors["startdate"]).to include(match "Enter a date within the 2022 to 2023 collection year, which is between 1st April 2022 and 31st March 2023") end it "cannot be after the second collection window end date" do record.startdate = Time.zone.local(2023, 7, 1, 6) setup_validator.validate_startdate_setup(record) setup_validator.validate_merged_organisations_start_date(record) - expect(record.errors["startdate"]).to include(match "Enter a date within the 22/23 collection year, which is between 1st April 2022 and 31st March 2023") + expect(record.errors["startdate"]).to include(match "Enter a date within the 2022 to 2023 collection year, which is between 1st April 2022 and 31st March 2023") end end end - context "when in 23/24 collection" do + context "when in 2023 to 2024 collection" do context "when in the crossover period" do before do allow(Time).to receive(:now).and_return(Time.zone.local(2023, 4, 1)) @@ -62,14 +62,14 @@ RSpec.describe Validations::SetupValidations do record.startdate = Time.zone.local(2022, 1, 1) setup_validator.validate_startdate_setup(record) setup_validator.validate_merged_organisations_start_date(record) - expect(record.errors["startdate"]).to include(match "Enter a date within the 22/23 or 23/24 collection years, which is between 1st April 2022 and 31st March 2024") + expect(record.errors["startdate"]).to include(match "Enter a date within the 2022 to 2023 or 2023 to 2024 collection years, which is between 1st April 2022 and 31st March 2024") end it "cannot be after the second collection window end date" do record.startdate = Time.zone.local(2024, 7, 1, 6) setup_validator.validate_startdate_setup(record) setup_validator.validate_merged_organisations_start_date(record) - expect(record.errors["startdate"]).to include(match "Enter a date within the 22/23 or 23/24 collection years, which is between 1st April 2022 and 31st March 2024") + expect(record.errors["startdate"]).to include(match "Enter a date within the 2022 to 2023 or 2023 to 2024 collection years, which is between 1st April 2022 and 31st March 2024") end end @@ -83,14 +83,14 @@ RSpec.describe Validations::SetupValidations do record.startdate = Time.zone.local(2023, 1, 1) setup_validator.validate_startdate_setup(record) setup_validator.validate_merged_organisations_start_date(record) - expect(record.errors["startdate"]).to include(match "Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024") + expect(record.errors["startdate"]).to include(match "Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024") end it "cannot be after the second collection window end date" do record.startdate = Time.zone.local(2024, 7, 1, 6) setup_validator.validate_startdate_setup(record) setup_validator.validate_merged_organisations_start_date(record) - expect(record.errors["startdate"]).to include(match "Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024") + expect(record.errors["startdate"]).to include(match "Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024") end end @@ -104,7 +104,7 @@ RSpec.describe Validations::SetupValidations do record.startdate = Time.zone.local(2023, 1, 1) setup_validator.validate_startdate_setup(record) setup_validator.validate_merged_organisations_start_date(record) - expect(record.errors["startdate"]).to include(match "Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024") + expect(record.errors["startdate"]).to include(match "Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024") end xit "can edit already created logs for the previous collection year" do @@ -113,7 +113,7 @@ RSpec.describe Validations::SetupValidations do record.startdate = Time.zone.local(2023, 1, 1) setup_validator.validate_startdate_setup(record) setup_validator.validate_merged_organisations_start_date(record) - expect(record.errors["startdate"]).not_to include(match "Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024") + expect(record.errors["startdate"]).not_to include(match "Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024") end end @@ -127,7 +127,7 @@ RSpec.describe Validations::SetupValidations do record.startdate = Time.zone.local(2023, 1, 1) setup_validator.validate_startdate_setup(record) setup_validator.validate_merged_organisations_start_date(record) - expect(record.errors["startdate"]).to include(match "Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024") + expect(record.errors["startdate"]).to include(match "Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024") end it "cannot edit already created logs for the previous collection year" do @@ -136,7 +136,7 @@ RSpec.describe Validations::SetupValidations do record.startdate = Time.zone.local(2023, 1, 1) setup_validator.validate_startdate_setup(record) setup_validator.validate_merged_organisations_start_date(record) - expect(record.errors["startdate"]).to include(match "Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024") + expect(record.errors["startdate"]).to include(match "Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024") end end end @@ -157,7 +157,7 @@ RSpec.describe Validations::SetupValidations do record.startdate = Time.zone.local(2024, 4, 1) setup_validator.validate_startdate_setup(record) expect(record.errors["startdate"].length).to be >= 2 - expect(record.errors["startdate"][0]).to eq("Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024.") + expect(record.errors["startdate"][0]).to eq("Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024.") expect(record.errors["startdate"][1]).to eq(I18n.t("validations.setup.startdate.later_than_14_days_after")) end end diff --git a/spec/requests/bulk_upload_lettings_results_controller_spec.rb b/spec/requests/bulk_upload_lettings_results_controller_spec.rb index dc78c9d78..afbd84df9 100644 --- a/spec/requests/bulk_upload_lettings_results_controller_spec.rb +++ b/spec/requests/bulk_upload_lettings_results_controller_spec.rb @@ -16,7 +16,7 @@ RSpec.describe BulkUploadLettingsResultsController, type: :request do get "/lettings-logs/bulk-upload-results/#{bulk_upload.id}/summary" expect(response).to be_successful - expect(response.body).to include("Bulk upload for lettings (#{bulk_upload.year_combo})") + expect(response.body).to include("Upload lettings logs in bulk (#{bulk_upload.year_combo})") end it "renders the bulk upload filename" do @@ -90,7 +90,7 @@ RSpec.describe BulkUploadLettingsResultsController, type: :request do get "/lettings-logs/bulk-upload-results/#{bulk_upload.id}" expect(response).to be_successful - expect(response.body).to include("Bulk upload for lettings (#{bulk_upload.year_combo})") + expect(response.body).to include("Upload lettings logs in bulk (#{bulk_upload.year_combo})") end it "renders correct number of errors" do diff --git a/spec/requests/bulk_upload_lettings_resume_controller_spec.rb b/spec/requests/bulk_upload_lettings_resume_controller_spec.rb index f6ac9bb4a..8e3c0b0e0 100644 --- a/spec/requests/bulk_upload_lettings_resume_controller_spec.rb +++ b/spec/requests/bulk_upload_lettings_resume_controller_spec.rb @@ -60,7 +60,7 @@ RSpec.describe BulkUploadLettingsResumeController, type: :request do expect(response).to be_successful - expect(response.body).to include("Bulk upload for lettings") + expect(response.body).to include("Upload lettings logs in bulk") expect(response.body).to include(bulk_upload.year_combo) expect(response.body).to include("View the error report") expect(response.body).to include("How would you like to fix the errors?") @@ -120,7 +120,7 @@ RSpec.describe BulkUploadLettingsResumeController, type: :request do expect(response).to be_successful - expect(response.body).to include("Bulk upload for lettings") + expect(response.body).to include("Upload lettings logs in bulk") expect(response.body).to include("Cancel") end end @@ -218,7 +218,7 @@ RSpec.describe BulkUploadLettingsResumeController, type: :request do expect(response).to be_successful - expect(response.body).to include("Bulk upload for lettings") + expect(response.body).to include("Upload lettings logs in bulk") expect(response.body).to include(bulk_upload.year_combo) expect(response.body).to include("These 2 answers will be deleted if you upload the log") expect(response.body).to include(bulk_upload.filename) @@ -260,7 +260,7 @@ RSpec.describe BulkUploadLettingsResumeController, type: :request do expect(response).to be_successful - expect(response.body).to include("Bulk upload for lettings") + expect(response.body).to include("Upload lettings logs in bulk") expect(response.body).to include(bulk_upload.year_combo) expect(response.body).to include("These 2 answers will be deleted if you upload the log") expect(response.body).to include(bulk_upload.filename) 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 e7fc9ed46..315235e0e 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 @@ -14,7 +14,7 @@ RSpec.describe BulkUploadLettingsSoftValidationsCheckController, type: :request it "shows the soft validation errors with confirmation question" do get "/lettings-logs/bulk-upload-soft-validations-check/#{bulk_upload.id}/confirm-soft-errors" - expect(response.body).to include("Bulk upload for lettings") + expect(response.body).to include("Upload lettings logs in bulk") expect(response.body).to include(bulk_upload.year_combo) expect(response.body).to include("Check these 2 answers") expect(response.body).to include(bulk_upload.filename) diff --git a/spec/requests/bulk_upload_sales_results_controller_spec.rb b/spec/requests/bulk_upload_sales_results_controller_spec.rb index 1bd171dec..b7bb7a10c 100644 --- a/spec/requests/bulk_upload_sales_results_controller_spec.rb +++ b/spec/requests/bulk_upload_sales_results_controller_spec.rb @@ -52,7 +52,7 @@ RSpec.describe BulkUploadSalesResultsController, type: :request do get "/sales-logs/bulk-upload-results/#{bulk_upload.id}" expect(response).to be_successful - expect(response.body).to include("Bulk Upload for sales (#{bulk_upload.year_combo})") + expect(response.body).to include("Upload sales logs in bulk (#{bulk_upload.year_combo})") end it "renders correct number of errors" do diff --git a/spec/requests/bulk_upload_sales_resume_controller_spec.rb b/spec/requests/bulk_upload_sales_resume_controller_spec.rb index 9c0efded8..c6622afcb 100644 --- a/spec/requests/bulk_upload_sales_resume_controller_spec.rb +++ b/spec/requests/bulk_upload_sales_resume_controller_spec.rb @@ -60,7 +60,7 @@ RSpec.describe BulkUploadSalesResumeController, type: :request do expect(response).to be_successful - expect(response.body).to include("Bulk upload for sales") + expect(response.body).to include("Upload sales logs in bulk") expect(response.body).to include(bulk_upload.year_combo) expect(response.body).to include("View the error report") expect(response.body).to include("How would you like to fix the errors?") @@ -120,7 +120,7 @@ RSpec.describe BulkUploadSalesResumeController, type: :request do expect(response).to be_successful - expect(response.body).to include("Bulk upload for sales") + expect(response.body).to include("Upload sales logs in bulk") expect(response.body).to include("Cancel") end end @@ -218,7 +218,7 @@ RSpec.describe BulkUploadSalesResumeController, type: :request do expect(response).to be_successful - expect(response.body).to include("Bulk upload for sales") + expect(response.body).to include("Upload sales logs in bulk") expect(response.body).to include(bulk_upload.year_combo) expect(response.body).to include("These 2 answers will be deleted if you upload the log") expect(response.body).to include(bulk_upload.filename) @@ -260,7 +260,7 @@ RSpec.describe BulkUploadSalesResumeController, type: :request do expect(response).to be_successful - expect(response.body).to include("Bulk upload for sales") + expect(response.body).to include("Upload sales logs in bulk") expect(response.body).to include(bulk_upload.year_combo) expect(response.body).to include("These 2 answers will be deleted if you upload the log") expect(response.body).to include(bulk_upload.filename) 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 f22ca0aa2..90e44a4f7 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 @@ -14,7 +14,7 @@ RSpec.describe BulkUploadSalesSoftValidationsCheckController, type: :request do it "shows the soft validation errors with confirmation question" do get "/sales-logs/bulk-upload-soft-validations-check/#{bulk_upload.id}/confirm-soft-errors" - expect(response.body).to include("Bulk upload for sales") + expect(response.body).to include("Upload sales logs in bulk") expect(response.body).to include(bulk_upload.year_combo) expect(response.body).to include("Check these 2 answers") expect(response.body).to include(bulk_upload.filename) diff --git a/spec/requests/lettings_logs_controller_spec.rb b/spec/requests/lettings_logs_controller_spec.rb index 3443a70ca..6af9f3f12 100644 --- a/spec/requests/lettings_logs_controller_spec.rb +++ b/spec/requests/lettings_logs_controller_spec.rb @@ -1202,7 +1202,7 @@ RSpec.describe LettingsLogsController, type: :request do it "displays a closed collection window message for previous collection year logs" do follow_redirect! - expect(page).to have_content(/This log is from the \d{4}\/\d{4} collection window, which is now closed\./) + expect(page).to have_content(/This log is from the \d{4} to \d{4} collection window, which is now closed\./) end end diff --git a/spec/requests/sales_logs_controller_spec.rb b/spec/requests/sales_logs_controller_spec.rb index 607349a68..4c6ca3cc1 100644 --- a/spec/requests/sales_logs_controller_spec.rb +++ b/spec/requests/sales_logs_controller_spec.rb @@ -954,7 +954,7 @@ RSpec.describe SalesLogsController, type: :request do expect(completed_sales_log.form.new_logs_end_date).to eq(Time.zone.local(2022, 12, 31)) expect(completed_sales_log.status).to eq("completed") follow_redirect! - expect(page).to have_content("This log is from the 2021/2022 collection window, which is now closed.") + expect(page).to have_content("This log is from the 2021 to 2022 collection window, which is now closed.") end end end