forked from flackr/scroll-timeline
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
infrastructure (ci, bundling) work and WPT tests with saucelabs
- Loading branch information
Showing
12 changed files
with
495 additions
and
488 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
const promise = require("selenium-webdriver"); | ||
const webdriver = require("selenium-webdriver"); | ||
const path = require("path"); | ||
const {browsers} = require("../tests.config.json"); | ||
|
||
const driversBinaries = { | ||
// TODO: selenium-webdriver package does not know Edge can run on Mac yet, driver for Mac in the path below is valid. | ||
// Error: The WebDriver for Edge could not be found on the current PATH. Please download the latest version of MicrosoftWebDriver.exe | ||
"edge": path.join(__dirname, '../local-drivers/mac/msedgedriver'), | ||
"chrome": path.join(__dirname, '../local-drivers/mac/chromedriver') | ||
} | ||
|
||
promise.USE_PROMISE_MANAGER = false; | ||
|
||
function createSeleniumDrivers ({sauceName, sauceKey, tunnelId, testEnv}) { | ||
let drivers = new Map(); | ||
if (testEnv !== 'sauce') { | ||
browsers.local.forEach(browser => { | ||
let browserConfig = require("selenium-webdriver/" + browser); | ||
browserConfig.setDefaultService(new browserConfig.ServiceBuilder(driversBinaries[browser]).build()); | ||
drivers.set(browser, new webdriver.Builder().forBrowser(browser).withCapabilities(webdriver.Capabilities[browser]())) | ||
}) | ||
return drivers; | ||
} | ||
Object.keys(browsers.sauce).forEach(browser => { | ||
let currentBrowser = browsers.sauce[browser]; | ||
drivers.set(browser, new webdriver.Builder() | ||
.withCapabilities({ | ||
browserName: currentBrowser.browserName, | ||
platformName: currentBrowser.platformName, | ||
browserVersion: currentBrowser.browserVersion, | ||
"sauce:options": { | ||
username: sauceName, | ||
accessKey: sauceKey, | ||
build: `WPT Harness Tests for ScrollTimeline ${currentBrowser.browserName} : ${currentBrowser.browserVersion} for ${currentBrowser.platformName}`, | ||
name: "WPT Harness Tests for ScrollTimeline", | ||
maxDuration: 3600, | ||
idleTimeout: 1000, | ||
tags: ["scroll-animations", "polyfill", "scroll-timeline", "wpt-harness-tests", "mocha"], | ||
'tunnelIdentifier': tunnelId | ||
}, | ||
}) | ||
.usingServer("https://ondemand.saucelabs.com/wd/hub") | ||
) | ||
}); | ||
return drivers; | ||
} | ||
|
||
module.exports = createSeleniumDrivers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.