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

Commit

Permalink
More assertions about threads being read
Browse files Browse the repository at this point in the history
  • Loading branch information
andybalaam committed Sep 6, 2023
1 parent 2bd1b62 commit 2662ecd
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions cypress/e2e/read-receipts/high-level.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -880,18 +880,21 @@ describe("Read receipts", () => {
goTo(room1);
receiveMessages(room2, ["Msg1", threadedOff("Msg1", "Resp1")]);
assertUnread(room2, 2);

goTo(room2);
openThread("Msg1");
assertRead(room2);
backToThreadsList();
goTo(room1);

receiveMessages(room2, [editOf("Resp1", "Edit1")]);
assertUnread(room2, 1);

// When I read it
goTo(room2);
openThread("Msg1");

// Then the room and thread are read
assertRead(room2);
assertReadThread("Msg1");
});
// XXX: fails because the room is still "bold" even though the notification counts all disappear
it.skip("Marking a room as read after an edit in a thread makes it read", () => {
Expand Down Expand Up @@ -944,19 +947,27 @@ describe("Read receipts", () => {
});

describe("thread roots", () => {
// XXX: fails because on CI we get a dot, but locally we get a count. Must be a timing issue.
it.skip("An edit of a thread root makes the room unread", () => {
it("An edit of a thread root makes the room unread", () => {
// Given I have read a thread
goTo(room1);
receiveMessages(room2, ["Msg1", threadedOff("Msg1", "Resp1")]);
assertUnread(room2, 2);

goTo(room2);
openThread("Msg1");
backToThreadsList();
assertRead(room2);
goTo(room1);

// When the thread root is edited
receiveMessages(room2, [editOf("Msg1", "Edit1")]);

// Then the room is unread
assertUnread(room2, 1);

// But the thread is read
goTo(room2);
assertRead(room2);
assertReadThread("Edit1");
});
it.skip("Reading an edit of a thread root makes the room read", () => {
// Given a fully-read thread exists
Expand Down

0 comments on commit 2662ecd

Please sign in to comment.