Skip to content

Commit 7b77e5b

Browse files
authored
GYR1-894 Update offseason banner copy (#6158)
1 parent de23e8f commit 7b77e5b

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

app/services/multi_tenant_service.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,13 @@ def filing_years(now = DateTime.now)
9999
if service_type == :ctc || service_type == :state_file
100100
[current_tax_year]
101101
else
102-
years = Rails.configuration.tax_year_filing_seasons.select do |_, (season_start, deadline)|
103-
deadline > now - 3.years && season_start <= now
104-
end.keys.freeze
102+
years = Rails.configuration.tax_year_filing_seasons.select do |_, (season_start, _)|
103+
now > season_start - 3.months
104+
end.keys.sort.reverse.take(3)
105105

106-
years += [years.last - 1] if between_deadline_and_end_of_in_progress_intake?(now)
107-
years
106+
years += [years.last - 1] if now < Rails.configuration.tax_year_filing_seasons[years.first].last
107+
108+
years.freeze
108109
end
109110
end
110111

@@ -145,7 +146,7 @@ def statefile
145146

146147
def gyr_current_tax_year(time)
147148
Rails.configuration.tax_year_filing_seasons.select do |_year, (open_date, _close_date)|
148-
time > open_date
149+
time > open_date - 3.months
149150
end.keys.max
150151
end
151152
end

config/locales/en.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5267,7 +5267,7 @@ en:
52675267
body: In accordance with national IRS guidelines, all Personally Identifiable Information (PII) provided by taxpayers to volunteers must be protected. We keep your information safe and secure.
52685268
header: Committed to keeping your information secure.
52695269
subheader: Claim thousands of dollars through tax credits you're owed! We work with you to get your highest refund.
5270-
subheader_offseason: Sign up for the next tax season now! We'll notify you as soon as our service reopens on January 31 at 1pm EST.
5270+
subheader_offseason: Sign up for the next tax season now! We'll notify you as soon as our service reopens late January.
52715271
subheader_warning: File by %{tax_day} to avoid any penalties.
52725272
title: Free tax help from IRS-certified volunteers.
52735273
maybe_ineligible:

config/locales/es.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5240,7 +5240,7 @@ es:
52405240
body: De acuerdo con las pautas nacionales del IRS, toda la información de identificación personal (PII, por sus siglas en inglés) que los contribuyentes proporcionan a los voluntarios debe estar protegida. Mantenemos su información segura y protegida.
52415241
header: Nos comprometemos a mantener la seguridad de su información.
52425242
subheader: "¡Reclama miles de dólares a través de los créditos tributarios que te corresponden! Trabajamos contigo para obtener tu mayor reembolso."
5243-
subheader_offseason: "¡Regístrese para la próxima temporada de impuestos ahora! Le notificaremos tan pronto que nuestro servicio vuelva a abrir el 31 de enero a la 1pm EST."
5243+
subheader_offseason: "¡Regístrese para la próxima temporada de impuestos ahora! Le notificaremos tan pronto que nuestro servicio vuelva a abrir a finales de enero."
52445244
subheader_warning: Envía tu solicitud antes del %{tax_day} para evitar penalizaciones.
52455245
title: Ayuda gratuita para declarar sus impuestos ofrecida por voluntarios certificados por el IRS.
52465246
maybe_ineligible:

spec/services/multi_tenant_service_spec.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@
4545

4646
it "returns just the current year for ctc and valid filing years for gyr when using DateTime.now" do
4747
fake_time = Rails.configuration.tax_year_filing_seasons[2020][1] + 3.years - 1.day
48+
# this is May 16, 2024 in which the deadline has passes and thus should show 3 years of filing
4849
Timecop.freeze(fake_time) do
4950
expect(described_class.new(:ctc).filing_years).to eq [2023]
50-
expect(described_class.new(:gyr).filing_years).to eq [2023, 2022, 2021, 2020]
51+
expect(described_class.new(:gyr).filing_years).to eq [2023, 2022, 2021]
5152
end
5253
end
5354

@@ -66,19 +67,19 @@
6667
end
6768
end
6869

69-
context "GYR 2025 after tax deadline before end of in progress intake" do
70+
context "GYR 2025 after tax deadline but before end of login" do
7071
it "returns 2022, 2023, 2024" do
7172
fake_time = DateTime.parse("2025-06-23")
7273

7374
expect(described_class.new(:gyr).filing_years(fake_time)).to eq [2024, 2023, 2022]
7475
end
7576
end
7677

77-
context "GYR 2025 after end of in progress intake" do
78-
it "returns 2022, 2023, 2024" do
78+
context "GYR 2025 after end of login" do
79+
it "returns 2022, 2023, 2024 and 2025" do
7980
fake_time = DateTime.parse("2025-12-21")
8081

81-
expect(described_class.new(:gyr).filing_years(fake_time)).to eq [2024, 2023, 2022]
82+
expect(described_class.new(:gyr).filing_years(fake_time)).to eq [2025, 2024, 2023, 2022]
8283
end
8384
end
8485
end

0 commit comments

Comments
 (0)