Skip to content

Commit

Permalink
LG-10206 Move STEP_INDICATOR_STEP constants out of InPersonFlow (#11607)
Browse files Browse the repository at this point in the history
* LG-10206 Move STEP_INDICATOR_STEP constants out of InPersonFlow

changelog: Internal, In-person proofing, Move STEP_INDICATOR_STEP constants out of InPersonFlow
  • Loading branch information
jennyverdeyen authored Dec 18, 2024
1 parent 449c32b commit 2296d09
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
10 changes: 9 additions & 1 deletion app/controllers/concerns/idv/step_indicator_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,21 @@ module StepIndicatorConcern
{ name: :secure_account },
].freeze

STEP_INDICATOR_STEPS_IPP = [
{ name: :find_a_post_office },
{ name: :verify_info },
{ name: :verify_phone },
{ name: :re_enter_password },
{ name: :go_to_the_post_office },
].freeze

included do
helper_method :step_indicator_steps
end

def step_indicator_steps
if in_person_proofing?
Idv::Flows::InPersonFlow::STEP_INDICATOR_STEPS
Idv::StepIndicatorConcern::STEP_INDICATOR_STEPS_IPP
elsif gpo_address_verification?
Idv::StepIndicatorConcern::STEP_INDICATOR_STEPS_GPO
else
Expand Down
6 changes: 1 addition & 5 deletions app/controllers/idv/by_mail/request_letter_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@ def confirm_letter_sends_allowed
end

def step_indicator_steps
if in_person_proofing?
Idv::Flows::InPersonFlow::STEP_INDICATOR_STEPS_GPO
else
StepIndicatorConcern::STEP_INDICATOR_STEPS_GPO
end
StepIndicatorConcern::STEP_INDICATOR_STEPS_GPO
end
end
end
Expand Down
6 changes: 1 addition & 5 deletions app/controllers/idv/by_mail/resend_letter_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,7 @@ def pii_locked?
end

def step_indicator_steps
if in_person_proofing?
Idv::Flows::InPersonFlow::STEP_INDICATOR_STEPS_GPO
else
StepIndicatorConcern::STEP_INDICATOR_STEPS_GPO
end
StepIndicatorConcern::STEP_INDICATOR_STEPS_GPO
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/idv/in_person/address/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% content_for(:pre_flash_content) do %>
<%= render StepIndicatorComponent.new(
steps: Idv::Flows::InPersonFlow::STEP_INDICATOR_STEPS,
steps: Idv::StepIndicatorConcern::STEP_INDICATOR_STEPS_IPP,
current_step: :verify_info,
locale_scope: 'idv',
class: 'margin-x-neg-2 margin-top-neg-4 tablet:margin-x-neg-6 tablet:margin-top-neg-4',
Expand Down
2 changes: 1 addition & 1 deletion app/views/idv/in_person/state_id/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% content_for(:pre_flash_content) do %>
<%= render StepIndicatorComponent.new(
steps: Idv::Flows::InPersonFlow::STEP_INDICATOR_STEPS,
steps: Idv::StepIndicatorConcern::STEP_INDICATOR_STEPS_IPP,
current_step: :verify_info,
locale_scope: 'idv',
class: 'margin-x-neg-2 margin-top-neg-4 tablet:margin-x-neg-6 tablet:margin-top-neg-4',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
is_enhanced_ipp: is_enhanced_ipp,
)
end
let(:step_indicator_steps) { Idv::Flows::InPersonFlow::STEP_INDICATOR_STEPS }
let(:step_indicator_steps) { Idv::StepIndicatorConcern::STEP_INDICATOR_STEPS_IPP }
let(:sp_event_name) { 'IdV: user clicked sp link on ready to verify page' }
let(:help_event_name) { 'IdV: user clicked what to bring link on ready to verify page' }

Expand Down
2 changes: 1 addition & 1 deletion spec/views/idv/shared/ssn.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
:ssn_presenter,
Idv::SsnPresenter.new(
sp_name: sp_name, ssn_form: Idv::SsnFormatForm.new(nil),
step_indicator_steps: Idv::Flows::InPersonFlow::STEP_INDICATOR_STEPS
step_indicator_steps: Idv::StepIndicatorConcern::STEP_INDICATOR_STEPS
),
)
render template: 'idv/shared/ssn', locals: {
Expand Down

0 comments on commit 2296d09

Please sign in to comment.