You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-07 21:23:00 +03:00
Fix rejoin of knock rooms (#11980)
Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net> Co-authored-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
This commit is contained in:
@@ -172,7 +172,7 @@ describe("<RoomPreviewBar />", () => {
|
||||
it("renders kicked message", () => {
|
||||
const room = createRoom(roomId, otherUserId);
|
||||
jest.spyOn(room, "getMember").mockReturnValue(makeMockRoomMember({ isKicked: true }));
|
||||
const component = getComponent({ room, promptAskToJoin: true });
|
||||
const component = getComponent({ room, canAskToJoinAndMembershipIsLeave: true, promptAskToJoin: false });
|
||||
|
||||
expect(getMessage(component)).toMatchSnapshot();
|
||||
});
|
||||
@@ -458,6 +458,14 @@ describe("<RoomPreviewBar />", () => {
|
||||
expect(getMessage(component)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("renders the corresponding message when kicked", () => {
|
||||
const room = createRoom(roomId, otherUserId);
|
||||
jest.spyOn(room, "getMember").mockReturnValue(makeMockRoomMember({ isKicked: true }));
|
||||
const component = getComponent({ room, promptAskToJoin: true });
|
||||
|
||||
expect(getMessage(component)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("renders the corresponding message with a generic title", () => {
|
||||
const component = render(<RoomPreviewBar promptAskToJoin />);
|
||||
expect(getMessage(component)).toMatchSnapshot();
|
||||
|
Reference in New Issue
Block a user