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

Ensure Requestor Info validation shows error growl #4879

Merged
merged 2 commits into from
Aug 27, 2021

Conversation

Julesssss
Copy link
Contributor

Details

Follow up to this PR, which was accidentally merged early.

Adds the Growl for non-server errors on the Requestor Info VBA step. These errors are not yet displayed in the error Modal, so we need to continue to show with the Growl.

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/175331

Tests

0) Test Setup

  • Create a new user
  • From the global create menu, tap 'New Workspace', then the 'Get Started' button
  • Tap 'Connect Manually' and use the data from this StackOverflow post to fill the Routing and Account number

1) Verify that Modal validation errors DO NOT show as a Growl

  • Using the stack overflow post, fill each field except 'Company Website', leave that as https://
  • Hit 'Save & Continue'
  • You should see the Company Website field highlighted red with an error message
  • You should see a Modal popup with an error message
  • You should NOT see a Growl with the same message

2) Verify that server errors DO show as a Growl

  • Continue from the end of test 1
  • Enter a valid website
  • Set the 'Phone Number' field to 12345678
  • Hit 'Save & Continue'
  • You should see a Growl with an error message
  • You should NOT see the field highlighted red
  • You should NOT see a Modal popup

2) Verify that unhandled validation errors DO show as a Growl

  • Continue from the end of test 2
  • Enter valid information in every field
  • Hit 'Save & Continue'
  • At the 'Requestor Information' step, enter first and second name only
  • Hit 'Save & Continue'
  • Fix each error one by one, ensure a Growl message shows for each
  • These will be changed to Modal validation in a separate issue

QA Steps

Run above tests

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Screenshot 2021-08-27 at 14 33 51

Mobile Web

Desktop

Screenshot 2021-08-27 at 17 04 51

iOS

Simulator Screen Shot - iPhone 8 - 2021-08-27 at 17 07 29

Android

Screenshot_1630080877

@Julesssss Julesssss self-assigned this Aug 27, 2021
@Julesssss Julesssss requested a review from a team August 27, 2021 16:51
@MelvinBot MelvinBot requested review from nickmurray47 and removed request for a team August 27, 2021 16:51
@Julesssss
Copy link
Contributor Author

I am currently unable to test mobile web for either Android or Web (slack discussion). So please verify that platform if possible.

@Julesssss Julesssss marked this pull request as ready for review August 27, 2021 16:51
@Julesssss Julesssss requested a review from a team as a code owner August 27, 2021 16:51
@MelvinBot MelvinBot removed the request for review from a team August 27, 2021 16:52
*/
function showBankAccountFormValidationError(error, isServerError) {
function showBankAccountFormValidationError(error, isUnhandledError) {
Copy link
Contributor

Choose a reason for hiding this comment

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

NAB, maybe something like shouldGrowl be better here since we aren't making assumptions about the kind of error?

*/
function showBankAccountFormValidationError(error, isServerError) {
function showBankAccountFormValidationError(error, isUnhandledError) {
Onyx.merge(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {error}).then(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if we want to clean this up now, but I think maybe we should. IIRC we should not be waiting for Onyx.merge() promises to resolve.

Copy link
Contributor

@marcaaron marcaaron left a comment

Choose a reason for hiding this comment

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

Looks good and tests well!

@marcaaron marcaaron merged commit 1461f9e into main Aug 27, 2021
@marcaaron marcaaron deleted the jules-removeGrowlFromVBAFlow branch August 27, 2021 18:23
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @marcaaron in version: 1.0.88-3 🚀

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

@isagoico
Copy link

isagoico commented Aug 31, 2021

@Julesssss We will test this via the Bank-account/new flow. Please stop me if it's not acceptable. We currently don't have access to the "Get started" button since all our testing domains already have the expensify card.
Also, since the /Bank-account/new flow requires access to the URL this will only be tested in Web. Please let me know if we're good with this. 🙇

@Julesssss
Copy link
Contributor Author

Hi @isagoico, that makes sense. Is this how you have tested all other Bank account PRs up to now?

@isagoico
Copy link

Yes! we have used this method for those PRs.

@Julesssss
Copy link
Contributor Author

Thanks, then the plan sounds fine. I'll just tag @MitchExpensify and @kevinksullivan to ensure we test internally in addition.

@OSBotify
Copy link
Contributor

OSBotify commented Sep 1, 2021

🚀 Deployed to production by @roryabraham in version: 1.0.90-2 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 failure ❌
🕸 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.

5 participants