diff --git a/app/components/step_indicator_component.rb b/app/components/step_indicator_component.rb index 72e64dae105..c3e4fabd79f 100644 --- a/app/components/step_indicator_component.rb +++ b/app/components/step_indicator_component.rb @@ -3,8 +3,6 @@ class StepIndicatorComponent < BaseComponent attr_reader :current_step, :locale_scope, :tag_options - ALL_STEPS_COMPLETE = :all_steps_complete - def initialize(steps:, current_step:, locale_scope: nil, **tag_options) @steps = steps @current_step = current_step @@ -23,8 +21,6 @@ def steps private def step_status(step) - return :complete if current_step == ALL_STEPS_COMPLETE - if step[:name] == current_step :current elsif step_index(step[:name]) < step_index(current_step) diff --git a/app/controllers/idv/personal_key_controller.rb b/app/controllers/idv/personal_key_controller.rb index 8599d8291b8..31933e2955e 100644 --- a/app/controllers/idv/personal_key_controller.rb +++ b/app/controllers/idv/personal_key_controller.rb @@ -129,10 +129,13 @@ def redirect_to_retrieve_pii end def step_indicator_step - return :secure_account if idv_session.verify_by_mail? - return :go_to_the_post_office if in_person_proofing? - - StepIndicatorComponent::ALL_STEPS_COMPLETE + if gpo_address_verification? + :secure_account + elsif in_person_proofing? + :go_to_the_post_office + else + :re_enter_password + end end helper_method :step_indicator_step end diff --git a/spec/components/step_indicator_component_spec.rb b/spec/components/step_indicator_component_spec.rb index 34dbd9e3947..bde0dd203d3 100644 --- a/spec/components/step_indicator_component_spec.rb +++ b/spec/components/step_indicator_component_spec.rb @@ -115,29 +115,6 @@ ) end end - - context 'all steps complete' do - let(:current_step) { StepIndicatorComponent::ALL_STEPS_COMPLETE } - - it 'renders current step' do - expect(rendered).not_to have_css('.step-indicator__step--current') - end - - it 'renders all steps completed' do - expect(rendered).to have_css( - '.step-indicator__step--complete', - text: t('step_indicator.flows.example.one'), - ) - expect(rendered).to have_css( - '.step-indicator__step--complete', - text: t('step_indicator.flows.example.two'), - ) - expect(rendered).to have_css( - '.step-indicator__step--complete', - text: t('step_indicator.flows.example.three'), - ) - end - end end describe 'locale_scope' do diff --git a/spec/features/idv/end_to_end_idv_spec.rb b/spec/features/idv/end_to_end_idv_spec.rb index 505e181763e..0dea1bc6438 100644 --- a/spec/features/idv/end_to_end_idv_spec.rb +++ b/spec/features/idv/end_to_end_idv_spec.rb @@ -365,10 +365,9 @@ def validate_personal_key_page text: t('step_indicator.flows.idv.verify_phone'), ) expect(page).to have_css( - '.step-indicator__step--complete', + '.step-indicator__step--current', text: t('step_indicator.flows.idv.re_enter_password'), ) - expect(page).not_to have_css('.step-indicator__step--current') expect(page).not_to have_content(t('step_indicator.flows.idv.verify_address')) # Refreshing shows same page (BUT with new personal key, we should warn the user)