Skip to content
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

Setup "Connect bank account" workspace flow #5703

Merged
merged 31 commits into from
Oct 8, 2021

Conversation

marcaaron
Copy link
Contributor

@marcaaron marcaaron commented Oct 6, 2021

Details

There's a lot of cleanup that needs to happen here (translation / style issues) + still waiting for assets but mostly done.

Fixed Issues

$ #5697
$ #5168
$ #5707

Tests

  1. Sign out of both New and Old Expensify
  2. Create a new account + workspace
  3. Navigate to the workspace
  4. Tap "Connect bank account"
  5. Verify you see this view
    2021-10-07_07-02-59
  6. Select "Connect manually"
  7. Close the view by pressing the x here
    2021-10-06_13-49-11
  8. Navigate to the workspace again
  9. Tap "Connect bank account"
  10. Verify you land on the "Connect manually" screen
  11. Verify the account add method memory also works for the "Connect online with Plaid" option
  12. Connect with Plaid using the test credentials bank: chase, user: user_good, pass: pass_good
  13. Select Plaid savings account from the drop down
  14. Begin filling out the form so that you end up with an OPEN bank account
  15. Stop after the "Company Information" step and close out the flow
  16. Reopen and verify you see this screen
    2021-10-07_07-01-54
  17. Press "Continue with setup" and verify you are brought back to the next step you need to complete ("Personal Information")
  18. Continue forward and complete the "Personal Information" step and exit the flow again
  19. Reopen the flow again and press "Continue with setup" - verify you are brought back to the next step you need to complete ("Additional Information")
  20. Fill out the "Additional information" step and continue
  21. Verify you see this screen
    2021-10-07_07-25-06
  22. Verify that tapping "Chat with Concierge" opens up the chat with Concierge
  23. Add a secondary login with a non public domain + enable Expensify cards
  24. Return to the "Connect bank account" flow
  25. Verify you now see this view
    2021-10-07_07-40-51

Repeat flow with new account and test VERIFYING account

  1. Complete the flow and stop after the company info step
  2. Close the modal
  3. Reopen and verify "Continue with setup" screen appears
  4. Verify you are brought back to the "Personal Information" step
  5. Fill out this step
  6. Verify Onfido step appears and close the modal
  7. Verify that when the flow is reopened we are still on the "Personal Information" step
  8. Pass Onfido flow by entering information and submitting
  9. Once on the "Additional Information" step close out of the flow
  10. Reopen and verify you are brought back to the "Additional Information" step
  11. Go through this step and verify you see this screen
    2021-10-07_07-58-17
  12. Tap "Yes, let's chat" and verify you are brought to the Concierge chat
  13. Have ops verify this account and get the 3 validation amounts to input
  14. Return to the flow again and enter the 3 amounts
  15. Verify you end up on this screen (or possibly the variant with cards? I won't be trying to get the cards provisioned on dev rn sorry - if this was with a non public domain it should have auto-provisioned)
    2021-10-07_08-05-04

QA Steps

Internal QA

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Mobile Web

Desktop

iOS

Android

@marcaaron marcaaron self-assigned this Oct 6, 2021
};

