From 3552258e085d2d421a144668ac72e645edf261a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Fri, 10 Jun 2022 17:01:35 +0200 Subject: [PATCH] Fix tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/emojipicker/Category.tsx | 2 +- test/components/views/rooms/SendMessageComposer-test.tsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/views/emojipicker/Category.tsx b/src/components/views/emojipicker/Category.tsx index e77dfeacae60..45ed7144e0db 100644 --- a/src/components/views/emojipicker/Category.tsx +++ b/src/components/views/emojipicker/Category.tsx @@ -61,7 +61,7 @@ class Category extends React.PureComponent { onClick={onClick} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave} - disabled={this.props.isEmojiDisabled(emoji.unicode)} + disabled={this.props.isEmojiDisabled?.(emoji.unicode)} /> )) }); diff --git a/test/components/views/rooms/SendMessageComposer-test.tsx b/test/components/views/rooms/SendMessageComposer-test.tsx index 5ab7a1705e59..014f5af66ea4 100644 --- a/test/components/views/rooms/SendMessageComposer-test.tsx +++ b/test/components/views/rooms/SendMessageComposer-test.tsx @@ -48,21 +48,18 @@ const WrapWithProviders: React.FC<{ ; describe('', () => { - const defaultRoomContext = { + const defaultRoomContext: IRoomState = { roomLoading: true, peekLoading: false, shouldPeek: true, membersLoaded: false, numUnreadMessages: 0, - searching: false, - guestsCanJoin: false, canPeek: false, showApps: false, isPeeking: false, showRightPanel: true, joining: false, atEndOfLiveTimeline: true, - atEndOfLiveTimelineInit: false, showTopUnreadMessagesBar: false, statusBarVisible: false, canReact: false, @@ -82,6 +79,9 @@ describe('', () => { matrixClientIsReady: false, timelineRenderingType: TimelineRenderingType.Room, liveTimeline: undefined, + canSelfRedact: false, + resizing: false, + narrow: false, }; describe("createMessageContent", () => { const permalinkCreator = jest.fn() as any;