Skip to content

Commit

Permalink
Set env variables for browser tests on push
Browse files Browse the repository at this point in the history
  • Loading branch information
aarong committed Feb 14, 2024
1 parent bf1ac38 commit 71f1f71
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions tests/browsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,16 +378,17 @@ import util from "util";

// Start Sauce Connect proxy if you aren't on Travis
let sauceConnectProcess;
if (process.env.CI) {
console.log("Running on Travis - no need to start Sauce Connect proxy.");
} else {
console.log("Starting Sauce Connect proxy...");
sauceConnectProcess = await util.promisify(sauceConnectLauncher)({
tunnelIdentifier: sauceTunnelId,
logFile: null,
});
console.log("Sauce Connect proxy started.");
}
// if (process.env.CI) {
// console.log("Running on Travis - no need to start Sauce Connect proxy.");
// } else {
console.log("Starting Sauce Connect proxy...");
// eslint-disable-next-line
sauceConnectProcess = await util.promisify(sauceConnectLauncher)({
tunnelIdentifier: sauceTunnelId,
logFile: null,
});
console.log("Sauce Connect proxy started.");
// }

// If you're running in sauce-live mode then stop here
if (mode === "sauce-live") {
Expand Down Expand Up @@ -538,14 +539,14 @@ import util from "util";

browser: {
name: "chrome", /// //////////////////////////// What does this do on Sauce? Does control local
version: "latest", // This does nothing
// version: "latest", // This does nothing
useRemoteSeleniumGrid: true,
remoteSeleniumGrid: {
// Jasmine Browser Runner passes this object as "capabilities" input to Sauce (excluding URL)
url: "https://ondemand.saucelabs.com/wd/hub",
platformName: "macOS 12",

browserName: "chrome", // This does nothing, probably overwritten by browser.name
// browserName: "chrome", // This does nothing, probably overwritten by browser.name
browserVersion: "latest", // This setting works!

"sauce:options": {
Expand Down

0 comments on commit 71f1f71

Please sign in to comment.