-
Notifications
You must be signed in to change notification settings - Fork 166
LG-14958 #11746
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-14958 #11746
Changes from all commits
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 |
|---|---|---|
|
|
@@ -10,7 +10,6 @@ import { UploadFormEntriesError } from '../services/upload'; | |
| import SelfieStep from './selfie-step'; | ||
| import DocumentsStep from './documents-step'; | ||
| import InPersonPrepareStep from './in-person-prepare-step'; | ||
| import InPersonLocationPostOfficeSearchStep from './in-person-location-post-office-search-step'; | ||
| import InPersonLocationFullAddressEntryPostOfficeSearchStep from './in-person-location-full-address-entry-post-office-search-step'; | ||
| import InPersonSwitchBackStep from './in-person-switch-back-step'; | ||
| import ReviewIssuesStep from './review-issues-step'; | ||
|
|
@@ -39,22 +38,16 @@ function DocumentCapture({ onStepChange = () => {} }: DocumentCaptureProps) { | |
| const { flowPath } = useContext(UploadContext); | ||
| const { trackSubmitEvent, trackVisitEvent } = useContext(AnalyticsContext); | ||
| const { isSelfieCaptureEnabled } = useContext(SelfieCaptureContext); | ||
| const { | ||
| inPersonFullAddressEntryEnabled, | ||
| inPersonURL, | ||
| skipDocAuthFromHandoff, | ||
| skipDocAuthFromHowToVerify, | ||
| } = useContext(InPersonContext); | ||
| const { inPersonURL, skipDocAuthFromHandoff, skipDocAuthFromHowToVerify } = | ||
| useContext(InPersonContext); | ||
| useDidUpdateEffect(onStepChange, [stepName]); | ||
| useEffect(() => { | ||
| if (stepName) { | ||
| trackVisitEvent(stepName); | ||
| } | ||
| }, [stepName]); | ||
| const appName = getConfigValue('appName'); | ||
| const inPersonLocationPostOfficeSearchForm = inPersonFullAddressEntryEnabled | ||
| ? InPersonLocationFullAddressEntryPostOfficeSearchStep | ||
| : InPersonLocationPostOfficeSearchStep; | ||
| const inPersonLocationPostOfficeSearchForm = InPersonLocationFullAddressEntryPostOfficeSearchStep; | ||
|
Contributor
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 only see the variable |
||
|
|
||
| // Define different states to be used in human readable array declaration | ||
| const documentFormStep: FormStep = { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -393,13 +393,9 @@ | |
| end | ||
| end | ||
|
|
||
| context 'when full form address entry is enabled for post office search' do | ||
| context 'when full form address post office search' do | ||
|
Contributor
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. Nit: This could probably be condensed into just an it statement.
Contributor
Author
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. Oh like we can remove the wrapping context? Wasn't sure if it was helpful due to the user creation line directly under it, but I guess there aren't any other it blocks that would use that so removing is probably a good idea. Ill be in here again once the form is simplified to zip. Should add to that ticket to make sure test structure is as simple as possible? Or just simplify it now?
Contributor
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. To me, the context block felt unnecessary because the user will always be using full form address post office search. I would see the value if we had another option enabled, like searching by zip code, but that's not the app's current state. I also think simplifying this to an it statement felt consistent with the top of the file, which uses it statements for conditions that I'd always expect to be true. For example, in the same way that we expect the app to always allow the user to cancel and start over from the beginning, we expect the app to always allow the user to search by full address. Does that make sense? The it block I used as an example creates the
Contributor
Author
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. Definitely makes sense! I think ill keep it in there for this PR but it will probably change across the next couple PRs that deal more directly with zip stuff and code removal. I agree with your thinking for sure! |
||
| let(:user) { user_with_2fa } | ||
|
|
||
| before do | ||
| allow(IdentityConfig.store).to receive(:in_person_full_address_entry_enabled).and_return(true) | ||
| end | ||
|
|
||
| it 'allows the user to search by full address', allow_browser_log: true do | ||
| sign_in_and_2fa_user(user) | ||
| begin_in_person_proofing(user) | ||
|
|
||
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.
This is the only place that the component is used, can we remove the file at
in-person-location-post-office-search-step.tsx?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.
There is another ticket for actually removing the old code, so that will be deleted next!