refactor navigateToAndCreateGroupChat to use currentAccountID from useOnyx#87203
Conversation
|
@DylanDylann 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/VideosScreen.Recording.2026-04-08.at.16.11.50.mov |
| it('should create a group chat report with correct chatType', () => { | ||
| const result = buildOptimisticGroupChatReport([1, 2, 3], 'Test Group', '', 1); | ||
| expect(result.chatType).toBe(CONST.REPORT.CHAT_TYPE.GROUP); | ||
| }); | ||
|
|
||
| it('should set the report name from the provided reportName', () => { | ||
| const result = buildOptimisticGroupChatReport([1, 2, 3], 'My Group Chat', '', 1); | ||
| expect(result.reportName).toBe('My Group Chat'); | ||
| }); | ||
|
|
||
| it('should set the avatarUrl from the provided avatarUri', () => { | ||
| const avatarUri = 'https://example.com/avatar.png'; | ||
| const result = buildOptimisticGroupChatReport([1, 2], 'Group', avatarUri, 1); | ||
| expect(result.avatarUrl).toBe(avatarUri); | ||
| }); | ||
|
|
||
| it('should use the provided optimisticReportID', () => { | ||
| const reportID = 'custom-report-id-123'; | ||
| const result = buildOptimisticGroupChatReport([1, 2], 'Group', '', 1, reportID); | ||
| expect(result.reportID).toBe(reportID); | ||
| }); | ||
|
|
There was a problem hiding this comment.
Could you combine these tests to make them run faster?
JmillsExpensify
left a comment
There was a problem hiding this comment.
LGTM. In line with expected product behavior.
|
🚧 @mollfpr has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ 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/mollfpr in version: 9.3.59-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes required. This PR is a purely internal refactor that threads |
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.3.59-4 🚀
|
Explanation of Change
Fixed Issues
$ #66412
PROPOSAL:
Tests
Offline tests
QA Steps
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
Screen.Recording.2026-04-07.at.09.50.54.mov