Fix missing merchant field when using QAB after login#62718
Conversation
|
@dominictb 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] |
|
I test #51040 too and it still passes. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-05-25.at.22.37.52.movAndroid: mWeb ChromeScreen.Recording.2025-05-25.at.22.40.03.moviOS: HybridAppScreen.Recording.2025-05-25.at.22.31.20.moviOS: mWeb SafariScreen.Recording.2025-05-25.at.22.33.32.movMacOS: Chrome / SafariScreen.Recording.2025-05-25.at.22.22.04.movMacOS: DesktopScreen.Recording.2025-05-25.at.22.23.40.mov |
MonilBhavsar
left a comment
There was a problem hiding this comment.
Can we add automated test?
…rom-qab-after-login
|
@bernhardoj Seems like our solution can fix #59499 as well, right? |
| @@ -96,6 +96,7 @@ function IOURequestStartPage({ | |||
| if ( | |||
| (transaction?.reportID === reportID && iouType !== CONST.IOU.TYPE.CREATE && iouType !== CONST.IOU.TYPE.SUBMIT) || | |||
There was a problem hiding this comment.
Ok, I can't reproduce the double amount page anymore and our issue too after this condition is updated. The prev condition is
transaction?.reportID === reportID
which will only trigger the money request init function (resetIOUTypeIfChanged) whenever the reportID changes, but now we ignore it if the iouType is SUBMIT, which is true in our case. However, this causes the resetIOUTypeIfChanged to be called twice whenever we change tab because useFocusEffect is triggered whenever the deps change, and in this case, when we change the tab, transactionRequestType will also change. Not sure how to approach this.
There was a problem hiding this comment.
@dominictb so, how do we proceed with this?
Seems like our solution can fix #59499 as well, right?
Btw, this PR won't fix #59499, but we have another issue where I already proposed a solution that will fix #59499 too.
In my opinion, we should merge this PR, fix #63361, then revert #60940 so we won't have 2 initMoneyRequest every time switching tabs and have a proper fix too.
There was a problem hiding this comment.
@bernhardoj Okay let proceed with this PR, add unit test (important) and let that potential regression be fixed in #63361.
Btw, I think your proposal #63361 does not address the root cause that resetIOUTypeIfChanged gets called twice.
There was a problem hiding this comment.
There was a problem hiding this comment.
@bernhardoj Can you confirm your PR #63526 did fix #59499? If so, please merge main and proceed next steps.
There was a problem hiding this comment.
Sorry, I missed this. Checking..
There was a problem hiding this comment.
Updated the PR. Unit test left.
There was a problem hiding this comment.
I keep getting an error when running the test after react-native-tab-view is updated. I have asked for help in Slack.
…rom-qab-after-login
…rom-qab-after-login
|
@bernhardoj How is the fix going? |
|
Sorry, I was OOO. The error I'm getting on the unit test is fixed now. |
…rom-qab-after-login
|
@bernhardoj So is this ready for review? |
|
@dominictb Now it's ready for review |
|
Bump @MonilBhavsar |
|
Looking |
| // This is currently only being used for testing | ||
| defaultSelectedTab = CONST.TAB_REQUEST.SCAN, |
There was a problem hiding this comment.
It was used for the unit test here to simulate the case where manual tab is selected by default.
MonilBhavsar
left a comment
There was a problem hiding this comment.
Can you add QA steps, or copy Test steps?
MonilBhavsar
left a comment
There was a problem hiding this comment.
Looks good, thanks!
|
✋ 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/MonilBhavsar in version: 9.1.71-0 🚀
|
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 9.1.71-11 🚀
|
Explanation of Change
Fixed Issues
$ #61991
PROPOSAL: #61991 (comment)
Tests
Prerequisite: created a manual money request on a WS chat, account logged out
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.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
android.mp4
Android: mWeb Chrome
android.mweb.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.mweb.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4