From f6c6c49e479b157fe8024580adc19147943db8f7 Mon Sep 17 00:00:00 2001 From: Wesley Luyten Date: Tue, 17 Sep 2024 15:11:21 -0500 Subject: [PATCH] tests: fix tests by using Chrome --headless=old --- .../mux-active-viewer-count/test/web-test-runner.config.mjs | 2 ++ packages/mux-audio/test/web-test-runner.config.mjs | 2 ++ packages/mux-player/test/web-test-runner.config.mjs | 2 ++ packages/mux-uploader/package.json | 1 + packages/mux-uploader/test/web-test-runner.config.mjs | 2 ++ packages/mux-video/test/web-test-runner.config.mjs | 2 ++ packages/playback-core/test/web-test-runner.config.mjs | 2 ++ 7 files changed, 13 insertions(+) diff --git a/packages/mux-active-viewer-count/test/web-test-runner.config.mjs b/packages/mux-active-viewer-count/test/web-test-runner.config.mjs index 155c4d336..35e2c572f 100644 --- a/packages/mux-active-viewer-count/test/web-test-runner.config.mjs +++ b/packages/mux-active-viewer-count/test/web-test-runner.config.mjs @@ -1,5 +1,6 @@ import { esbuildPlugin } from '@web/dev-server-esbuild'; import { importMapsPlugin } from '@web/dev-server-import-maps'; +import { chromeLauncher } from '@web/test-runner'; export default { nodeResolve: true, @@ -23,4 +24,5 @@ export default { report: true, include: ['src/**/*'], }, + browsers: [chromeLauncher({ launchOptions: { args: ['--headless=old'] } })], }; diff --git a/packages/mux-audio/test/web-test-runner.config.mjs b/packages/mux-audio/test/web-test-runner.config.mjs index f6ae8f631..27bdda3de 100644 --- a/packages/mux-audio/test/web-test-runner.config.mjs +++ b/packages/mux-audio/test/web-test-runner.config.mjs @@ -1,5 +1,6 @@ import { esbuildPlugin } from '@web/dev-server-esbuild'; import { importMapsPlugin } from '@web/dev-server-import-maps'; +import { chromeLauncher } from '@web/test-runner'; export default { nodeResolve: true, @@ -23,4 +24,5 @@ export default { report: true, include: ['src/**/*'], }, + browsers: [chromeLauncher({ launchOptions: { args: ['--headless=old'] } })], }; diff --git a/packages/mux-player/test/web-test-runner.config.mjs b/packages/mux-player/test/web-test-runner.config.mjs index e73a1da5e..ed8b801bb 100644 --- a/packages/mux-player/test/web-test-runner.config.mjs +++ b/packages/mux-player/test/web-test-runner.config.mjs @@ -1,5 +1,6 @@ import { esbuildPlugin } from '@web/dev-server-esbuild'; import { importMapsPlugin } from '@web/dev-server-import-maps'; +import { chromeLauncher } from '@web/test-runner'; import { playwrightLauncher } from '@web/test-runner-playwright'; const config = { @@ -25,6 +26,7 @@ const config = { include: ['src/**/*'], }, testsFinishTimeout: 600000, + browsers: [chromeLauncher({ launchOptions: { args: ['--headless=old'] } })], }; if (process.argv.some((arg) => arg.includes('--all'))) { diff --git a/packages/mux-uploader/package.json b/packages/mux-uploader/package.json index 10ab720bf..b0170262a 100644 --- a/packages/mux-uploader/package.json +++ b/packages/mux-uploader/package.json @@ -73,6 +73,7 @@ "@open-wc/testing": "^4.0.0", "@web/dev-server-esbuild": "^1.0.2", "@web/dev-server-import-maps": "^0.2.1", + "@web/test-runner": "^0.18.2", "copyfiles": "^2.4.1", "downlevel-dts": "^0.11.0", "esbuild": "^0.19.8", diff --git a/packages/mux-uploader/test/web-test-runner.config.mjs b/packages/mux-uploader/test/web-test-runner.config.mjs index 0edfc229c..4aefa0757 100644 --- a/packages/mux-uploader/test/web-test-runner.config.mjs +++ b/packages/mux-uploader/test/web-test-runner.config.mjs @@ -1,5 +1,6 @@ import { esbuildPlugin } from '@web/dev-server-esbuild'; import { importMapsPlugin } from '@web/dev-server-import-maps'; +import { chromeLauncher } from '@web/test-runner'; export default { testFramework: { @@ -29,4 +30,5 @@ export default { report: true, include: ['src/**/*'], }, + browsers: [chromeLauncher({ launchOptions: { args: ['--headless=old'] } })], }; diff --git a/packages/mux-video/test/web-test-runner.config.mjs b/packages/mux-video/test/web-test-runner.config.mjs index 96b4f6b78..dda4c3284 100644 --- a/packages/mux-video/test/web-test-runner.config.mjs +++ b/packages/mux-video/test/web-test-runner.config.mjs @@ -1,5 +1,6 @@ import { esbuildPlugin } from '@web/dev-server-esbuild'; import { importMapsPlugin } from '@web/dev-server-import-maps'; +import { chromeLauncher } from '@web/test-runner'; export default { nodeResolve: true, @@ -23,4 +24,5 @@ export default { report: true, include: ['src/**/*'], }, + browsers: [chromeLauncher({ launchOptions: { args: ['--headless=old'] } })], }; diff --git a/packages/playback-core/test/web-test-runner.config.mjs b/packages/playback-core/test/web-test-runner.config.mjs index 600755c8f..250bc865f 100644 --- a/packages/playback-core/test/web-test-runner.config.mjs +++ b/packages/playback-core/test/web-test-runner.config.mjs @@ -1,5 +1,6 @@ import { esbuildPlugin } from '@web/dev-server-esbuild'; import { importMapsPlugin } from '@web/dev-server-import-maps'; +import { chromeLauncher } from '@web/test-runner'; export default { nodeResolve: true, @@ -23,4 +24,5 @@ export default { report: true, include: ['src/**/*'], }, + browsers: [chromeLauncher({ launchOptions: { args: ['--headless=old'] } })], };