diff --git a/test/components/views/messages/DateSeparator-test.tsx b/test/components/views/messages/DateSeparator-test.tsx index 8e5b7ea3ca..abd809ac95 100644 --- a/test/components/views/messages/DateSeparator-test.tsx +++ b/test/components/views/messages/DateSeparator-test.tsx @@ -36,6 +36,7 @@ describe("DateSeparator", () => { const defaultProps = { ts: nowMs, now, + roomId: "!unused:example.org", }; const RealDate = global.Date; class MockDate extends Date { diff --git a/test/components/views/messages/MPollBody-test.tsx b/test/components/views/messages/MPollBody-test.tsx index 28c0ceea34..5fa55cd46f 100644 --- a/test/components/views/messages/MPollBody-test.tsx +++ b/test/components/views/messages/MPollBody-test.tsx @@ -1072,6 +1072,14 @@ function newMPollBodyFromEvent( } } } + + // We don't use any of these props, but they're required. + highlightLink="unused" + highlights={[]} + mediaEventHelper={null} + onHeightChanged={() => {}} + onMessageAllowed={() => {}} + permalinkCreator={null} />, { wrappingComponent: MatrixClientContext.Provider, wrappingComponentProps: { diff --git a/test/components/views/messages/__snapshots__/DateSeparator-test.tsx.snap b/test/components/views/messages/__snapshots__/DateSeparator-test.tsx.snap index c1ce2c860c..d848ae092f 100644 --- a/test/components/views/messages/__snapshots__/DateSeparator-test.tsx.snap +++ b/test/components/views/messages/__snapshots__/DateSeparator-test.tsx.snap @@ -3,6 +3,7 @@ exports[`DateSeparator renders the date separator correctly 1`] = `

for types because it'll annoy TS more than it helps. +const mockProps: React.ComponentProps = { + addEmoji: () => false, + haveRecording: false, + isStickerPickerOpen: false, + menuPosition: null, + onRecordStartEndClick: () => {}, + setStickerPickerOpen: () => {}, + toggleButtonMenu: () => {}, +}; + describe("MessageComposerButtons", () => { it("Renders emoji and upload buttons in wide mode", () => { const buttons = wrapAndRender( @@ -35,7 +47,7 @@ describe("MessageComposerButtons", () => { showLocationButton={true} showPollsButton={true} showStickersButton={true} - toggleButtonMenu={() => {}} + {...mockProps} />, false, ); @@ -54,7 +66,7 @@ describe("MessageComposerButtons", () => { showLocationButton={true} showPollsButton={true} showStickersButton={true} - toggleButtonMenu={() => {}} + {...mockProps} />, false, ); @@ -79,7 +91,7 @@ describe("MessageComposerButtons", () => { showLocationButton={true} showPollsButton={true} showStickersButton={true} - toggleButtonMenu={() => {}} + {...mockProps} />, true, ); @@ -97,7 +109,7 @@ describe("MessageComposerButtons", () => { showLocationButton={true} showPollsButton={true} showStickersButton={true} - toggleButtonMenu={() => {}} + {...mockProps} />, true, ); @@ -122,7 +134,7 @@ describe("MessageComposerButtons", () => { showLocationButton={true} showPollsButton={true} showStickersButton={true} - toggleButtonMenu={() => {}} + {...mockProps} />, true, ); @@ -146,7 +158,7 @@ describe("MessageComposerButtons", () => { showLocationButton={true} showPollsButton={false} // !! the change from the alternate test showStickersButton={true} - toggleButtonMenu={() => {}} + {...mockProps} />, true, );