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
Introduce Membership type
This commit is contained in:
committed by
Andy Balaam
parent
3c6fd58628
commit
da99bad7b9
@ -119,7 +119,7 @@ describe("RoomNotificationState", () => {
|
||||
|
||||
muteRoom(room);
|
||||
setUnreads(room, 1234, 0);
|
||||
room.updateMyMembership("join"); // emit
|
||||
room.updateMyMembership(Membership.Join); // emit
|
||||
|
||||
expect(roomNotifState.level).toBe(NotificationLevel.None);
|
||||
expect(roomNotifState.symbol).toBe(null);
|
||||
@ -129,7 +129,7 @@ describe("RoomNotificationState", () => {
|
||||
it("suggests a red ! if the user has been invited to a room", () => {
|
||||
const roomNotifState = new RoomNotificationState(room, false);
|
||||
|
||||
room.updateMyMembership("invite"); // emit
|
||||
room.updateMyMembership(Membership.Invite); // emit
|
||||
|
||||
expect(roomNotifState.level).toBe(NotificationLevel.Highlight);
|
||||
expect(roomNotifState.symbol).toBe("!");
|
||||
@ -140,7 +140,7 @@ describe("RoomNotificationState", () => {
|
||||
const roomNotifState = new RoomNotificationState(room, false);
|
||||
|
||||
setUnreads(room, 4321, 0);
|
||||
room.updateMyMembership("join"); // emit
|
||||
room.updateMyMembership(Membership.Join); // emit
|
||||
|
||||
expect(roomNotifState.level).toBe(NotificationLevel.Notification);
|
||||
expect(roomNotifState.symbol).toBe(null);
|
||||
@ -151,7 +151,7 @@ describe("RoomNotificationState", () => {
|
||||
const roomNotifState = new RoomNotificationState(room, false);
|
||||
|
||||
setUnreads(room, 0, 69);
|
||||
room.updateMyMembership("join"); // emit
|
||||
room.updateMyMembership(Membership.Join); // emit
|
||||
|
||||
expect(roomNotifState.level).toBe(NotificationLevel.Highlight);
|
||||
expect(roomNotifState.symbol).toBe(null);
|
||||
@ -171,7 +171,7 @@ describe("RoomNotificationState", () => {
|
||||
);
|
||||
|
||||
addThread(room);
|
||||
room.updateMyMembership("join"); // emit
|
||||
room.updateMyMembership(Membership.Join); // emit
|
||||
|
||||
expect(roomNotifState.level).toBe(NotificationLevel.Activity);
|
||||
expect(roomNotifState.symbol).toBe(null);
|
||||
|
Reference in New Issue
Block a user