[No QA] Add unit test for report should not be displayed in LHN#53745
[No QA] Add unit test for report should not be displayed in LHN#53745mountiny merged 34 commits intoExpensify:mainfrom
Conversation
d7508d9 to
8087720
Compare
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
| it('should not display the report marked as hidden', async () => { | ||
| // When the SidebarLinks are rendered. | ||
| LHNTestUtils.getDefaultRenderedSidebarLinks(); | ||
| const report: Report = { | ||
| ...createReport(), | ||
| participants: { | ||
| [TEST_USER_ACCOUNT_ID]: { | ||
| notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN, | ||
| }, | ||
| }, | ||
| }; | ||
|
|
||
| // And a report marked as hidden is initialized in Onyx | ||
| await initializeState({ | ||
| [`${ONYXKEYS.COLLECTION.REPORT}${report.reportID}`]: report, | ||
| }); | ||
|
|
||
| // Then hidden report should not appear in the sidebar. | ||
| expect(getOptionRows()).toHaveLength(0); | ||
| }); |
There was a problem hiding this comment.
We are actually doind some changes to this flow, can you also add a test (if not present) to make sure the report that has empty notification preference is also not rendered?
There was a problem hiding this comment.
Added a case for empty notification.
Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com>
Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com>
Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com>
Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com>
Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com>
Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com>
Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com>
|
@mountiny I updated the comment format. |
9028f61 to
eb1095d
Compare
mountiny
left a comment
There was a problem hiding this comment.
I think you still need to start with the Given word which will set the conditions and then when
|
@mountiny Added the Given word. |
I misunderstood what you meant 😅 |
|
@mountiny I updated. |
Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com>
|
@mountiny I updated. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.80-1 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.0.80-6 🚀
|
Explanation of Change
Fixed Issues
$ #52034
PROPOSAL: #52034 (comment)
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[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))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
MacOS: Desktop