Skip to content

Commit

Permalink
Fix Jest test for unread indicator when app is reopened from background
Browse files Browse the repository at this point in the history
This is a follow-up of #14520 / #15097, where we changed the app's
behavior to keep the unread indicator present after backgrounding
and reopening the app.
  • Loading branch information
francoisl committed Feb 15, 2023
1 parent 5fa1c8b commit a755dc8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/ui/UnreadIndicatorsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ describe('Unread Indicators', () => {
expect(unreadIndicator).toHaveLength(0);
}));

it('Clears the new line indicator when the user moves the App to the background', () => signInAndGetAppWithUnreadChat()
it('Keeps the new line indicator when the user moves the App to the background', () => signInAndGetAppWithUnreadChat()
.then(() => {
// Verify we are on the LHN and that the chat shows as unread in the LHN
expect(isDrawerOpen()).toBe(true);
Expand Down Expand Up @@ -478,9 +478,9 @@ describe('Unread Indicators', () => {
AppState.emitCurrentTestState('background');
AppState.emitCurrentTestState('active');

// Verify the new line is cleared
// Verify the new line is still present
unreadIndicator = screen.queryAllByLabelText('New message line indicator');
expect(unreadIndicator).toHaveLength(0);
expect(unreadIndicator).toHaveLength(1);
}));

it('Displays the correct chat message preview in the LHN when a comment is added then deleted', () => {
Expand Down

0 comments on commit a755dc8

Please sign in to comment.