-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
5,039 additions
and
3,055 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
# OS generated files # | ||
.DS_Store | ||
tests_output | ||
ehthumbs.db | ||
Icon? | ||
Thumbs.db |
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 |
---|---|---|
@@ -1,36 +1,37 @@ | ||
module.exports = { | ||
"root": true, | ||
"parser": 'babel-eslint', | ||
"parserOptions": { | ||
"sourceType": 'module' | ||
root: true, | ||
parser: 'babel-eslint', | ||
parserOptions: { | ||
sourceType: 'module', | ||
}, | ||
"env": { | ||
"browser": true | ||
env: { | ||
browser: true, | ||
}, | ||
"extends": 'airbnb-base', | ||
"plugins": [], | ||
"globals": { | ||
"window": true | ||
extends: 'airbnb-base', | ||
plugins: [], | ||
globals: { | ||
window: true, | ||
}, | ||
"rules": { | ||
"semi-style": 0, | ||
"no-cond-assign": 0, | ||
"no-plusplus": 0, | ||
"no-restricted-syntax": 0, | ||
"global-require": 0, | ||
"no-continue": 0, | ||
"no-multi-assign": 0, | ||
"no-empty": 0, | ||
"guard-for-in": 0, | ||
"camelcase": 0, | ||
"consistent-return": 0, | ||
"no-confusing-arrow": 0, | ||
"no-extra-boolean-cast": 0, | ||
"no-lonely-if": 0, | ||
"no-underscore-dangle": 0, | ||
"import/prefer-default-export": 0, | ||
rules: { | ||
'semi-style': 0, | ||
'no-cond-assign': 0, | ||
'no-plusplus': 0, | ||
'no-restricted-syntax': 0, | ||
'global-require': 0, | ||
'no-continue': 0, | ||
'no-multi-assign': 0, | ||
'no-empty': 0, | ||
'guard-for-in': 0, | ||
'camelcase': 0, | ||
'quote-props': 0, | ||
'consistent-return': 0, | ||
'no-confusing-arrow': 0, | ||
'no-extra-boolean-cast': 0, | ||
'no-lonely-if': 0, | ||
'no-underscore-dangle': 0, | ||
'import/prefer-default-export': 0, | ||
'import/extensions': ['error', 'always', { | ||
"js": "never" | ||
}] | ||
} | ||
js: 'never', | ||
}], | ||
}, | ||
}; |
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 |
---|---|---|
|
@@ -12,3 +12,4 @@ selenium-debug.log | |
selenium-server.log | ||
local.log | ||
sauce_connect.log | ||
tests_output |
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 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 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,53 @@ | ||
#!/usr/bin/env node | ||
|
||
const Nightwatch = require('nightwatch'); | ||
const browserstack = require('browserstack-local'); | ||
const serveStatic = require('serve-static'); | ||
const connect = require('connect'); | ||
const http = require('http'); | ||
const path = require('path'); | ||
let bs_local; | ||
let httpServer; | ||
|
||
// eslint-disable-next-line | ||
const logger = console.log; | ||
|
||
try { | ||
logger("Start server"); | ||
|
||
const app = connect().use(serveStatic(path.resolve('./'))); | ||
httpServer = http.createServer(app).listen(9000, () => { | ||
process.mainModule.filename = "./node_modules/nightwatch/bin/nightwatch" | ||
// Code to start browserstack local before start of test | ||
|
||
logger("Connecting local"); | ||
Nightwatch.bs_local = bs_local = new browserstack.Local(); | ||
|
||
bs_local.start({'key': process.env.BROWSERSTACK_ACCESS_KEY }, (error) => { | ||
if (error) { | ||
throw error; | ||
} | ||
|
||
logger('Connected. Now testing...'); | ||
|
||
Nightwatch.cli((argv) => { | ||
Nightwatch.CliRunner(argv) | ||
.setup(null, () => { | ||
// Code to stop browserstack local after end of parallel test | ||
bs_local.stop(() => {}); | ||
}) | ||
.runTests(() => { | ||
// Code to stop browserstack local after end of single test | ||
bs_local.stop(() => { | ||
logger("Stop Server"); | ||
httpServer.close(); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
} catch (ex) { | ||
logger('There was an error while starting the test runner:\n\n'); | ||
process.stderr.write(ex.stack + '\n'); | ||
process.exit(2); | ||
} |
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,77 @@ | ||
const nightwatch_config = { | ||
src_folders : [ "test/e2e" ], | ||
|
||
selenium : { | ||
"start_process" : false, | ||
"host" : "hub-cloud.browserstack.com", | ||
"port" : 80 | ||
}, | ||
|
||
test_settings: { | ||
default: { | ||
desiredCapabilities: { | ||
'build': 'nightwatch-browserstack', | ||
'browserstack.user': process.env.BROWSERSTACK_USERNAME || 'BROWSERSTACK_USERNAME', | ||
'browserstack.key': process.env.BROWSERSTACK_ACCESS_KEY || 'BROWSERSTACK_ACCESS_KEY', | ||
'browserstack.debug': true, | ||
'browserstack.local': true, | ||
'browser': 'chrome' | ||
} | ||
}, | ||
bstack_edge: { | ||
'desiredCapabilities': { | ||
'browserName': 'MicrosoftEdge', | ||
'os': 'Windows', | ||
'os_version': '10', | ||
'browser': 'Edge', | ||
'resolution': '1024x768' | ||
} | ||
}, | ||
bstack_chrome: { | ||
desiredCapabilities: { | ||
'browserName': 'Chrome', | ||
'os': 'Windows', | ||
'os_version': '10', | ||
'browser': 'Chrome', | ||
'resolution': '1024x768' | ||
} | ||
}, | ||
bstack_firefox: { | ||
desiredCapabilities: { | ||
'browserName': 'Firefox', | ||
'os': 'Windows', | ||
'os_version': '7', | ||
'browser': 'Firefox', | ||
'resolution': '1024x768' | ||
} | ||
}, | ||
bstack_firefox_osx: { | ||
desiredCapabilities: { | ||
'browserName': 'Firefox', | ||
'os': 'OS X', | ||
'os_version': 'El Capitan', | ||
'browser': 'Firefox', | ||
'resolution': '1024x768' | ||
} | ||
}, | ||
bstack_safari: { | ||
desiredCapabilities: { | ||
'browserName': 'Safari', | ||
'os': 'OS X', | ||
'os_version': 'Sierra', | ||
'browser': 'Safari', | ||
'resolution': '1024x768' | ||
} | ||
} | ||
} | ||
}; | ||
|
||
// Code to copy seleniumhost/port into test settings | ||
for (let i in nightwatch_config.test_settings) { | ||
const config = nightwatch_config.test_settings[i]; | ||
|
||
config['selenium_host'] = nightwatch_config.selenium.host; | ||
config['selenium_port'] = nightwatch_config.selenium.port; | ||
} | ||
|
||
module.exports = nightwatch_config; |
Oops, something went wrong.