-
Notifications
You must be signed in to change notification settings - Fork 116
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
Changing address verification step to a form instead of buttons #1781
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
b24fc40
First pass at new confirm index
tbaxter-18f e9055d0
2112-wip-tests-not-working
tbaxter-18f 0d83644
Radio-button based address verification
tbaxter-18f 4cd765a
Pre-review cleanup
tbaxter-18f d64953f
More pre-review cleanup
tbaxter-18f 109f120
More pre-review cleanup
tbaxter-18f dccb515
Review cleaning
tbaxter-18f 351ad5d
Resolving package.json conflicts
tbaxter-18f c5dd4c2
Resolving package.json conflicts
tbaxter-18f 92b9f8f
Resolving package.json conflicts
tbaxter-18f 9d5f42d
More conflict resolution
tbaxter-18f 6782af9
Delinting
tbaxter-18f 92ced48
Delinting
tbaxter-18f 72e6f3f
Delinting
tbaxter-18f a3514b1
Delinting
tbaxter-18f 2e313f5
Trailing whitespace is my nemesis
tbaxter-18f e1f77f2
Preselected radio choice
tbaxter-18f d689b0c
Merge branch 'master' into tcb-2112-address-verification
tbaxter-18f 7fb4d2c
Merge branch 'master' into tcb-2112-address-verification
tbaxter-18f 0bc49bd
YML normalization fix
tbaxter-18f File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module Idv | ||
class AddressDeliveryMethodForm | ||
attr_accessor :address_delivery_method | ||
|
||
def submit(address_delivery_method: '') | ||
self.address_delivery_method = address_delivery_method | ||
|
||
FormResponse.new(success: valid_address_delivery_method?, errors: {}) | ||
end | ||
|
||
private | ||
|
||
def valid_address_delivery_method? | ||
%w[phone usps].include? address_delivery_method | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +0,0 @@ | ||
input { | ||
file { | ||
path => "path_to_repo/log/events.log" | ||
} | ||
} | ||
output { | ||
elasticsearch { hosts => ["localhost:9200"] } | ||
stdout { codec => rubydebug } | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
require 'rails_helper' | ||
|
||
describe Idv::AddressDeliveryMethodForm do | ||
subject { Idv::AddressDeliveryMethodForm.new } | ||
|
||
describe '#submit' do | ||
context 'when delivery method is phone' do | ||
it 'submits without error' do | ||
response = subject.submit(address_delivery_method: 'phone') | ||
|
||
expect(response).to be_a(FormResponse) | ||
expect(response.success?).to eq(true) | ||
end | ||
end | ||
|
||
context 'when delivery method is usps' do | ||
it 'submits without error' do | ||
response = subject.submit(address_delivery_method: 'usps') | ||
|
||
expect(response).to be_a(FormResponse) | ||
expect(response.success?).to eq(true) | ||
end | ||
end | ||
|
||
context 'when delivery method is invalid' do | ||
it 'submits with error' do | ||
response = subject.submit(address_delivery_method: 'nonsense') | ||
|
||
expect(response).to be_a(FormResponse) | ||
expect(response.success?).to eq(false) | ||
end | ||
end | ||
|
||
context 'when delivery method is blank' do | ||
it 'submits with error' do | ||
response = subject.submit(address_delivery_method: '') | ||
|
||
expect(response).to be_a(FormResponse) | ||
expect(response.success?).to eq(false) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ | |
expect(current_path).to eq verify_session_result_path | ||
end | ||
|
||
scenario 'fincance shows failure flash message after max attempts', :email do | ||
scenario 'finance shows failure flash message after max attempts', :email do | ||
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. nice |
||
visit_idp_from_sp_with_loa3(sp) | ||
register_user | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
same comment on comments 🙂
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.
I think we should keep it here, because the click handler is a bit unique. There are multiple elements within the label, and clicking the label itself is the only thing that matches how the CSS is actually setting the hidden input to true. Since it's both not immediately clear and a relatively unfamiliar pattern, I think it's worth commenting.
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.
Having a slack conversation about giving the user an error if nothing is chosen: https://gsa-tts.slack.com/archives/C0NGESUN5/p1511195802000213
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.
@tbaxter-18f and I just chatted offline and decided that verification via text should be pre-selected as the vast majority of folks will want to choose that. That eliminates the need to provide an error if nothing is selected.