Skip to content

Commit

Permalink
Merge pull request #24531 from Expensify/paulogasparsv-fix-sidebar-tests
Browse files Browse the repository at this point in the history
Fix Sidebar Tests
  • Loading branch information
Beamanator authored Aug 14, 2023
2 parents 9348d53 + dca0af7 commit 8e799df
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/unit/SidebarFilterTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ describe('Sidebar', () => {
.then(() =>
Onyx.multiSet({
[`${ONYXKEYS.COLLECTION.REPORT}${report.reportID}`]: report,
[ONYXKEYS.IS_LOADING_REPORT_DATA]: false,
}),
)

Expand All @@ -100,7 +101,7 @@ describe('Sidebar', () => {
it('includes an empty chat report if it has a draft', () => {
LHNTestUtils.getDefaultRenderedSidebarLinks();

// Given a new report
// Given a new report with a draft text
const report = {
...LHNTestUtils.getFakeReport([1, 2], 0),
hasDraft: true,
Expand All @@ -113,10 +114,11 @@ describe('Sidebar', () => {
Onyx.multiSet({
[`${ONYXKEYS.COLLECTION.REPORT}${report.reportID}`]: report,
[ONYXKEYS.PERSONAL_DETAILS_LIST]: LHNTestUtils.fakePersonalDetails,
[ONYXKEYS.IS_LOADING_REPORT_DATA]: false,
}),
)

// Then no reports are rendered in the LHN
// Then the report should be rendered in the LHN since it has a draft
.then(() => {
const hintText = Localize.translateLocal('accessibilityHints.chatUserDisplayNames');
const displayNames = screen.queryAllByLabelText(hintText);
Expand Down

0 comments on commit 8e799df

Please sign in to comment.