Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Attempt to deflake a read-receipts test (#11981)
Browse files Browse the repository at this point in the history
* Attempt to deflake a read-receipts test

Hopefully, this will fix element-hq/element-web#26679

(I think that the fourth message was arriving *after* the room was marked as
read, meaning that we ended up with two unread messages rather than one.)

* Update cypress/e2e/read-receipts/new-messages.spec.ts

* prettier
  • Loading branch information
richvdh authored Dec 1, 2023
1 parent 50c58ec commit 1f06d97
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cypress/e2e/read-receipts/new-messages.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,13 @@ describe("Read receipts", () => {
// Given 2 threads exist, and Thread2 has the latest message in it
goTo(room1);
receiveMessages(room2, ["Thread1", "Thread2", threadedOff("Thread1", "t1a")]);
// Make sure the message in Thread 1 has definitely arrived, so that we know for sure
// that the one in Thread 2 is the latest.
assertUnread(room2, 3);

receiveMessages(room2, [threadedOff("Thread2", "t2a")]);
// Make sure the 4th message has arrived before we mark as read.
assertUnread(room2, 4);

// When I mark the room as read (making an unthreaded receipt for t2a)
markAsRead(room2);
Expand Down

0 comments on commit 1f06d97

Please sign in to comment.