Migrate room-directory.spec.ts from Cypress to Playwright (#11997)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
f48f400361
commit
fb1a97be32
5 changed files with 96 additions and 106 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue