You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-30 02:21:17 +03:00
Update tests in anticipation of matrix-js-sdk#3901 (#11956)
* Update tests in anticipation of matrix-js-sdk#3901 * Formatting
This commit is contained in:
@ -106,6 +106,21 @@ describe("LegacyRoomHeaderButtons-test.tsx", function () {
|
||||
authorId: client.getUserId()!,
|
||||
participantUserIds: ["@alice:example.org"],
|
||||
});
|
||||
// We need some receipt, otherwise we treat this thread as
|
||||
// "older than all threaded receipts" and consider it read.
|
||||
let receipt = new MatrixEvent({
|
||||
type: "m.receipt",
|
||||
room_id: room.roomId,
|
||||
content: {
|
||||
[events[0].getId()!]: {
|
||||
// Receipt for the first event in the thread
|
||||
[ReceiptType.Read]: {
|
||||
[client.getUserId()!]: { ts: 1, thread_id: rootEvent.getId() },
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
room.addReceipt(receipt);
|
||||
expect(isIndicatorOfType(container, "bold")).toBe(true);
|
||||
|
||||
// Sending the last event should clear the notification.
|
||||
@ -145,7 +160,7 @@ describe("LegacyRoomHeaderButtons-test.tsx", function () {
|
||||
expect(isIndicatorOfType(container, "bold")).toBe(true);
|
||||
|
||||
// Sending a read receipt on an earlier event shouldn't do anything.
|
||||
let receipt = new MatrixEvent({
|
||||
receipt = new MatrixEvent({
|
||||
type: "m.receipt",
|
||||
room_id: room.roomId,
|
||||
content: {
|
||||
|
Reference in New Issue
Block a user