Conversation
|
@abzokhattab 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] |
|
Hi does this need c+ review? .. just confirming before reviewing. cc @Valforte |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee30721358
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
tests/unit/ReportUtilsTest.ts
Outdated
|
|
||
| // getOutstandingChildRequest returns empty (no update) when harvesting is ON, | ||
| // meaning it does NOT set hasOutstandingChildRequest to false | ||
| expect(getOutstandingChildRequest(expenseReport).hasOutstandingChildRequest).toBeFalsy(); |
There was a problem hiding this comment.
Assert absence of update instead of falsy child request
The new delayed-submission-on test uses toBeFalsy() for getOutstandingChildRequest(expenseReport).hasOutstandingChildRequest, which also passes when the function returns false instead of omitting the field. In the regression this test is meant to guard, returning false would clear hasOutstandingChildRequest on merge and remove the GBR, but this test would still pass because it never distinguishes undefined from false and the chat object is pre-seeded with hasOutstandingChildRequest: true.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Good catch — updated the assertion from toBeFalsy() to toEqual({}). This ensures the test would fail if getOutstandingChildRequest ever changes to return {hasOutstandingChildRequest: false} instead of {}, which would cause an Onyx merge to clear the existing true value and break the GBR.
Codecov Report✅ All modified and coverable lines are covered by tests. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
The failing ESLint doesn't relate to the file change. @Valforte Could you try to pull the main? |
|
All done |
|
🚀 Deployed to staging by https://github.com/mollfpr in version: 9.3.28-0 🚀
|
|
🚀 Deployed to staging by https://github.com/mollfpr in version: 9.3.30-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.3.30-3 🚀
|
Explanation of Change
Test the case when a workspace has Delayed Submission Off, create a draft report (Show a GBR), then set Delayed Submission On. Here the report should still show the GBR.
Fixed Issues
$ #69891
PROPOSAL:
Tests
Created new test case
Offline tests
No QA
QA Steps
No QA
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari