fix wallet phone validation page
Explanation of Change
Fixed Issues
$ https://github.com/Expensify/App/issues/51491 PROPOSAL: https://github.com/Expensify/App/issues/51491#issuecomment-2439042648
Tests
Same as QA
- [X] Verify that no errors appear in the JS console
Offline tests
Same as QA
QA Steps
Pre-conditions:
- Workspace is connected with a bank account
- Workspace has a member invited
- Workspace has enabled Expensify card
- Issue a physical card for the member
- Sign in as the member
- Go to settings > wallet > assigned card > get physical card
- Go through the flow until phone number input page
- Input this: 8005555555 phone number and click enter
- Make sure it redirects to the next step if the entered phone number belongs to the country you are operating from, otherwise, an "Invalid phone number" error is displayed.
- [X] Verify that no errors appear in the JS console
PR Author Checklist
- [X] I linked the correct issue in the
### Fixed Issuessection above - [X] I wrote clear testing steps that cover the changes made in this PR
- [X] I added steps for local testing in the
Testssection - [X] I added steps for the expected offline behavior in the
Offline stepssection - [X] I added steps for Staging and/or Production testing in the
QA stepssection - [X] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
- [X] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
- [X] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
- [X] I added steps for local testing in the
- [X] I included screenshots or videos for tests on all platforms
- [X] I ran the tests on all platforms & verified they passed on:
- [X] Android: Native
- [X] Android: mWeb Chrome
- [X] iOS: Native
- [X] iOS: mWeb Safari
- [X] MacOS: Chrome / Safari
- [X] MacOS: Desktop
- [X] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
- [X] I followed proper code patterns (see Reviewing the code)
- [X] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e.
toggleReportand notonIconClick) - [X] I verified that comments were added to code that is not self explanatory
- [X] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
- [X] I verified any copy / text shown in the product is localized by adding it to
src/languages/*files and using the translation method- [X] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
- [X] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
- [X] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
- [X] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
- [X] I verified the JSDocs style guidelines (in
STYLE.md) were followed
- [X] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e.
- [X] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
- [X] I followed the guidelines as stated in the Review Guidelines
- [X] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like
Avatar, I verified the components usingAvatarare working as expected) - [X] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
- [X] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
- [X] I verified that if a function's arguments changed that all usages have also been updated correctly
- [X] If any new file was added I verified that:
- [X] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
- [X] If a new CSS style is added I verified that:
- [X] A similar style doesn't already exist
- [X] The style can't be created with an existing StyleUtils function (i.e.
StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
- [X] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
- [X] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like
Avataris modified, I verified thatAvataris working as expected in all cases) - [X] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
- [X] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
- [X] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
- [X] I verified that all the inputs inside a form are aligned with each other.
- [X] I added
Designlabel and/or tagged@Expensify/designso the design team can review the changes.
- [X] If a new page is added, I verified it's using the
ScrollViewcomponent to make it scrollable when more elements are added to the page. - [X] If the
mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.
Screenshots/Videos
Android: Native
https://github.com/user-attachments/assets/a56fecca-0175-4907-9deb-ec5a34d1ae5c
Android: mWeb Chrome
https://github.com/user-attachments/assets/ac327431-33bd-4328-b92b-05406792e29a
iOS: Native
https://github.com/user-attachments/assets/3c25ec67-7cc0-44c1-b315-650726ff3410
iOS: mWeb Safari
https://github.com/user-attachments/assets/b9b06b89-3a62-4590-a98e-cd1e0c7f1ce3
MacOS: Chrome / Safari
https://github.com/user-attachments/assets/2de2f012-46e6-4c5b-9458-c89116f9dee3
MacOS: Desktop
https://github.com/user-attachments/assets/6ae92766-593e-4e4c-9c70-5365005212c6
MacOS: Desktop
https://github.com/user-attachments/assets/fd720de3-2606-4165-89c6-89dc51f3e705
@sobitneupane Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]
@NJ-2020 How can I add a test Expensify card. Does it need to go through Concierge?
@sobitneupane You need to use staging server to make sure it will not go to production mode
-
User A, User B
-
A: Enable "Use staging server"
-
A: Go to any workspace/create new workspace
-
A: Enable Expensify card features
-
A: Connect with any bank
-
A: Invite user B
-
A: Inside Expensify card, issue new card for user B
-
B: Go to settings > wallet > assigned card > select any card
-
B: Go through the flow until phone number input page
-
B: Input this: 8005555555 phone number and click enter
-
B: Make sure it got redirected to the next step without any issue
Thanks @NJ-2020.
Make sure it got redirected to the next step without any errors
I believe it's true only if user is in US. I believe, user not in US, will get error message.
Can you please add all test steps in QA as well.
@NJ-2020 EsLint check is failing.
EsLint check is failing.
@sobitneupane The eslint errors is not coming from my PR:
Can you please add all test steps in QA as well.
Done
I believe it's true only if user is in US. I believe, user not in US, will get error message.
@NJ-2020 As you can see in the screen recordings here, QA test doesn't pass for me. I got Phone number not valid error. Is it expected? If yes, could you please update QA tests to address it?
The eslint errors is not coming from my PR:
Is it present in current main branch? Could you please merge main?
Bump @NJ-2020 Could you please merge main and update the QA steps?
@sobitneupane Sorry for the delayed response, Okay will do that
I will be OOO for 1 day
@sobitneupane Done conflicts resolved
Regarding updating the QA steps, I am not sure here why I passed while inputing the number while I am from Indonesia as you can see here (from my IP)
But I don't know why, maybe because when creating the account(that I used for testing) I used US timezone
I just performed a new test on all platforms and it got working as expected
Screenshots/Videos
Android: Native
https://github.com/user-attachments/assets/a56fecca-0175-4907-9deb-ec5a34d1ae5c
Android: mWeb Chrome
https://github.com/user-attachments/assets/ac327431-33bd-4328-b92b-05406792e29a
iOS: Native
https://github.com/user-attachments/assets/3c25ec67-7cc0-44c1-b315-650726ff3410
iOS: mWeb Safari
https://github.com/user-attachments/assets/b9b06b89-3a62-4590-a98e-cd1e0c7f1ce3
MacOS: Chrome / Safari
https://github.com/user-attachments/assets/2de2f012-46e6-4c5b-9458-c89116f9dee3
MacOS: Desktop
https://github.com/user-attachments/assets/6ae92766-593e-4e4c-9c70-5365005212c6
- Issue a physical card for the member
- Sign in as the member
- Go to settings > wallet > assigned card > get physical card
- Go through the flow until phone number input page
- Input this: 8005555555 phone number and click enter
- Make sure it got redirected to the next step without any issues
Could you please update the sixth step:
Verify that:
- It redirects to the next step if the entered phone number belongs to the country you are operating from.
- Otherwise, an "Invalid phone number" error is displayed.
@sobitneupane Done
@chiragsalian The ESLint error is not coming from my PR
Well it kinda is. So whenever we update ESLint with new rules, the person who modifies the related file should update the file to satisfy the rule. We sometimes allow to ignore and proceed if the PR is very large or time sensitive but then the next author working on the file would have the error and would need to tackle it. We can't keep ignoring it otherwise our files wont meet ESLint standards. In your case it's from the file GetPhysicalCardPhone.tsx which you modified.
Since this ESLint rule "withOnyx has been deprecated" has existed for a while, and the PR is neither time-sensitive nor very large you would have to tackle it. Sorry for the inconvenience, i don't think it should be too tricky but let us know if you have any questions.
friendly bump, any update here @NJ-2020?
Hi, I am very sorry. I am OOO now for few days. i am currently mourning my father who has passed away yesterday.
Thanks
cc: @sobitneupane @chiragsalian
After pulling the latest changes from main, the eslint error is fixed elsewhere
cc: @chiragsalian
:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.
🚀 Deployed to staging by https://github.com/chiragsalian in version: 9.0.78-0 🚀
| platform | result |
|---|---|
| 🤖 android 🤖 | cancelled 🔪 |
| 🖥 desktop 🖥 | cancelled 🔪 |
| 🍎 iOS 🍎 | cancelled 🔪 |
| 🕸 web 🕸 | success ✅ |
| 🤖🔄 android HybridApp 🤖🔄 | cancelled 🔪 |
| 🍎🔄 iOS HybridApp 🍎🔄 | cancelled 🔪 |
🚀 Deployed to staging by https://github.com/chiragsalian in version: 9.0.78-0 🚀
| platform | result |
|---|---|
| 🤖 android 🤖 | success ✅ |
| 🖥 desktop 🖥 | success ✅ |
| 🍎 iOS 🍎 | success ✅ |
| 🕸 web 🕸 | success ✅ |
| 🤖🔄 android HybridApp 🤖🔄 | failure ❌ |
| 🍎🔄 iOS HybridApp 🍎🔄 | success ✅ |
🚀 Deployed to staging by https://github.com/chiragsalian in version: 9.0.78-0 🚀
| platform | result |
|---|---|
| 🤖 android 🤖 | success ✅ |
| 🖥 desktop 🖥 | success ✅ |
| 🍎 iOS 🍎 | success ✅ |
| 🕸 web 🕸 | success ✅ |
| 🤖🔄 android HybridApp 🤖🔄 | failure ❌ |
| 🍎🔄 iOS HybridApp 🍎🔄 | success ✅ |
🚀 Deployed to staging by https://github.com/chiragsalian in version: 9.0.78-0 🚀
| platform | result |
|---|---|
| 🤖 android 🤖 | success ✅ |
| 🖥 desktop 🖥 | success ✅ |
| 🍎 iOS 🍎 | success ✅ |
| 🕸 web 🕸 | success ✅ |
| 🤖🔄 android HybridApp 🤖🔄 | failure ❌ |
| 🍎🔄 iOS HybridApp 🍎🔄 | success ✅ |
🚀 Deployed to staging by https://github.com/chiragsalian in version: 9.0.78-0 🚀
| platform | result |
|---|---|
| 🤖 android 🤖 | success ✅ |
| 🖥 desktop 🖥 | success ✅ |
| 🍎 iOS 🍎 | success ✅ |
| 🕸 web 🕸 | success ✅ |
| 🤖🔄 android HybridApp 🤖🔄 | success ✅ |
| 🍎🔄 iOS HybridApp 🍎🔄 | success ✅ |
🚀 Deployed to staging by https://github.com/chiragsalian in version: 9.0.78-0 🚀
| platform | result |
|---|---|
| 🤖 android 🤖 | success ✅ |
| 🖥 desktop 🖥 | success ✅ |
| 🍎 iOS 🍎 | success ✅ |
| 🕸 web 🕸 | success ✅ |
| 🤖🔄 android HybridApp 🤖🔄 | success ✅ |
| 🍎🔄 iOS HybridApp 🍎🔄 | success ✅ |
🚀 Deployed to staging by https://github.com/chiragsalian in version: 9.0.78-0 🚀
| platform | result |
|---|---|
| 🤖 android 🤖 | failure ❌ |
| 🖥 desktop 🖥 | success ✅ |
| 🍎 iOS 🍎 | success ✅ |
| 🕸 web 🕸 | success ✅ |
| 🤖🔄 android HybridApp 🤖🔄 | success ✅ |
| 🍎🔄 iOS HybridApp 🍎🔄 | success ✅ |
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.78-6 🚀
| platform | result |
|---|---|
| 🤖 android 🤖 | true ❌ |
| 🖥 desktop 🖥 | success ✅ |
| 🍎 iOS 🍎 | success ✅ |
| 🕸 web 🕸 | success ✅ |
| 🤖🔄 android HybridApp 🤖🔄 | failure ❌ |
| 🍎🔄 iOS HybridApp 🍎🔄 | success ✅ |