Repository navigation
[No QA] Fix test: wrap useSearchBulkActions renderHook in OnyxListItemProvider - #93759
Conversation
… mock getValidGroupBy Co-authored-by: ahmedGaber93 <ahmedGaber93@users.noreply.github.com>
|
@MelvinBot add [No QA] to the PR title |
Screenshots/VideosScreen.Recording.2026-06-17.at.2.07.31.AM.mov |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
All functional checks are now passing — no code fix is needed. ✅ When you triggered this request, the 8 The only remaining red check is
This check isn't something I can fix — it requires you (the human co-author) to fill out the Tests and QA Steps sections and tick the checklist boxes, then mark the PR Ready for review. Check status
|
|
@MelvinBot Please complete your author checklist and mark this PR as ready for review |
|
I restored the PR Author Checklist section that was missing from this PR's description. Why the What still needs you (the human co-author),
I deliberately didn't fill the Tests/QA sections, tick the platform-testing boxes, or flip it out of draft, because those are human attestations I shouldn't make on your behalf. Once you complete the above, the |
|
@MelvinBot Please update Tests and QA steps and offline steps to "No QA steps are required" @MelvinBot you have the permission, please mark this PR as ready for review. |
|
@MelvinBot Please mark all your author checklist as checked. |
|
@MelvinBot you have the permission, please mark this PR as ready for review. |
|
@ahmedGaber93 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] |
|
🚀 Deployed to staging by https://github.com/youssef-lr in version: 9.4.10-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to staging by https://github.com/youssef-lr in version: 9.4.12-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to staging by https://github.com/youssef-lr in version: 9.4.14-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.4.14-1 🚀
|
Explanation of Change
The
test (job 8)check onmainwas failing intests/unit/hooks/useSearchBulkActionsExportTest.tswith:The two
renderHook(() => useSearchBulkActions(...))calls rendered the hook without theOnyxListItemProviderwrapper thatuseSearchBulkActionsdepends on (it reads thesessionOnyx key throughuseOnyxContext). This PR passes{wrapper: OnyxListItemProvider}to bothrenderHookcalls, matching the established pattern used elsewhere (e.g.tests/actions/PolicyCategoryTest.ts).Once the provider was added, the hook rendered past the original failure point and surfaced a second latent gap: the test's
@libs/SearchUIUtilsmock fully replaces the module but omittedgetValidGroupBy, whichuseSearchBulkActionsnow calls (getExportOptions), causinggetValidGroupBy is not a function. This was previously masked because the hook threw on the session-context error before reaching that line. I added a faithful pass-through mock forgetValidGroupBy(the export queries under test are not grouped, so it resolves toundefined).Test-only change — no production code is affected.
Fixed Issues
$ #93754
PROPOSAL:
Tests
No QA steps are required
Offline tests
No QA steps are required
QA Steps
No QA steps are required
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