-
Notifications
You must be signed in to change notification settings - Fork 115
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-13761: ProofingComponents to store real vendor used to verify document PII #11499
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ def self.step_info | |
idv_session.resolution_successful = nil | ||
idv_session.verify_info_step_document_capture_session_uuid = nil | ||
idv_session.threatmetrix_review_status = nil | ||
idv_session.source_check_vendor = nil | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have any specs for these undo_step things that need to be updated? Or do we just test this as a side effect of other tests There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As far as I can tell, we test undo state primarily as a side effect and only test defaults for individual classes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (I was waiting for the pipeline to complete to verify that assumption, so taking a look now) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, seems like undo step validation is primarily tested through feature specs. |
||
idv_session.applicant = nil | ||
end, | ||
) | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -33,7 +33,7 @@ def document_type | |||||
end | ||||||
|
||||||
def source_check | ||||||
Idp::Constants::Vendors::AAMVA if idv_session.verify_info_step_complete? | ||||||
idv_session.source_check_vendor | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need to tweak to account for the 50/50 state:
Suggested change
(you can probably come up with a better / more ruby-ish way to do ☝️ ) Basically, if the key is not in the session, we need to fall back to the old (bad) way There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed! |
||||||
end | ||||||
|
||||||
def resolution_check | ||||||
|
@@ -67,7 +67,6 @@ def to_h | |||||
address_check:, | ||||||
threatmetrix:, | ||||||
threatmetrix_review_status:, | ||||||
|
||||||
}.compact | ||||||
end | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,9 @@ module Vendors | |
MOCK = 'mock' | ||
USPS = 'usps' | ||
AAMVA = 'aamva' | ||
AAMVA_UNSUPPORTED_JURISDICTION = 'UnsupportedJurisdiction' | ||
STATE_ID_MOCK = 'StateIdMock' | ||
SOURCE_CHECK = [AAMVA, AAMVA_UNSUPPORTED_JURISDICTION, STATE_ID_MOCK].freeze | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (Possible bikeshedding) Is there a clearer name for this? I.e., Suggesting only in case you agree or have a better idea; I don't feel strongly at all here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was on the fence about what to call this, but I wanted the relationship between this and There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I went back and forth about asking for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Basically, |
||
end | ||
|
||
# US State and Territory codes are | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -396,18 +396,14 @@ | |
end | ||
|
||
context 'for an aamva request' do | ||
before do | ||
allow(controller).to receive(:load_async_state).and_return(async_state) | ||
end | ||
|
||
let(:document_capture_session) do | ||
DocumentCaptureSession.create(user:) | ||
end | ||
|
||
let(:success) { true } | ||
let(:errors) { {} } | ||
let(:exception) { nil } | ||
let(:vendor_name) { :aamva } | ||
let(:vendor_name) { 'aamva_placeholder' } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will not approve without emoji vendor name |
||
|
||
let(:async_state) do | ||
# Here we're trying to match the store to redis -> read from redis flow this data travels | ||
|
@@ -436,6 +432,10 @@ | |
document_capture_session.load_proofing_result | ||
end | ||
|
||
before do | ||
allow(controller).to receive(:load_async_state).and_return(async_state) | ||
end | ||
|
||
context 'when aamva processes the request normally' do | ||
it 'redirect to phone confirmation url' do | ||
put :show | ||
|
@@ -458,7 +458,12 @@ | |
|
||
event = @analytics.events['IdV: doc auth verify proofing results'].first | ||
state_id = event.dig(:proofing_results, :context, :stages, :state_id) | ||
expect(state_id).to match(a_hash_including(state_id_type: 'drivers_license')) | ||
expect(state_id).to match( | ||
hash_including( | ||
state_id_type: 'drivers_license', | ||
vendor_name: 'aamva_placeholder', | ||
), | ||
) | ||
end | ||
end | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A/N: I feel like these two methods could be merged into an
handle_success_updates_for_idv_session
method, but leaving as is for now.