fix: missing Create expense options#71871
Conversation
Codecov Report❌ Patch coverage is
... and 69 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp71871-android-hybrid-001.mp4Android: mWeb Chrome71871-mweb-chrome-001.mp4iOS: HybridApp71871-ios-hybrid-001.mp4iOS: mWeb Safari71871-mweb-safari-001.mp4MacOS: Chrome / Safari71871-web-chrome-001.mp4MacOS: Desktop71871-desktop-001.mp4 |
rojiphil
left a comment
There was a problem hiding this comment.
Thanks @nkdengineer for the PR.
Changes work well
Please also add a unit test as mentioned here
5c91e57 to
750b7ae
Compare
|
@rojiphil Updated. |
| expect(getOptionRows()).toHaveLength(0); | ||
| }); | ||
|
|
||
| it('display the report with last action is report preview will not change the current user personal detail', async () => { |
There was a problem hiding this comment.
Thanks @nkdengineer for adding the unit test. Just one comment though.
The explanation does not seem correctly written. Also, can we start with should?
rojiphil
left a comment
There was a problem hiding this comment.
Thanks @nkdengineer for the changes.
@neil-marcellini Changes LGTM. Works well too.
All yours. Thanks.
neil-marcellini
left a comment
There was a problem hiding this comment.
Overall, looks good, thank you. None of the comments I left are blockers, but please fix them either before we merge here or with a follow-up pull request.
| // to ensures that lastActorDetails.accountID is correctly set in case it's empty string | ||
| if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW && lastActorDetails) { | ||
| lastActorDetails.accountID = lastAction.actorAccountID; | ||
| lastActorDetails = { |
There was a problem hiding this comment.
Not a blocker, but please add a comment explaining why it's important to create a copy of the object.
| expect(getOptionRows()).toHaveLength(0); | ||
| }); | ||
|
|
||
| it('should not change the current user personal detail when a report with last action is REPORTPREVIEW is displayed', async () => { |
There was a problem hiding this comment.
Let's switch to when a report is displayed where the last action is REPORTPREVIEW. I think that's slightly more clear.
| ...createReport(undefined, [1, 2], undefined, undefined, undefined, true), | ||
| lastActorAccountID: 1, | ||
| lastMessageText: '123456', | ||
| }; | ||
|
|
||
| const lastReportAction: ReportAction = { | ||
| ...createRandomReportAction(2), | ||
| actionName: 'REPORTPREVIEW', | ||
| actorAccountID: 2, |
There was a problem hiding this comment.
NAB: Can we please create variables to give names to these IDs? I think that makes it a lot more clear. For example, something like setting the last actor account ID to submitterAccountID vs 1.
|
|
||
| await waitForBatchedUpdatesWithAct(); | ||
|
|
||
| const personalDetail = await getOnyxValue(ONYXKEYS.PERSONAL_DETAILS_LIST); |
There was a problem hiding this comment.
NAB: You verified that this fails without your fix, right?
|
Ok I will go ahead and merge, please create a follow up PR when you get a chance @nkdengineer |
|
✋ 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/neil-marcellini in version: 9.2.30-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.2.30-6 🚀
|
| if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW && lastActorDetails) { | ||
| lastActorDetails.accountID = lastAction.actorAccountID; | ||
| lastActorDetails = { | ||
| ...lastActorDetails, | ||
| accountID: lastAction.actorAccountID, | ||
| }; |
There was a problem hiding this comment.
We ended up removing this piece of code in #73220
More details:
#73220 (comment)

Explanation of Change
Fixed Issues
$ #71635
PROPOSAL: #71635 (comment)
Tests
Precondition:
Offline tests
Same as tests
QA Steps
Same as tests
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))npm run compress-svg)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.mov
Android: mWeb Chrome
android-mweb.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov