-
-
Notifications
You must be signed in to change notification settings - Fork 881
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nightwatch tests on Sauce Labs (#3572)
- Loading branch information
1 parent
cd7fefb
commit 6b66b09
Showing
5 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* eslint-disable import/no-commonjs, import/no-nodejs-modules */ | ||
|
||
const fs = require('fs'); | ||
|
||
const chromeManifest = require('./chrome/manifest.json'); | ||
|
||
const chromePackage = fs.readFileSync('dist/zip/chrome.zip').toString('base64'); | ||
|
||
module.exports = { | ||
src_folders: ['tests'], | ||
test_settings: { | ||
default: { | ||
selenium_host: 'ondemand.saucelabs.com', | ||
selenium_port: 80, | ||
username: process.env.SAUCE_USERNAME, | ||
access_key: process.env.SAUCE_ACCESS_KEY, | ||
desiredCapabilities: { | ||
browserName: 'chrome', | ||
version: chromeManifest.minimum_chrome_version, | ||
chromeOptions: { | ||
args: ['--no-sandbox'], | ||
extensions: [chromePackage], | ||
}, | ||
}, | ||
}, | ||
}, | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"rules": { | ||
"import/no-commonjs": 0 | ||
} | ||
} |
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,10 @@ | ||
module.exports = { | ||
'settings button exists': browser => { | ||
browser | ||
// lightweight page that still has the userbar | ||
.url('https://www.reddit.com/wiki/pages') | ||
.waitForElementVisible('#header', 1000) | ||
.waitForElementVisible('#RESSettingsButton', 1000) | ||
.end(); | ||
} | ||
}; |