diff --git a/apps/meteor/tests/e2e/omnichannel/omnichannel-livechat-read-receipts.spec.ts b/apps/meteor/tests/e2e/omnichannel/omnichannel-livechat-read-receipts.spec.ts index a4cf2118b7eae..f8d8730597020 100644 --- a/apps/meteor/tests/e2e/omnichannel/omnichannel-livechat-read-receipts.spec.ts +++ b/apps/meteor/tests/e2e/omnichannel/omnichannel-livechat-read-receipts.spec.ts @@ -63,9 +63,13 @@ test.describe('OC - Livechat - Read Receipts', () => { }); await test.step('agent reads the message', async () => { + const markedAsRead = agentPage.waitForResponse( + (res) => /api\/v1\/subscriptions\.read(?:\/|\?|$)/.test(res.url()) && res.request().method() === 'POST', + ); await poHomeOmnichannel.navbar.openChat(visitor.name); await expect(poHomeOmnichannel.content.lastUserMessage).toBeVisible(); await expect(poHomeOmnichannel.content.lastUserMessage).toContainText(testMessage); + await markedAsRead; }); await test.step('read receipts show both agent and visitor names', async () => {