Skip to content
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

LG-13657 Remove IPP FSM - set controller feature flag in test and update tests #11217

Merged
merged 3 commits into from
Sep 16, 2024
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
1 change: 1 addition & 0 deletions config/application.yml.default
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ test:
hmac_fingerprinter_key: a2c813d4dca919340866ba58063e4072adc459b767a74cf2666d5c1eef3861db26708e7437abde1755eb24f4034386b0fea1850a1cb7e56bff8fae3cc6ade96c
hmac_fingerprinter_key_queue: '["old-key-one", "old-key-two"]'
identity_pki_disabled: true
in_person_state_id_controller_enabled: true
lexisnexis_trueid_account_id: 'test_account'
Copy link
Contributor

@gina-yamada gina-yamada Sep 11, 2024

Choose a reason for hiding this comment

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

Good read:- Lifecycle of a feature flag - I think we should have set default but this has been in development so long that I don't think that would have been a good idea so point this out for future Joy. (I know you were not here when this was started.)

lockout_period_in_minutes: 5
logins_per_email_and_ip_limit: 2
Expand Down
5 changes: 5 additions & 0 deletions spec/controllers/idv/in_person/address_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
end

context 'in_person_state_id_controller_enabled is not enabled' do
before do
allow(IdentityConfig.store).to receive(:in_person_state_id_controller_enabled).
and_return(false)
end

gina-yamada marked this conversation as resolved.
Show resolved Hide resolved
it 'redirects to state id page if not complete' do
subject.user_session['idv/in_person'][:pii_from_user].delete(:identity_doc_address1)
get :show
Expand Down
4 changes: 2 additions & 2 deletions spec/controllers/idv/in_person_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
it 'redirects to the first step' do
get :index

expect(response).to redirect_to idv_in_person_step_url(step: :state_id)
expect(response).to redirect_to idv_in_person_proofing_state_id_path
end

it 'has non-nil presenter' do
Expand All @@ -82,7 +82,7 @@
it 'redirects to the first step' do
get :index

expect(response).to redirect_to idv_in_person_step_url(step: :state_id)
expect(response).to redirect_to idv_in_person_proofing_state_id_path
end
end
gina-yamada marked this conversation as resolved.
Show resolved Hide resolved
end
Expand Down
4 changes: 2 additions & 2 deletions spec/features/idv/analytics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -509,10 +509,10 @@
flow_path: 'standard', opted_in_to_in_person_proofing: false
},
'IdV: in person proofing state_id visited' => {
step: 'state_id', flow_path: 'standard', step_count: 1, analytics_id: 'In Person Proofing'
step: 'state_id', flow_path: 'standard', analytics_id: 'In Person Proofing'
},
'IdV: in person proofing state_id submitted' => {
success: true, flow_path: 'standard', step: 'state_id', step_count: 1, analytics_id: 'In Person Proofing', errors: {}, same_address_as_id: false, birth_year: '1938', document_zip_code: '12345'
success: true, flow_path: 'standard', step: 'state_id', analytics_id: 'In Person Proofing', errors: {}, same_address_as_id: false, birth_year: '1938', document_zip_code: '12345'
},
'IdV: in person proofing address visited' => {
step: 'address', flow_path: 'standard', analytics_id: 'In Person Proofing', same_address_as_id: false
Expand Down
15 changes: 9 additions & 6 deletions spec/features/idv/in_person_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

before do
allow(IdentityConfig.store).to receive(:in_person_proofing_enabled).and_return(true)
allow(IdentityConfig.store).to receive(:in_person_state_id_controller_enabled).and_return(true)
end

it 'works for a happy path', allow_browser_log: true do
Expand Down Expand Up @@ -38,7 +39,7 @@
),
),
)
complete_state_id_step(user)
complete_state_id_controller(user)

# ssn page
expect_in_person_step_indicator_current_step(t('step_indicator.flows.idv.verify_info'))
Expand Down Expand Up @@ -290,7 +291,7 @@
end

it 'shows the address page' do
complete_state_id_step(user, same_address_as_id: false)
complete_state_id_controller(user, same_address_as_id: false)
gina-yamada marked this conversation as resolved.
Show resolved Hide resolved
expect_in_person_step_indicator_current_step(t('step_indicator.flows.idv.verify_info'))
expect(page).to have_content(t('in_person_proofing.headings.address'))

Expand All @@ -303,7 +304,7 @@
end

it 'can update the address page form' do
complete_state_id_step(user, same_address_as_id: false)
complete_state_id_controller(user, same_address_as_id: false)
complete_address_step(user, same_address_as_id: false)
complete_ssn_step(user)
# click update address link on the verify page
Expand All @@ -328,7 +329,7 @@
end

it 'allows user to update their residential address as different from their state id' do
complete_state_id_step(user, same_address_as_id: true)
complete_state_id_controller(user, same_address_as_id: true)
# skip address step b/c residential address is same as state id address
complete_ssn_step(user)

Expand Down Expand Up @@ -367,6 +368,8 @@

before do
allow(IdentityConfig.store).to receive(:in_person_outage_message_enabled).and_return(true)
allow(IdentityConfig.store).to receive(:in_person_state_id_controller_enabled).
and_return(true)
end

it 'allows the user to generate a barcode despite outage', allow_browser_log: true do
Expand Down Expand Up @@ -410,7 +413,7 @@
complete_location_step

# state ID page
complete_state_id_step(user, same_address_as_id: false)
complete_state_id_controller(user, same_address_as_id: false)

# address page
complete_address_step(user, same_address_as_id: false)
Expand Down Expand Up @@ -506,7 +509,7 @@
complete_prepare_step(user)
complete_location_step
# Causes the schedule USPS enrollment request to throw a bad request error
complete_state_id_step(user, first_name: 'usps client error')
complete_state_id_controller(user, first_name: 'usps client error')
complete_ssn_step(user)
complete_verify_step(user)
fill_out_phone_form_ok(MfaContext.new(user).phone_configurations.first.phone)
Expand Down
4 changes: 2 additions & 2 deletions spec/features/idv/in_person_threatmetrix_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def deactivate_profile_update_enrollment(status:)
complete_location_step(user)

# state ID page
complete_state_id_step(user)
complete_state_id_controller(user)

# ssn page
complete_ssn_step(user, 'Reject')
Expand Down Expand Up @@ -170,7 +170,7 @@ def deactivate_profile_update_enrollment(status:)
begin_in_person_proofing(user)
complete_prepare_step(user)
complete_location_step
complete_state_id_step(user)
complete_state_id_controller(user)

# ssn page
complete_ssn_step(user, tmx_status)
Expand Down
Loading