Revert "Revert "Factor out MessageEvent.from() usage (#9882)""
This reverts commit 99e38ca88e.
This commit is contained in:
@@ -16,15 +16,17 @@ limitations under the License.
|
||||
|
||||
/// <reference types="cypress" />
|
||||
|
||||
import { MessageEvent } from "matrix-events-sdk";
|
||||
|
||||
import type { MsgType } from "matrix-js-sdk/src/@types/event";
|
||||
import type { ISendEventResponse } from "matrix-js-sdk/src/@types/requests";
|
||||
import type { EventType } from "matrix-js-sdk/src/@types/event";
|
||||
import { SynapseInstance } from "../../plugins/synapsedocker";
|
||||
import Chainable = Cypress.Chainable;
|
||||
|
||||
const sendEvent = (roomId: string): Chainable<ISendEventResponse> => {
|
||||
return cy.sendEvent(roomId, null, "m.room.message" as EventType, MessageEvent.from("Message").serialize().content);
|
||||
return cy.sendEvent(roomId, null, "m.room.message" as EventType, {
|
||||
msgtype: "m.text" as MsgType,
|
||||
body: "Message",
|
||||
});
|
||||
};
|
||||
|
||||
describe("Editing", () => {
|
||||
|
||||
Reference in New Issue
Block a user