From 658ddfb9d54b976d4cae0ba77146d704745ed413 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 17 Jan 2024 14:02:09 +0000 Subject: [PATCH] [release/8.0] Update karma.local.conf.js (#53411) * Update karma.local.conf.js * Update karma.local.conf.js * Update karma.local.conf.js --------- Co-authored-by: Brennan --- .../scripts/karma.local.conf.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/SignalR/clients/ts/FunctionalTests/scripts/karma.local.conf.js b/src/SignalR/clients/ts/FunctionalTests/scripts/karma.local.conf.js index aff36430d900..8687904e9b7f 100644 --- a/src/SignalR/clients/ts/FunctionalTests/scripts/karma.local.conf.js +++ b/src/SignalR/clients/ts/FunctionalTests/scripts/karma.local.conf.js @@ -1,3 +1,5 @@ +const os = require('os'); + try { // Karma configuration for a local run (the default) const createKarmaConfig = require("./karma.base.conf"); @@ -45,8 +47,16 @@ try { // We use the launchers themselves to figure out if the browser exists. It's a bit sneaky, but it works. tryAddBrowser("ChromeHeadlessNoSandbox", ChromeHeadlessBrowser.prototype); tryAddBrowser("ChromiumHeadlessIgnoreCert", ChromiumHeadlessBrowser.prototype); - if (!tryAddBrowser("FirefoxHeadless", FirefoxHeadlessBrowser.prototype)) { - tryAddBrowser("FirefoxDeveloperHeadless", FirefoxDeveloperHeadlessBrowser.prototype); + + if (os.platform() !== 'darwin') { + if (!tryAddBrowser("FirefoxHeadless", FirefoxHeadlessBrowser.prototype)) { + tryAddBrowser("FirefoxDeveloperHeadless", FirefoxDeveloperHeadlessBrowser.prototype); + } + } else { + // https://bugzilla.mozilla.org/show_bug.cgi?id=1871366 + // https://bugzilla.mozilla.org/show_bug.cgi?id=1871447 + // It looks like some Entitlements issue with Firefox and macOS, additionally, it seems 'firefox-bin' is being removed which is what the karma firefox launcher uses by default + tryAddBrowser("FirefoxHeadlessMac", FirefoxHeadlessBrowser.prototype); } // We need to receive an argument from the caller, but globals don't seem to work, so we use an environment variable. @@ -71,6 +81,11 @@ try { // Ignore cert errors to allow our test cert to work (NEVER do this outside of testing) flags: ["--allow-insecure-localhost", "--ignore-certificate-errors"] + }, + FirefoxHeadlessMac: { + base: 'FirefoxHeadless', + + command: '/Applications/FireFox.app/Contents/MacOS/firefox' } }, });