Migrate most read-receipts tests from Cypress to Playwright (#11994)
* Migrate most read-receipts tests from Cypress to Playwright Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Disable failing test Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
236ea44cc8
commit
b691be3bee
16 changed files with 3603 additions and 3319 deletions
|
@ -52,6 +52,19 @@ export class Client {
|
|||
return this.client.evaluate(fn, arg);
|
||||
}
|
||||
|
||||
public evaluateHandle<R, Arg, O extends MatrixClient = MatrixClient>(
|
||||
pageFunction: PageFunctionOn<O, Arg, R>,
|
||||
arg: Arg,
|
||||
): Promise<JSHandle<R>>;
|
||||
public evaluateHandle<R, O extends MatrixClient = MatrixClient>(
|
||||
pageFunction: PageFunctionOn<O, void, R>,
|
||||
arg?: any,
|
||||
): Promise<JSHandle<R>>;
|
||||
public async evaluateHandle<T>(fn: (client: MatrixClient) => T, arg?: any): Promise<JSHandle<T>> {
|
||||
await this.prepareClient();
|
||||
return this.client.evaluateHandle(fn, arg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param roomId ID of the room to send the event into
|
||||
* @param threadId ID of the thread to send into or null for main timeline
|
||||
|
@ -91,6 +104,15 @@ export class Client {
|
|||
);
|
||||
}
|
||||
|
||||
public async redactEvent(roomId: string, eventId: string, reason?: string): Promise<ISendEventResponse> {
|
||||
return this.evaluate(
|
||||
async (client, { roomId, eventId, reason }) => {
|
||||
return client.redactEvent(roomId, eventId, reason);
|
||||
},
|
||||
{ roomId, eventId, reason },
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a room with given options.
|
||||
* @param options the options to apply when creating the room
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue