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

Commit 2002f3f

Browse files
authored
Fix more tests in redactions.spec.ts (#12026)
1 parent 0d617db commit 2002f3f

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

playwright/e2e/read-receipts/redactions.spec.ts

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,7 @@ test.describe("Read receipts", () => {
329329
});
330330

331331
test.describe("in threads", () => {
332-
// XXX: fails because it flakes saying the room is unread when it should be read
333-
test.skip("Redacting the threaded message pointed to by my receipt leaves the room read", async ({
332+
test("Redacting the threaded message pointed to by my receipt leaves the room read", async ({
334333
roomAlpha: room1,
335334
roomBeta: room2,
336335
util,
@@ -339,18 +338,18 @@ test.describe("Read receipts", () => {
339338
// Given I have some threads
340339
await util.goTo(room1);
341340
await util.receiveMessages(room2, [
342-
"Root",
343-
msg.threadedOff("Root", "ThreadMsg1"),
344-
msg.threadedOff("Root", "ThreadMsg2"),
341+
"Root1",
342+
msg.threadedOff("Root1", "ThreadMsg1"),
343+
msg.threadedOff("Root1", "ThreadMsg2"),
345344
"Root2",
346345
msg.threadedOff("Root2", "Root2->A"),
347346
]);
348347
await util.assertUnread(room2, 5);
349348

350349
// And I have read them
351350
await util.goTo(room2);
352-
await util.assertUnreadThread("Root");
353-
await util.openThread("Root");
351+
await util.assertUnreadThread("Root1");
352+
await util.openThread("Root1");
354353
await util.assertUnreadLessThan(room2, 4);
355354
await util.openThread("Root2");
356355
await util.assertRead(room2);
@@ -364,7 +363,7 @@ test.describe("Read receipts", () => {
364363
// Then the room and thread are still read
365364
await util.assertStillRead(room2);
366365
await util.goTo(room2);
367-
await util.assertReadThread("Root");
366+
await util.assertReadThread("Root1");
368367
});
369368
test("Reading an unread thread after a redaction of the latest message makes it read", async ({
370369
roomAlpha: room1,
@@ -536,8 +535,7 @@ test.describe("Read receipts", () => {
536535
await util.goTo(room2);
537536
await util.assertReadThread("Root");
538537
});
539-
// XXX: fails because it flakes - sometimes the room is still unread after opening the thread (initially)
540-
test.skip("Reacting to a redacted message leaves the thread read", async ({
538+
test("Reacting to a redacted message leaves the thread read", async ({
541539
roomAlpha: room1,
542540
roomBeta: room2,
543541
util,
@@ -726,8 +724,7 @@ test.describe("Read receipts", () => {
726724
await util.goTo(room2);
727725
await util.assertReadThread("Root");
728726
});
729-
// XXX: fails because it flakes
730-
test.skip("A thread with a read redaction is still read after restart", async ({
727+
test("A thread with a read redaction is still read after restart", async ({
731728
roomAlpha: room1,
732729
roomBeta: room2,
733730
util,
@@ -736,16 +733,16 @@ test.describe("Read receipts", () => {
736733
// Given my receipt points at a redacted thread message
737734
await util.goTo(room1);
738735
await util.receiveMessages(room2, [
739-
"Root",
740-
msg.threadedOff("Root", "ThreadMsg1"),
741-
msg.threadedOff("Root", "ThreadMsg2"),
736+
"Root1",
737+
msg.threadedOff("Root1", "ThreadMsg1"),
738+
msg.threadedOff("Root1", "ThreadMsg2"),
742739
"Root2",
743740
msg.threadedOff("Root2", "Root2->A"),
744741
]);
745742
await util.assertUnread(room2, 5);
746743
await util.goTo(room2);
747-
await util.assertUnreadThread("Root");
748-
await util.openThread("Root");
744+
await util.assertUnreadThread("Root1");
745+
await util.openThread("Root1");
749746
await util.assertUnreadLessThan(room2, 4);
750747
await util.openThread("Root2");
751748
await util.assertRead(room2);
@@ -755,7 +752,7 @@ test.describe("Read receipts", () => {
755752
await util.receiveMessages(room2, [msg.redactionOf("ThreadMsg2")]);
756753
await util.assertStillRead(room2);
757754
await util.goTo(room2);
758-
await util.assertReadThread("Root");
755+
await util.assertReadThread("Root1");
759756

760757
// When I restart
761758
await util.saveAndReload();

0 commit comments

Comments
 (0)