Skip to content

Commit

Permalink
FYST 239 Update AZ State Credits to AZ Subtractons (#4677)
Browse files Browse the repository at this point in the history
  • Loading branch information
tahsinaislam authored Aug 5, 2024
1 parent 0c32f71 commit ab20b16
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module StateFile
module Questions
class AzStateCreditsController < QuestionsController
class AzSubtractionsController < QuestionsController
include ReturnToReviewConcern
def self.show?(intake)
wages_salaries_tips = intake.direct_file_data.fed_wages_salaries_tips
Expand All @@ -10,7 +10,7 @@ def self.show?(intake)
private

def form_params
params.require(:state_file_az_state_credits_form).permit(
params.require(:state_file_az_subtractions_form).permit(
[:armed_forces_member, :armed_forces_wages, :tribal_member, :tribal_wages]
)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module StateFile
class AzStateCreditsForm < QuestionsForm
class AzSubtractionsForm < QuestionsForm
set_attributes_for :intake, :tribal_member, :tribal_wages, :armed_forces_member, :armed_forces_wages

validates_numericality_of :tribal_wages, only_integer: true, message: :whole_number, if: -> { tribal_member == "yes" }
Expand Down
2 changes: 1 addition & 1 deletion app/lib/navigation/state_file_az_question_navigation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class StateFileAzQuestionNavigation < Navigation::StateFileBaseQuestionNavigatio
Navigation::NavigationStep.new(StateFile::Questions::AzPriorLastNamesController),
Navigation::NavigationStep.new(StateFile::Questions::W2Controller),
Navigation::NavigationStep.new(StateFile::Questions::UnemploymentController),
Navigation::NavigationStep.new(StateFile::Questions::AzStateCreditsController),
Navigation::NavigationStep.new(StateFile::Questions::AzSubtractionsController),
Navigation::NavigationStep.new(StateFile::Questions::AzCharitableContributionsController),
Navigation::NavigationStep.new(StateFile::Questions::AzExciseCreditController),
Navigation::NavigationStep.new(StateFile::Questions::AzPrimaryStateIdController),
Expand Down
2 changes: 1 addition & 1 deletion app/views/state_file/questions/az_review/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<p class="text--bold spacing-below-5"><%=t(".armed_forces_wages") %></p>
<p><%=number_to_currency(current_intake.armed_forces_wages) %></p>
<% end %>
<%= link_to t("general.edit"), StateFile::Questions::AzStateCreditsController.to_path_helper(return_to_review: "y"), class: "button--small" %>
<%= link_to t("general.edit"), StateFile::Questions::AzSubtractionsController.to_path_helper(return_to_review: "y"), class: "button--small" %>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2262,7 +2262,7 @@ en:
assistance_label: Did %{name} need assistance with daily living activities such as dressing, eating, taking medication, shopping, or preparing their food?
passed_away_label: Did %{name} pass away in 2023?
title: Please provide some more information about the people in your family who are 65 years of age or older.
az_state_credits:
az_subtractions:
edit:
armed_forces_member_label_html: You or your spouse are a member of the Reserves, the National Guard, or the U.S. Armed Forces <strong>and</strong> received pay for active duty military service.
armed_forces_wages_label:
Expand Down
2 changes: 1 addition & 1 deletion config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2223,7 +2223,7 @@ es:
assistance_label: "¿%{name} necesitó ayuda con actividades diarias como vestirse, comer, tomar medicamentos, hacer compras o preparar su comida?"
passed_away_label: "%{name}falleció en el 2023?"
title: Proporciónanos más información sobre las personas en tu familia que tienen 65 años o más.
az_state_credits:
az_subtractions:
edit:
armed_forces_member_label_html: Tú o tu cónyuge son miembros de las Reservas, la Guardia Nacional o las Fuerzas Armadas de los Estados Unidos <strong>y</strong> recibieron un salario por el servicio activo.
armed_forces_wages_label:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "rails_helper"

RSpec.describe StateFile::Questions::AzStateCreditsController do
RSpec.describe StateFile::Questions::AzSubtractionsController do
let(:intake) { create :state_file_az_intake }
before do
sign_in intake
Expand All @@ -13,7 +13,7 @@
it_behaves_like :return_to_review_concern do
let(:form_params) do
{
state_file_az_state_credits_form: {
state_file_az_subtractions_form: {
armed_forces_member: "yes",
armed_forces_wages: "100",
tribal_member: "yes",
Expand Down
10 changes: 5 additions & 5 deletions spec/features/state_file/complete_intake_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@
expect(page).to have_text(I18n.t('state_file.questions.unemployment.index.1099_label', name: StateFileAzIntake.last.primary.full_name))
click_on I18n.t("general.continue")

expect(page).to have_text I18n.t("state_file.questions.az_state_credits.edit.title.one", year: MultiTenantService.statefile.current_tax_year)
check "state_file_az_state_credits_form_tribal_member"
fill_in "state_file_az_state_credits_form_tribal_wages", with: "100"
check "state_file_az_state_credits_form_armed_forces_member"
fill_in "state_file_az_state_credits_form_armed_forces_wages", with: "100"
expect(page).to have_text I18n.t("state_file.questions.az_subtractions.edit.title.one", year: MultiTenantService.statefile.current_tax_year)
check "state_file_az_subtractions_form_tribal_member"
fill_in "state_file_az_subtractions_form_tribal_wages", with: "100"
check "state_file_az_subtractions_form_armed_forces_member"
fill_in "state_file_az_subtractions_form_armed_forces_wages", with: "100"
click_on I18n.t("general.continue")

expect(page).to have_text I18n.t("state_file.questions.az_charitable_contributions.edit.title.one", tax_year: MultiTenantService.statefile.current_tax_year)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "rails_helper"

RSpec.describe StateFile::AzStateCreditsForm do
RSpec.describe StateFile::AzSubtractionsForm do
describe "#valid?" do
let(:intake) { create :state_file_az_intake }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
StateFile::Questions::AzPriorLastNamesController,
StateFile::Questions::W2Controller,
StateFile::Questions::UnemploymentController,
StateFile::Questions::AzStateCreditsController,
StateFile::Questions::AzSubtractionsController,
StateFile::Questions::AzCharitableContributionsController,
StateFile::Questions::AzExciseCreditController,
StateFile::Questions::AzPrimaryStateIdController,
Expand Down
2 changes: 1 addition & 1 deletion spec/models/efile_error_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"az-review",
"az-senior-dependents",
"az-spouse-state-id",
"az-state-credits",
"az-subtractions",
"canceled-data-transfer",
"code-verified",
"contact-preference",
Expand Down

0 comments on commit ab20b16

Please sign in to comment.