Remove use of KnownMembership from playwright tests

This commit is contained in:
Andy Balaam 2024-03-18 16:32:36 +00:00
parent d3c0435446
commit 5cd7743fcb
5 changed files with 10 additions and 17 deletions

View file

@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { KnownMembership } from "matrix-js-sdk/src/types";
import type { Page } from "@playwright/test";
import { test, expect } from "../../element-web-test";
import {
@ -89,7 +87,7 @@ const bobJoin = async (page: Page, bob: Bot) => {
async function autoJoin(client: Client) {
await client.evaluate((cli) => {
cli.on(window.matrixcs.RoomMemberEvent.Membership, (event, member) => {
if (member.membership === KnownMembership.Invite && member.userId === cli.getUserId()) {
if (member.membership === "invite" && member.userId === cli.getUserId()) {
cli.joinRoom(member.roomId);
}
});