From 41a0e5dd189f7c579faea1ff499af5d8ec3251c4 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 5 Feb 2026 12:30:58 +0000 Subject: [PATCH] Update playwright tests for esm compat Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- playwright/e2e/crypto/migration.spec.ts | 4 ++++ playwright/plugins/oauth_server/index.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/playwright/e2e/crypto/migration.spec.ts b/playwright/e2e/crypto/migration.spec.ts index 86072fccc0..191568c29c 100644 --- a/playwright/e2e/crypto/migration.spec.ts +++ b/playwright/e2e/crypto/migration.spec.ts @@ -8,9 +8,13 @@ Please see LICENSE files in the repository root for full details. import path from "path"; import { readFile } from "node:fs/promises"; +import { dirname } from "node:path"; +import { fileURLToPath } from "node:url"; import { expect, test } from "../../element-web-test"; +const __dirname = dirname(fileURLToPath(import.meta.url)); + test.describe("migration", { tag: "@no-webkit" }, function () { test.use({ displayName: "Alice", diff --git a/playwright/plugins/oauth_server/index.ts b/playwright/plugins/oauth_server/index.ts index 446426a9c1..16aad2f027 100644 --- a/playwright/plugins/oauth_server/index.ts +++ b/playwright/plugins/oauth_server/index.ts @@ -11,6 +11,10 @@ import express from "express"; import { type AddressInfo } from "net"; import { type TestInfo } from "@playwright/test"; import { randB64Bytes } from "@element-hq/element-web-playwright-common/lib/utils/rand.js"; +import { dirname } from "node:path"; +import { fileURLToPath } from "node:url"; + +const __dirname = dirname(fileURLToPath(import.meta.url)); export class OAuthServer { private server?: http.Server;