Migrate room-directory.spec.ts from Cypress to Playwright (#11997)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
f48f400361
commit
fb1a97be32
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user