Revert "Factor out MessageEvent.from() usage (#9882)"

This reverts commit c09ca7b4ee.
This commit is contained in:
Travis Ralston 2023-01-10 09:20:10 -07:00
parent b4f2db22df
commit 99e38ca88e
5 changed files with 61 additions and 127 deletions

View file

@ -16,17 +16,15 @@ limitations under the License.
/// <reference types="cypress" />
import type { MsgType } from "matrix-js-sdk/src/@types/event";
import { MessageEvent } from "matrix-events-sdk";
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, {
msgtype: "m.text" as MsgType,
body: "Message",
});
return cy.sendEvent(roomId, null, "m.room.message" as EventType, MessageEvent.from("Message").serialize().content);
};
describe("Editing", () => {