Migrate read-receipts.spec.ts from Cypress to Playwright (#11995)
* Migrate read-receipts.spec.ts from Cypress to Playwright Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update client.ts * Serialise test message sending Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
447d2ce415
commit
99b580d501
4 changed files with 359 additions and 374 deletions
|
@ -19,14 +19,12 @@ limitations under the License.
|
|||
import type {
|
||||
MatrixClient,
|
||||
Room,
|
||||
MatrixEvent,
|
||||
IContent,
|
||||
FileType,
|
||||
Upload,
|
||||
UploadOpts,
|
||||
ICreateRoomOpts,
|
||||
ISendEventResponse,
|
||||
ReceiptType,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import Chainable = Cypress.Chainable;
|
||||
import { UserCredentials } from "./login";
|
||||
|
@ -76,13 +74,6 @@ declare global {
|
|||
eventType: string,
|
||||
content: IContent,
|
||||
): Chainable<ISendEventResponse>;
|
||||
/**
|
||||
* @param {MatrixEvent} event
|
||||
* @param {ReceiptType} receiptType
|
||||
* @param {boolean} unthreaded
|
||||
* @return {module:http-api.MatrixError} Rejects: with an error response.
|
||||
*/
|
||||
sendReadReceipt(event: MatrixEvent, receiptType?: ReceiptType, unthreaded?: boolean): Chainable<{}>;
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {module:client.callback} callback Optional.
|
||||
|
@ -209,15 +200,6 @@ Cypress.Commands.add(
|
|||
},
|
||||
);
|
||||
|
||||
Cypress.Commands.add(
|
||||
"sendReadReceipt",
|
||||
(event: MatrixEvent, receiptType?: ReceiptType, unthreaded?: boolean): Chainable<{}> => {
|
||||
return cy.getClient().then(async (cli: MatrixClient) => {
|
||||
return cli.sendReadReceipt(event, receiptType, unthreaded);
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
Cypress.Commands.add("setDisplayName", (name: string): Chainable<{}> => {
|
||||
return cy.getClient().then(async (cli: MatrixClient) => {
|
||||
return cli.setDisplayName(name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue