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

Commit

Permalink
Test for reading a thread containing an earlier redaction
Browse files Browse the repository at this point in the history
  • Loading branch information
andybalaam committed Sep 8, 2023
1 parent 37acc8e commit 4b318b0
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions cypress/e2e/read-receipts/high-level.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ describe("Read receipts", () => {
assertReadThread("Root");
});

// XXX: fails because the unread count is still 1 when it should be 0
// XXX: fails because the unread count is still 1 when it should be 0 (this is a genuine stuck unread case)
it.skip("Reading an unread thread after a redaction of the latest message makes it read", () => {
// Given an unread thread where the latest message was redacted
goTo(room1);
Expand Down Expand Up @@ -1240,7 +1240,28 @@ describe("Read receipts", () => {
// Then the room is still read
assertRead(room2);
});
it.skip("Reading an unread thread after a redaction of an older message makes it read", () => {});
// XXX: fails because the unread count is still 1 when it should be 0
it.skip("Reading an unread thread after a redaction of an older message makes it read", () => {
// Given an unread thread where an older message was redacted
goTo(room1);
receiveMessages(room2, ["Root", threadedOff("Root", "ThreadMsg1"), threadedOff("Root", "ThreadMsg2")]);
assertUnread(room2, 3);
receiveMessages(room2, [redactionOf("ThreadMsg1")]);
assertUnread(room2, 2);
goTo(room2);
assertUnreadThread("Root");

// When I read the thread
openThread("Root");
assertRead(room2);
closeThreadsPanel();
goTo(room1);

// Then the thread is read
assertRead(room2);
goTo(room2);
assertReadThread("Root");
});
it.skip("Marking an unread thread as read after a redaction makes it read", () => {});
it.skip("Sending and redacting a message after marking the thread as read makes it unread", () => {});
it.skip("?? Redacting a message after marking the thread as read makes it unread", () => {});
Expand Down

0 comments on commit 4b318b0

Please sign in to comment.