Introduce Membership type
This commit is contained in:
parent
3c6fd58628
commit
da99bad7b9
115 changed files with 582 additions and 526 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue