From e87a069808c4262a9090727a4a316f015cf7607b Mon Sep 17 00:00:00 2001 From: Jeshurun Hembd Date: Wed, 4 Jun 2025 16:24:05 -0400 Subject: [PATCH 1/3] Update playwright version, yargs syntax --- Specs/e2e/playwright.config.js | 21 ++++++++++++--------- gulpfile.js | 2 +- package.json | 2 +- server.js | 3 ++- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Specs/e2e/playwright.config.js b/Specs/e2e/playwright.config.js index 84c0884bbcac..4540aa021145 100644 --- a/Specs/e2e/playwright.config.js +++ b/Specs/e2e/playwright.config.js @@ -1,14 +1,16 @@ import { defineConfig, devices } from "@playwright/test"; import yargs from "yargs"; -const argv = yargs(process.argv).options({ - "update-snapshots": { - alias: "u", - description: "Update test snapshots.", - type: "boolean", - default: false, - }, -}).argv; +const argv = yargs(process.argv) + .options({ + "update-snapshots": { + alias: "u", + description: "Update test snapshots.", + type: "boolean", + default: false, + }, + }) + .parse(); const baseUrl = `http://localhost:3000`; const updateSnapshots = argv["update-snapshots"]; @@ -56,7 +58,8 @@ export default defineConfig({ viewport: defaultViewport, launchOptions: { // this forces chrome to use the gpu for webgl which greatly speeds up tests - args: ["--use-angle=gl"], + args: ["--ignore-gpu-blocklist", "--use-angle=gl"], + executablePath: "/snap/bin/chromium", }, }, }, diff --git a/gulpfile.js b/gulpfile.js index d31536b635e5..5ec495db241b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -54,7 +54,7 @@ const noDevelopmentGallery = taskName === "release" || taskName === "makeZip" || taskName === "websiteRelease"; -const argv = yargs(process.argv).argv; +const argv = yargs(process.argv).parse(); const verbose = argv.verbose; const sourceFiles = [ diff --git a/package.json b/package.json index 82c4fac0727b..1fb578df63e9 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ }, "devDependencies": { "@cesium/eslint-config": "^12.0.0", - "@playwright/test": "^1.41.1", + "@playwright/test": "^1.52.0", "chokidar": "^4.0.1", "cloc": "^2.4.0-cloc", "compression": "^1.7.4", diff --git a/server.js b/server.js index f536cd4b5acf..105e1f818aa8 100644 --- a/server.js +++ b/server.js @@ -44,7 +44,8 @@ const argv = yargs(process.argv) description: "If true, skip build step and serve existing built files.", }, }) - .help().argv; + .help() + .parse(); const outputDirectory = path.join("Build", "CesiumDev"); From b8ee60182e28c51b2f3cf66242f5a9ff6159222f Mon Sep 17 00:00:00 2001 From: Jeshurun Hembd Date: Wed, 4 Jun 2025 17:58:43 -0400 Subject: [PATCH 2/3] Revert GPU args in playwright launch config --- Specs/e2e/playwright.config.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Specs/e2e/playwright.config.js b/Specs/e2e/playwright.config.js index 4540aa021145..b026485cdfd0 100644 --- a/Specs/e2e/playwright.config.js +++ b/Specs/e2e/playwright.config.js @@ -58,8 +58,7 @@ export default defineConfig({ viewport: defaultViewport, launchOptions: { // this forces chrome to use the gpu for webgl which greatly speeds up tests - args: ["--ignore-gpu-blocklist", "--use-angle=gl"], - executablePath: "/snap/bin/chromium", + args: ["--use-angle=gl"], }, }, }, From 2d0e881db04cd6449b80d40c30496e419f89fb75 Mon Sep 17 00:00:00 2001 From: Jeshurun Hembd Date: Thu, 5 Jun 2025 16:15:41 -0400 Subject: [PATCH 3/3] Update playwright config for new Chrome headless --- Specs/e2e/playwright.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Specs/e2e/playwright.config.js b/Specs/e2e/playwright.config.js index b026485cdfd0..0d3e7eba0be0 100644 --- a/Specs/e2e/playwright.config.js +++ b/Specs/e2e/playwright.config.js @@ -55,10 +55,11 @@ export default defineConfig({ name: "chromium", use: { ...devices["Desktop Chrome"], + channel: "chromium", viewport: defaultViewport, launchOptions: { // this forces chrome to use the gpu for webgl which greatly speeds up tests - args: ["--use-angle=gl"], + args: ["--use-angle=gl", "--enable-features=Vulkan"], }, }, },