Skip to content

Commit eb7591e

Browse files
[release/7.0] Update karma.local.conf.js (#53410)
* Update karma.local.conf.js * Update karma.local.conf.js * Update karma.local.conf.js --------- Co-authored-by: Brennan <[email protected]>
1 parent 74466e7 commit eb7591e

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

src/SignalR/clients/ts/FunctionalTests/scripts/karma.local.conf.js

+17-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const os = require('os');
2+
13
try {
24
// Karma configuration for a local run (the default)
35
const createKarmaConfig = require("./karma.base.conf");
@@ -45,8 +47,16 @@ try {
4547
// We use the launchers themselves to figure out if the browser exists. It's a bit sneaky, but it works.
4648
tryAddBrowser("ChromeHeadlessNoSandbox", ChromeHeadlessBrowser.prototype);
4749
tryAddBrowser("ChromiumHeadlessIgnoreCert", ChromiumHeadlessBrowser.prototype);
48-
if (!tryAddBrowser("FirefoxHeadless", FirefoxHeadlessBrowser.prototype)) {
49-
tryAddBrowser("FirefoxDeveloperHeadless", FirefoxDeveloperHeadlessBrowser.prototype);
50+
51+
if (os.platform() !== 'darwin') {
52+
if (!tryAddBrowser("FirefoxHeadless", FirefoxHeadlessBrowser.prototype)) {
53+
tryAddBrowser("FirefoxDeveloperHeadless", FirefoxDeveloperHeadlessBrowser.prototype);
54+
}
55+
} else {
56+
// https://bugzilla.mozilla.org/show_bug.cgi?id=1871366
57+
// https://bugzilla.mozilla.org/show_bug.cgi?id=1871447
58+
// 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
59+
tryAddBrowser("FirefoxHeadlessMac", FirefoxHeadlessBrowser.prototype);
5060
}
5161

5262
// 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 {
7181

7282
// Ignore cert errors to allow our test cert to work (NEVER do this outside of testing)
7383
flags: ["--allow-insecure-localhost", "--ignore-certificate-errors"]
84+
},
85+
FirefoxHeadlessMac: {
86+
base: 'FirefoxHeadless',
87+
88+
command: '/Applications/FireFox.app/Contents/MacOS/firefox'
7489
}
7590
},
7691
});

0 commit comments

Comments
 (0)