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

Fill cypress test high-level.spec.ts > A receipt for the last unimportant event makes the room read, even if all are unimportant #11830

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions cypress/e2e/read-receipts/high-level.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ describe("Read receipts", () => {
assertRead(room2);
goTo(room1);

// When we receive important messages
// When we receive unimportant messages
receiveMessages(room2, [customEvent("org.custom.event", { body: "foobar" })]);

// Then the room is still read
Expand All @@ -168,7 +168,23 @@ describe("Read receipts", () => {
// The room is unread again
assertUnread(room2, 1);
});
it.skip("A receipt for the last unimportant event makes the room read, even if all are unimportant", () => {});
it("A receipt for the last unimportant event makes the room read, even if all are unimportant", () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if the intention of this test was that the room should start off unread?

@andybalaam as the guardian of these tests I think this is one for you

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is just to say that unimportant events that are read don't make the room unread, so I think this is good modulo the comment I made.

// Display room 1
goTo(room1);

// The room 2 is read
assertRead(room2);

// We received 3 unimportant messages to room2
receiveMessages(room2, [
customEvent("org.custom.event", { body: "foobar1" }),
customEvent("org.custom.event", { body: "foobar2" }),
customEvent("org.custom.event", { body: "foobar3" }),
]);

// The room 2 is still read
assertStillRead(room2);
});
});

describe("Paging up", () => {
Expand Down