-
Notifications
You must be signed in to change notification settings - Fork 120
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-15321: relax vendor redirect in test mode #11677
base: main
Are you sure you want to change the base?
LG-15321: relax vendor redirect in test mode #11677
Conversation
[skip changelog]
25e5476
to
66cdf8c
Compare
…h_redirect_to_correct_vendor_disabled
…h_redirect_to_correct_vendor_disabled in specs
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 few comments on the specs, but in testing, the flag works as expected.
Note the Testing Plan
tests the behavior if the redirect is NOT disabled. Approving per the AC in the Jira ticket.
.to receive(:doc_auth_redirect_to_correct_vendor_disabled).and_return(true) | ||
end | ||
|
||
it 'redirects to the Socure controller' do |
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.
it 'redirects to the Socure controller' do | |
it 'allows the user to use this controller' do |
@@ -211,6 +211,23 @@ | |||
expect(document_capture_session.socure_docv_transaction_token) | |||
.to eq(docv_transaction_token) | |||
end | |||
|
|||
context 'when we try to use this controller but we should be using the LN/mock version' do |
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.
Can we add the test where the redirect to correct vendor is enabled, similar to the LN/mock test?
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.
spec added to this context .. thanks @solipet 👍🏿
# Confirm that we end up on the Socure page even if we try to | ||
# go to the LN / Mock one. | ||
visit idv_document_capture_url | ||
expect(page).to have_current_path(idv_socure_document_capture_url) |
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.
While this does test the redirect logic and avoids the cost of another run through the feature spec, it seems somewhat buried/hidden when included in
it 'does not track state if state tracking is disabled' do
...
I guess we don't really have a test that is specific to the generic happy path?
# Confirm that we end up on the Socure page even if we try to | ||
# go to the LN / Mock one. | ||
visit idv_hybrid_mobile_document_capture_url |
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.
🤦 - nice catch!
The testing plan has been updated ... thanks @solipet 🙏🏿 |
🎫 Ticket
LG-15321
🛠 Summary of changes
Use a flag to disable redirect_to_correct_vendor filter.
📜 Testing Plan
When redirect_to_correct_vendor is enforced
doc_auth_redirect_to_correct_vendor_disabled
to false in application.ymlWhen redirect_to_correct_vendor is relaxed
doc_auth_redirect_to_correct_vendor_disabled
to true in application.yml