From a0ed801d000e3533dc36167eaf98ee5d26e44b74 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 9 Jun 2026 15:06:43 +0100 Subject: [PATCH] Fix playwright modules glob --- modules/playwright.config.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/playwright.config.ts b/modules/playwright.config.ts index 6d3d13fc81..faaed244e4 100644 --- a/modules/playwright.config.ts +++ b/modules/playwright.config.ts @@ -7,10 +7,13 @@ Please see LICENSE files in the repository root for full details. import { defineConfig, devices, type Project } from "@playwright/test"; import fs, { globSync } from "node:fs"; -import path from "node:path"; +import path, { dirname } from "node:path"; +import { fileURLToPath } from "node:url"; import type { Options } from "./playwright/element-web-test.ts"; +const __dirname = dirname(fileURLToPath(import.meta.url)); + const chromeProject = { ...devices["Desktop Chrome"], channel: "chromium", @@ -42,7 +45,7 @@ playwright project. const projects: Project[] = []; // Get all the directories that hold playwright tests -const moduleTestDirectories = globSync("modules/*/e2e", {}); +const moduleTestDirectories = globSync("*/e2e", { cwd: __dirname }); // Process each directory for (const testDirectory of moduleTestDirectories) {