const WorkspaceBankAccountPage = (props) => {
// If we have no bank account in setup then we will immediately redirect the user to /bank-account to begin setup
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe worth noting that I am not trying to fetch the bank account here. If it doesn't exist in Onyx we'll just fetch it when we redirect instead of showing you this "Almost done" page. IMO this is fine because if you were setting up the account and are still logged in should still be in Onyx.

The reason I'm doing it this way is because fetching the bank account will trigger an immediate redirect to the step. And in this case we don't want to redirect we just need to know if the account exists.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Another alternative would be to just fetch the bank account twice but add a param to not redirect.

Copy link
Contributor Author

@marcaaron marcaaron Oct 6, 2021

Choose a reason for hiding this comment

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

And yet another would be to just check if this user has a expensify_freePlanBankAccountID NVP without fetching the rest of the data we need.

@@ -64,7 +64,7 @@ function goToWithdrawalAccountSetupStep(stepID, achData) {
if (!newACHData.useOnfido && stepID === CONST.BANK_ACCOUNT.STEP.REQUESTOR) {
delete newACHData.questions;
delete newACHData.answers;
if (lodashHas(achData, CONST.BANK_ACCOUNT.VERIFICATIONS.EXTERNAL_API_RESPONSES)) {
if (lodashHas(newACHData, CONST.BANK_ACCOUNT.VERIFICATIONS.EXTERNAL_API_RESPONSES)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed this because it was breaking on the next line and preventing the redirect logic I added. I don't think this should matter since we aren't using the questions and answers from expectID yet. Maybe @ctkochan22 can double check I'm not doing anything dumb here.

@marcaaron marcaaron changed the title [WIP] Setup "Connect bank account" workspace flow Setup "Connect bank account" workspace flow Oct 7, 2021
@marcaaron marcaaron requested a review from a team as a code owner October 7, 2021 18:13
@MelvinBot MelvinBot requested review from MonilBhavsar and removed request for a team October 7, 2021 18:13
@marcaaron marcaaron requested review from stitesExpensify and a team and removed request for a team October 7, 2021 18:13
@MelvinBot MelvinBot requested a review from Luke9389 October 7, 2021 18:14
@marcaaron
Copy link
Contributor Author

@tgolen taking this out of draft so we can start the reviews

@tgolen tgolen merged commit 67ec342 into tgolen-workspace-settings Oct 8, 2021
@tgolen tgolen deleted the marcaaron-connectBankAccount2 branch October 8, 2021 13:39
@@ -167,21 +169,32 @@ class BankAccountStep extends React.Component {
return (
<View style={[styles.flex1, styles.justifyContentBetween]}>
<HeaderWithCloseButton
title={this.props.translate('bankAccount.addBankAccount')}
title={this.props.translate('workspace.common.bankAccount')}
stepCounter={subStep && {step: 1, total: 5}}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is showing error when subStep is null

Copy link
Contributor Author

Choose a reason for hiding this comment

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

propTypes warning maybe? probably we should be passing either undefined or an Object. I don't think it will affect the code, but should be cleaned up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

/** Data to display a step counter in the header */
stepCounter: PropTypes.shape({
step: PropTypes.number,
total: PropTypes.number,
}),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

stepCounter={subStep ? {step: 1, total: 5} : undefined}

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I cleaned this up already.

@marcaaron
Copy link
Contributor Author

marcaaron commented Oct 8, 2021

Just to follow up here. I did some testing on iOS and Android and things seem to be working well. However, one thing to watch out for is the transition from the /bank-account page to "Continue with setup" screen. When swiping to the right on iOS the transition is a little awkward since the underlying screen is blank. We can also briefly see the blank screen when pressing "<".

Ultimately, I couldn't come up with a perfect solution here but there is logic that will detect the screen getting focus and we'll go back one more screen if it's blank otherwise show the "Continue with setup" content.

In an earlier solution, I tried popping the screen from the stack before navigating to the /bank-account but while testing noticed this created some inconsistencies in the browser urls. Not really sure why, but guessing that navigation.pop() getting called very close to our custom navigate() method caused the weirdness.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @tgolen in version: 1.1.7-25 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@isagoico
Copy link

isagoico commented Oct 16, 2021

We're testing the first flow on all environments but for the Repeat flow with new account and test VERIFYING account we can only execute this flow until step 13 - Have ops verify this account and get the 3 validation amounts to input
This verifying flow is usually tested internally because we don't have access to the 3 amounts that are needed to validate the account. Please let us know if someone can take care of the Verifying flow internally 🙇

Edit: ignore this, I missed that this was internal QA before. My apologies🤦

@isagoico
Copy link

isagoico commented Oct 16, 2021

This was my bad, I missed the Internal QA under QA 🤦 On the good side, we tested the first flow on iOS Web and Android and it was a pass

Edit: forgot to mention that we also tested the 3 amount verification part here https://expensify.slack.com/archives/C9YU7BX5M/p1634347327277400?thread_ts=1634329844.247700&cid=C9YU7BX5M

@ogumen
Copy link

ogumen commented Oct 22, 2021

  1. The step 1 of 5 of Connect Bank Account flow has color contrast issues of green and blue text over white background. The green text (approx. #0DD682) against white background (#FFFFFF) has a color contrast ratio of 1.91:1, while blue text (approx. #2395FF) against same white background has a contrast ratio of 3.08:1. The minimum contrast requirements are at least 4.50:1 (WCAG SC 1.4.3)

  2. The instructions about the location (and number of digits) for routing and account numbers is implemented as image of text instead of plain text. The instructions are not conveyed by screen reader, therefore the screen reader users will not get the same instructions as sighted users get. (WCAG SC 1.4.5, 3.3.2)
    Expensify_Connect bank account_Image instruction

  3. The checkbox "I accept the Expensify Terms of service" is not implemented correctly, similar to the checkbox described in [high] JAWS+Chrome: Many Pages: Checkbox announced without role, state and label #5648 (WCAG SC 4.1.2). Also, the link "Expensify Terms of service" is identified using color alone failing WCAG SC 1.4.1, similar to [med] Color: Many Pages: Only color is used to distinguish links on the page #5447 The issue is applicable to all similar checkboxes on further screens in the flow.
    Expensify_Connect bank account_checkbox implemented wrongly

  4. The button "Save & continue" does not announce any role (similar to [med] JAWS+Chrome: Many Pages: Multiple elements announced without button role #5446 ) - WCAG SC 4.1.2. The issue is applicable to all similar buttons on further screens in the flow.
    Expensify_Connect bank account_Button announced with no role

  5. The focus outline for "Save & continue" button fails minimum contrast requirements of 3.00:1 (similar to [low] Color Contrast: Change Password: The focus outline does not meet the contrast ratio of 3:1 #5646 ) - WCAG SC 1.4.11. The issue is applicable to all similar buttons on further screens in the flow.
    Expensify_Connect bank account_Focus outline for button fails contrast requirements

  6. The loading animation between steps is not announced by screen reader (similar to [crit] JAWS+Chrome: Chat: Updates to chat window (messages, typing status) are not announced #5681 ), also it fails minimum contrast requirements of 3.00:1 (grey animation approx. #ADB5B8 against white background #FFFFFF has a color contrast of 2.08:1).
    Expensify_Connect bank account_Loading animation

  7. The step 2 of 5 of the flow has multiple elements announcing no label (Tax ID number, Company name, Incorporation date, Incorporation state) - WCAG SC 1.3.1, 4.1.2 (similar to [med] HTML Validator: Many Pages: Multiple text fields are not associated with their labels #5451 [high] JAWS+Chrome: Profile: Dropdown "Preferred Pronouns" does not announce its label #5649 ) Additionally, the light grey borders of the controls (text fields and checkboxes) fail contrast requirements - similar to [med] Color Contrast: Many Pages: Input controls grey border against adjacent white fails contrast #5521 , and the placeholder text fails color contrast requirements - similar to [med] Color Contrast: Many Pages: Input field light grey placeholder text on white fails contrast #5520 The color contrast part is applicable to all similar controls on next steps of the flow.
    Expensify_Connect bank account_Elements announced without label

  8. The company address suggestions as well as error messages upon submitting the empty form are not conveyed by screen reader - WCAG SC 4.1.3, similar to [med] JAWS+Chrome: Email verification: Confirmation message 'link has been resent' not announced #5465 [high] JAWS+Chrome: Many Pages: Error toast messages are not announced #5678
    Expensify_Connect bank account_Company address suggestions not announced by screen reader
    Expensify_Connect bank account_Errors not announced by screen reader upon submitting the form

  9. The "Tax ID number" and "Phone number" fields convey the acceptable format using placeholder text only. Once user starts typing anything into the field, the placeholder (the format instructions) disappears and no longer available to the users - WCAG 3.3.2.
    Expensify_Connect ban account_Tax ID number instructions
    Expensify_Connect ban account_Phone number instructions

  10. The required fields and dropdowns are not visually or programmatically marked as required - WCAG 3.3.2, similar to [med] JAWS+Chrome: Many Pages: The required fields are not marked as required #5463 It is applicable to multiple required fields and dropdowns throughout the flow.
    Expensify_Connect bank account_Required fields are not marked as such

  11. No error messages or correction suggestions are provided when no option is selected in the "Company type" and "Incorporation state" dropdowns - WCAG 3.3.1, 3.3.3, similar to [med] Error: Set password: Error messages are not provided when trying to submit the form with empty fields #5528
    Expensify_Connect bank account_No correction suggestions provided for dropdowns

  12. Several links cannot be focused with Tab key: "Onfido's Facial Scan Policy and Release", "Privacy policy" and Terms of service". It fails WCAG SC 2.1.1, similar to [high] Keyboard Navigation: About: 'Terms of service' and 'Privacy policy' links are not focusable #5656
    Expensify_Connect bank account_Several links not focusable

  13. The focus is not trapped in Connect Bank Account overlay, and the background page elements can be focused - the issue is seen throughout the entire flow, fails WCAG SC 2.4.3, similar to [med] Keyboard Navigation: Many Pages: Focus not moved/trapped within the opened dialog #5516
    Expensify_Connect bank account_Focus not trapped in dialog

  14. The grey Back and Close buttons (#C6C9CA) on white background (#FFFFFF) have a color contrast of 1.91:1 failing the minimum contrast requirements of 3.00:1.
    Expensify_Connect bank account_Grey icons on white background fail contrast requirements

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @roryabraham in version: 1.1.8-9 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

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