From e4524b3548b88eec2b0a6e4aed8e8b4b058b163b Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Thu, 31 Aug 2023 16:47:07 +0100 Subject: [PATCH] Expand a thread reply test to be more explicit --- cypress/e2e/read-receipts/high-level.spec.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/read-receipts/high-level.spec.ts b/cypress/e2e/read-receipts/high-level.spec.ts index e405c2c2007..172a28c19f4 100644 --- a/cypress/e2e/read-receipts/high-level.spec.ts +++ b/cypress/e2e/read-receipts/high-level.spec.ts @@ -670,9 +670,18 @@ describe("Read receipts", () => { }); it.skip("Reading a thread root within the thread view marks it as read in the main timeline", () => {}); it("Creating a new thread based on a reply makes the room unread", () => { + // Given a message and reply exist and are read goTo(room1); - receiveMessages(room2, ["Msg1", replyTo("Msg1", "Reply1"), threadedOff("Reply1", "Resp1")]); - assertUnread(room2, 3); + receiveMessages(room2, ["Msg1", replyTo("Msg1", "Reply1")]); + goTo(room2); + goTo(room1); + assertRead(room2); + + // When I receive a thread message created on the reply + receiveMessages(room2, [threadedOff("Reply1", "Resp1")]); + + // Then the room is unread + assertUnread(room2, 1); }); it("Reading a thread whose root is a reply makes the room read", () => { goTo(room1);