Skip to content

Commit

Permalink
Modify the step-indicator page such that the "Re-enter password" step…
Browse files Browse the repository at this point in the history
… is not marked complete (#11625)

We received feedback from a partner that users may think that they are done with the identity verification workflow on the personal key page because all of the steps on the step indicator are marked complete. This commit modifies the step indicator on the personal key page so the "Re-enter password" step is not complete on that page.

Since there is not longer a case where all step indicator steps are complete this change also removes the `complete` status from the `StepIndicatorComponent`.

[skip changelog]
  • Loading branch information
jmhooper authored Dec 16, 2024
1 parent 02ddf47 commit ad8b9a9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 33 deletions.
4 changes: 0 additions & 4 deletions app/components/step_indicator_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
11 changes: 7 additions & 4 deletions app/controllers/idv/personal_key_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 0 additions & 23 deletions spec/components/step_indicator_component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions spec/features/idv/end_to_end_idv_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,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)
Expand Down

0 comments on commit ad8b9a9

Please sign in to comment.