Skip to content
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
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 @@ -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)
Expand Down