diff --git a/tests/unit/SidebarFilterTest.ts b/tests/unit/SidebarFilterTest.ts index c54c2cae54f8..23273b7c24b7 100644 --- a/tests/unit/SidebarFilterTest.ts +++ b/tests/unit/SidebarFilterTest.ts @@ -935,4 +935,33 @@ xdescribe('Sidebar', () => { }); }); }); + + describe('filter paycheck and bill report', () => { + const report1: Report = { + ...LHNTestUtils.getFakeReport(), + type: CONST.REPORT.TYPE.PAYCHECK, + }; + const report2: Report = { + ...LHNTestUtils.getFakeReport(), + type: CONST.REPORT.TYPE.BILL, + }; + const report3: Report = LHNTestUtils.getFakeReport(); + LHNTestUtils.getDefaultRenderedSidebarLinks(report1.reportID); + const reportCollectionDataSet: ReportCollectionDataSet = { + [`${ONYXKEYS.COLLECTION.REPORT}${report1.reportID}`]: report1, + [`${ONYXKEYS.COLLECTION.REPORT}${report2.reportID}`]: report2, + [`${ONYXKEYS.COLLECTION.REPORT}${report3.reportID}`]: report3, + }; + return ( + waitForBatchedUpdates() + .then(() => Onyx.multiSet(reportCollectionDataSet)) + + // Then the reports 1 and 2 are hidden and 3 is not + .then(() => { + const hintText = Localize.translateLocal('accessibilityHints.navigatesToChat'); + const optionRows = screen.queryAllByAccessibilityHint(hintText); + expect(optionRows).toHaveLength(1); + }) + ); + }); });