Cypress tests for read receipts, threaded and unthreaded (#10872)
This commit is contained in:
parent
f758cbd38a
commit
415fcde5e8
2 changed files with 169 additions and 5 deletions
|
@ -102,6 +102,19 @@ declare global {
|
|||
* @param message the message body to send
|
||||
*/
|
||||
botSendMessage(cli: MatrixClient, roomId: string, message: string): Chainable<ISendEventResponse>;
|
||||
/**
|
||||
* Send a message as a bot into a room in a specific thread
|
||||
* @param cli The bot's MatrixClient
|
||||
* @param threadId the thread within which this message should go
|
||||
* @param roomId ID of the room to join
|
||||
* @param message the message body to send
|
||||
*/
|
||||
botSendThreadMessage(
|
||||
cli: MatrixClient,
|
||||
roomId: string,
|
||||
threadId: string,
|
||||
message: string,
|
||||
): Chainable<ISendEventResponse>;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -249,3 +262,16 @@ Cypress.Commands.add(
|
|||
);
|
||||
},
|
||||
);
|
||||
|
||||
Cypress.Commands.add(
|
||||
"botSendThreadMessage",
|
||||
(cli: MatrixClient, roomId: string, threadId: string, message: string): Chainable<ISendEventResponse> => {
|
||||
return cy.wrap(
|
||||
cli.sendMessage(roomId, threadId, {
|
||||
msgtype: "m.text",
|
||||
body: message,
|
||||
}),
|
||||
{ log: false },
|
||||
);
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue