Skip to content

LG-9139: Support double address verification on address page#8041

Merged
eileen-nava merged 12 commits intomainfrom
em/9139-dav-address-page
Mar 24, 2023
Merged

LG-9139: Support double address verification on address page#8041
eileen-nava merged 12 commits intomainfrom
em/9139-dav-address-page

Conversation

@eileen-nava
Copy link
Contributor

@eileen-nava eileen-nava commented Mar 21, 2023

🎫 Ticket

LG-9139: Updates to Address page for Double Address Verification

🛠 Summary of changes

For all users...

  • Display the heading "Enter your current residential address"
  • Display beginning implementation of hint text for Puerto Rico users covered by LG-9200 (out of scope)

When the feature flag is true....

  • Remove descriptive text at the top of the page
  • Relocate state dropdown to the top of the page
  • Remove the radio button yes/no question from the page's bottom
  • Remove the "optional" text from Address line 2 (but field remains optional)
  • Submit a new logging event: "IdV: in person proofing residential_address submitted"

Note about technical changes:

  • This PR allows the analytics event functions to be sourced from BaseStep instances in addition to the singleton methods on the classes. This supports validation based on user attributes, and one of the included feature tests will fail if the validation is instead added/removed statically.

📜 Testing Plan

High-level steps

  • Run automated tests
  • Compare the updated address page to the designs
  • Check translations
  • Confirm users can still proceed through the flow when the feature flag is off

Detailed testing steps

Feature Flag - Off

  • Disable feature flag in_person_capture_secondary_id_enabled
  • Complete flow up to and including selecting a location
  • Enable feature flag in_person_capture_secondary_id_enabled
  • Continue to address page
  • Verify that address page looks similar to original
    • Header is updated
    • Explanatory text is present under header
    • Question about address matching state ID is present above "Continue" button
  • Verify that address form can be submitted & displays properly on "verify" page
  • Verify that page to update address is similar to original & properly updates the "verify" page
    • Header is updated
    • Explanatory text is present under header
    • Question about address matching state ID is present above "Continue" button

Feature Flag - On

  • Enable feature flag in_person_capture_secondary_id_enabled
  • Complete flow up to and including selecting a location
  • Disable feature flag in_person_capture_secondary_id_enabled
  • Continue to residential address page
  • Verify that residential address page looks different from original
    • Header is updated
    • Explanatory text is absent
    • Question about address matching state ID is absent
  • Verify that residential address form can be submitted & displays properly on "verify" page
  • Verify that page to update residential address differs from original & properly updates the "verify" page
    • Header is updated
    • Explanatory text is absent
    • Question about address matching state ID is absent

👀 Screenshots

If relevant, include a screenshot or screen capture of the changes.

English: Screen Shot 2023-03-21 at 4 30 48 PM
Spanish: Screen Shot 2023-03-21 at 4 31 08 PM
French: Screen Shot 2023-03-21 at 4 31 24 PM

@eileen-nava eileen-nava requested review from a team, kellular and racingspider and removed request for a team March 21, 2023 20:33

def call
Idv::InPerson::AddressForm::ATTRIBUTES.each do |attr|
if attr == :same_address_as_id && IdentityConfig.store.
Copy link
Contributor

Choose a reason for hiding this comment

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

checking my understanding - here we're saying if the current residential address is the same as the one on the user's id don't get attributes from flow_params

Copy link
Contributor

Choose a reason for hiding this comment

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

No, we're choosing whether to assign the same_address_as_id field to the session here based on the feature flag. #call here is accepting data from the address form submission.

@NavaTim
Copy link
Contributor

NavaTim commented Mar 21, 2023

I reran the failed spec to make sure, and the same test failed twice. The failed test suggests that this PR may have introduced a regression or test issue related to analytics.

search_for_post_office

# location page
location = page.find_all('.location-collection-item')[1]
Copy link
Contributor

Choose a reason for hiding this comment

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

test is failing here

Copy link
Contributor

Choose a reason for hiding this comment

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

Test has been updated to use a more stable version of this step.

Copy link

@kellular kellular left a comment

Choose a reason for hiding this comment

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

LGTM Eileen!

increment_step_name_counts
analytics.public_send(
flow.step_handler(step).analytics_submitted_event,
flow.step_handler_instance(step).analytics_submitted_event,
Copy link
Contributor

@svalexander svalexander Mar 23, 2023

Choose a reason for hiding this comment

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

we should probably add a ticket to revisit this when the flow state machine is removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. 👍🏻

Copy link
Contributor

@svalexander svalexander left a comment

Choose a reason for hiding this comment

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

LGTM. There was a failing test ( didn't seem related to these changes though) but when I re-ran it all the specs passed.

@NavaTim NavaTim requested a review from jmhooper March 23, 2023 18:37

attr_accessor(*ATTRIBUTES)

attr_reader :capture_secondary_id_enabled
Copy link
Contributor

Choose a reason for hiding this comment

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

WDYT of removing this and making a nice ? method instead?

Suggested change
attr_reader :capture_secondary_id_enabled
def capture_secondary_id_enabled?
@capture_secondary_id_enabled
end

Copy link
Contributor

Choose a reason for hiding this comment

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

Alternatively, we use this pattern in a few places to achieve the same effect:

attr_reader :user_fully_authenticated
alias_method :user_fully_authenticated?, :user_fully_authenticated

increment_step_name_counts
analytics.public_send(
flow.step_handler(step).analytics_submitted_event,
flow.step_handler_instance(step).analytics_submitted_event,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. 👍🏻

before do
allow(IdentityConfig.store).to receive(:in_person_proofing_enabled).and_return(true)
allow(IdentityConfig.store).to receive(:in_person_proofing_enabled).and_return(false)
allow(IdentityConfig.store).to receive(:in_person_capture_secondary_id_enabled).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for catching this! 🙏🏻

@eileen-nava eileen-nava merged commit 7e7b99f into main Mar 24, 2023
@eileen-nava eileen-nava deleted the em/9139-dav-address-page branch March 24, 2023 21:19
@aduth aduth mentioned this pull request Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants