Repository navigation
[NoQA] Fix SearchColumnsPageTest - #104052
Conversation
usePolicyForMovingExpenses now reads the load status that useOnyx returns for the policy collection, and passes it to isLoadingOnyxValue. The SearchColumnsPage test mocked useOnyx to return only the value, so the metadata was undefined and the test crashed on main with "Cannot read properties of undefined (reading 'status')". Return a loaded status from the mock, as the real hook does.
|
@nkdengineer 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] |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No C+ review needed, thanks |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
🚀 Deployed to staging by https://github.com/francoisl in version: 9.5.10-0 🚀
|
|
🚀 Deployed to staging by https://github.com/francoisl in version: 9.5.12-0 🚀
|
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.5.12-1 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Fixes the
SearchColumnsPageJest test, which has been failing onmainsince #101465 merged.#101465 made
usePolicyForMovingExpensesread the Onyx load status of the policy collection. The test added in #83733 mocksuseOnyxto return only the value, with no metadata. SoisLoadingOnyxValuecrashed withCannot read properties of undefined (reading 'status'). Each PR passed CI on its own, but the failure shows up once both are merged.This updates the mock to return
{status: 'loaded'}, as the real hook does.Fixed Issues
$ #104051
Tests
Offline tests
QA Steps
NoQA
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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.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