You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
add fallback reply for poll start (#10380)
This commit is contained in:
@ -26,7 +26,7 @@ import {
|
||||
stripHTMLReply,
|
||||
stripPlainReply,
|
||||
} from "../src/utils/Reply";
|
||||
import { mkEvent } from "./test-utils";
|
||||
import { makePollStartEvent, mkEvent } from "./test-utils";
|
||||
import { RoomPermalinkCreator } from "../src/utils/permalinks/Permalinks";
|
||||
|
||||
function makeTestEvent(type: string, content: IContent): MatrixEvent {
|
||||
@ -160,6 +160,12 @@ But this is not
|
||||
|
||||
expect(getNestedReplyText(event, mockPermalinkGenerator)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("should create the expected fallback text for poll start events", () => {
|
||||
const event = makePollStartEvent("Will this test pass?", "@user:server.org");
|
||||
|
||||
expect(getNestedReplyText(event, mockPermalinkGenerator)).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
||||
describe("shouldDisplayReply", () => {
|
||||
|
Reference in New Issue
Block a user