[NoQA] Add test for RBR held expenses with outstanding child request - #75779
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. |
|
@hoangzinh 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] |
| [ONYXKEYS.SESSION]: { | ||
| accountID: 12345, | ||
| email: delegateEmail, | ||
| }, | ||
| [ONYXKEYS.ACCOUNT]: { | ||
| delegatedAccess: { | ||
| delegate: delegateEmail, | ||
| delegates: [{email: delegateEmail, role: CONST.DELEGATE_ROLE.ALL}], | ||
| }, | ||
| }, |
There was a problem hiding this comment.
It looks like those setup doesn't affect the testing result (I commented out those delegate access setup but test is still passed). Can you check again?
There was a problem hiding this comment.
It is how we are setting up copilot in other tests, for example:
App/tests/unit/ReportUtilsTest.ts
Lines 9458 to 9464 in cad3533
Which is precisely what we wanted to test here. I've also checked the backend to properly set up.
cc @mountiny what do you think?
There was a problem hiding this comment.
I dont really have much context on the vacation delegates honestly, @rushatgabhane might be able to confirm too
If this is how we do it in other tests, probably that is fine
There was a problem hiding this comment.
It looks like those setup doesn't affect the testing result
makes sense. on frontend a delegate with full access is identical to a normal account.
There was a problem hiding this comment.
like you would see system messages from backend after taking an action, and see delegates in settings.
but everything else same.
There was a problem hiding this comment.
Thanks @rushatgabhane for confirming. I guess we're good for this point then, @hoangzinh?
There was a problem hiding this comment.
I think if they are same for the normal account and the delegate account, we can remove those Onyx setup. To avoid confusion. What do you think? @lakchote
There was a problem hiding this comment.
Done, I've updated the code.
# Conflicts: # tests/unit/SidebarUtilsTest.ts
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
@mjasikowski 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
amyevans
left a comment
There was a problem hiding this comment.
@mjasikowski would you like to review as well?
|
🚀 Deployed to staging by https://github.com/mjasikowski in version: 9.2.65-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.2.65-6 🚀
|
Explanation of Change
Added a unit test for
SidebarUtilsthat simulates a full‑access copilot submitting to themselves, with an outstanding child request and a held expense. In that scenario, it should show a RBR.Fixed Issues
$ #69911
PROPOSAL:
Tests
Offline tests
NA
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
NA
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop