Skip to content

LG-10206 Move STEP_INDICATOR_STEP constants out of InPersonFlow #11607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏🏻 Thanks for investigating this after our slack conversation.

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?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was probably just missed in the IPP GPO removal, I did some manual testing and this condition should never be true. There is no longer a need for IPP GPO steps so I updated this block.

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