Migrate room-directory.spec.ts from Cypress to Playwright (#11997)

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2023-12-05 15:20:20 +00:00 committed by GitHub
parent f48f400361
commit fb1a97be32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 96 additions and 106 deletions

View file

@ -25,6 +25,7 @@ import type {
Room,
MatrixEvent,
ReceiptType,
IRoomDirectoryOptions,
} from "matrix-js-sdk/src/matrix";
export class Client {
@ -223,4 +224,11 @@ export class Client {
{ event, receiptType, unthreaded },
);
}
public async publicRooms(options?: IRoomDirectoryOptions): ReturnType<MatrixClient["publicRooms"]> {
const client = await this.prepareClient();
return await client.evaluate((client, options) => {
return client.publicRooms(options);
}, options);
}
}