Skip to content

Commit 7a62f01

Browse files
committed
GYR1-834 Add claiming question
1 parent 7059f67 commit 7a62f01

File tree

10 files changed

+51
-1
lines changed

10 files changed

+51
-1
lines changed
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module Questions
2+
class ClaimingController < QuestionsController
3+
include AuthenticatedClientConcern
4+
5+
layout "yes_no_question"
6+
7+
def method_name
8+
"claimed_by_another"
9+
end
10+
end
11+
end

app/forms/claiming_form.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class ClaimingForm < QuestionsForm
2+
set_attributes_for :intake, :claimed_by_another
3+
4+
def save
5+
@intake.update(attributes_for(:intake))
6+
end
7+
end

app/lib/navigation/gyr_question_navigation.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ class GyrQuestionNavigation
5858
# Filing status
5959
Questions::FilingJointController,
6060

61+
# Claiming
62+
Questions::ClaimingController,
63+
6164
# Alimony
6265
Questions::ReceivedAlimonyController,
6366
Questions::PaidAlimonyController,

app/views/hub/clients/edit_13614c_form_page1.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
</div>
132132
</div>
133133
<div class="hub-form__row">
134-
<span style="background-color: #e5e5e5; margin-bottom: 20px;"><%= f.cfa_select(:claimed_by_another, t(".fields.claimed_by_another"), yes_no_options_for_select) %></span>
134+
<%= f.cfa_select(:claimed_by_another, t(".fields.claimed_by_another"), yes_no_options_for_select) %>
135135
</div>
136136

137137
<div id="marital-status-fields">
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<% content_for :form_question, t("views.questions.claiming.title", :count => current_intake.filer_count) %>
2+
<% content_for :form_help_text, t("views.questions.claiming.body", :count => current_intake.filer_count) %>

config/locales/en.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5551,6 +5551,13 @@ en:
55515551
partner_info: Our team at %{partner_name} is here to help you file again.
55525552
title: Welcome back %{name}!
55535553
title: Our team at %{partner_name} is here to help!
5554+
claiming:
5555+
body:
5556+
one: Answer yes if you could be claimed as a dependent.
5557+
other: Answer yes if you or your spouse could be claimed as a dependent.
5558+
title:
5559+
one: Can anyone else claim you on their tax return?
5560+
other: Can anyone else claim you or your spouse on their tax return?
55545561
consent:
55555562
birth_date: Date of birth
55565563
cta: I agree

config/locales/es.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5536,6 +5536,13 @@ es:
55365536
partner_info: De nuevo, nuestro equipo en %{partner_name}está aquí para ayudarle a presentar su declaración.
55375537
title: "¡Bienvenido de nuevo %{name}!"
55385538
title: "¡Nuestro equipo en %{partner_name} está aquí para ayudar!"
5539+
claiming:
5540+
body:
5541+
one: Responda ‘sí’ si puede ser reclamado como dependiente.
5542+
other: Responda “Sí” si es posible que a usted o a su cónyuge los incluyan como dependientes.
5543+
title:
5544+
one: "¿Puede alguien más reclamarlo a usted en su declaración de impuestos?"
5545+
other: "¿Alguien podría incluirlo a usted o a su cónyuge en su declaración de impuestos?"
55395546
consent:
55405547
birth_date: Fecha de nacimiento
55415548
cta: Estoy de acuerdo

spec/features/web_intake/new_joint_filers_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,12 @@ def intake_up_to_documents(backtax_year_offsets: [0, 2])
273273
click_on "Yes"
274274
end
275275

276+
page_change_block do
277+
# Claimed status
278+
expect(page).to have_css("h1", text: "Can anyone else claim you on their tax return?")
279+
click_on "No"
280+
end
281+
276282
page_change_block do
277283
# Alimony
278284
screenshot_after do

spec/features/web_intake/new_single_filer_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,12 @@ def intake_after_triage_up_to_documents(intake)
184184
click_on "No"
185185
end
186186

187+
page_change_block do
188+
# Claimed status
189+
expect(page).to have_css("h1", text: "Can anyone else claim you on their tax return?")
190+
click_on "No"
191+
end
192+
187193
page_change_block do
188194
# Dependents
189195
page_change_check(I18n.t("views.questions.had_dependents.title", year: intake.most_recent_filing_year, count: intake.filer_count ))

0 commit comments

Comments
 (0)