From f0667f12a46d350aba61d52ec2681d8f259cc314 Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Tue, 3 Sep 2024 12:59:56 -0500 Subject: [PATCH] Tests: Fix backup test unread count Co-authored-by: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com> --- ts/test-mock/backups/backups_test.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ts/test-mock/backups/backups_test.ts b/ts/test-mock/backups/backups_test.ts index e61486d9ca89..d123bebf703f 100644 --- a/ts/test-mock/backups/backups_test.ts +++ b/ts/test-mock/backups/backups_test.ts @@ -211,13 +211,22 @@ describe('backups', function (this: Mocha.Suite) { await snapshot('styled bubbles'); + debug('Waiting for unread count'); + const unreadCount = await leftPane + .locator( + '.module-conversation-list__item--contact-or-conversation__unread-indicator.module-conversation-list__item--contact-or-conversation__unread-indicator--unread-messages' + ) + .last(); + await unreadCount.waitFor(); + debug('Going into the conversation'); await contactElem.click(); await window .locator('.ConversationView .module-message >> "respond 4"') .waitFor(); - await snapshot('conversation'); + debug('Waiting for conversation to be marked read'); + await unreadCount.waitFor({ state: 'hidden' }); debug('Switching to stories nav tab'); await window.getByTestId('NavTabsItem--Stories').click();