mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
add option to run remote selenium server
This commit is contained in:
@@ -13,6 +13,8 @@ const height = 768;
|
|||||||
var HOST = process.env.URL_HOST_ADF;
|
var HOST = process.env.URL_HOST_ADF;
|
||||||
var BROWSER_RUN = process.env.BROWSER_RUN;
|
var BROWSER_RUN = process.env.BROWSER_RUN;
|
||||||
var FOLDER = process.env.FOLDER || '';
|
var FOLDER = process.env.FOLDER || '';
|
||||||
|
var SELENIUM_SERVER = process.env.SELENIUM_SERVER || '';
|
||||||
|
var DIRECT_CONNECCT = SELENIUM_SERVER ? false : true;
|
||||||
|
|
||||||
var args_options = [];
|
var args_options = [];
|
||||||
|
|
||||||
@@ -28,7 +30,7 @@ exports.config = {
|
|||||||
allScriptsTimeout: 60000,
|
allScriptsTimeout: 60000,
|
||||||
|
|
||||||
specs: [
|
specs: [
|
||||||
'./e2e/'+FOLDER+'**/*.e2e.ts'
|
'./e2e/' + FOLDER + '**/*.e2e.ts'
|
||||||
],
|
],
|
||||||
|
|
||||||
capabilities: {
|
capabilities: {
|
||||||
@@ -45,11 +47,12 @@ exports.config = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
directConnect: true,
|
directConnect: DIRECT_CONNECCT,
|
||||||
|
|
||||||
baseUrl: "http://" + HOST,
|
baseUrl: "http://" + HOST,
|
||||||
|
|
||||||
framework: 'jasmine2',
|
framework: 'jasmine2',
|
||||||
|
|
||||||
jasmineNodeOpts: {
|
jasmineNodeOpts: {
|
||||||
showColors: true,
|
showColors: true,
|
||||||
defaultTimeoutInterval: 90000,
|
defaultTimeoutInterval: 90000,
|
||||||
@@ -57,6 +60,12 @@ exports.config = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The address of a running selenium server (must be manually start before running the tests). If this is specified seleniumServerJar and seleniumPort will be ignored.
|
||||||
|
* @config {String} seleniumAddress
|
||||||
|
*/
|
||||||
|
seleniumAddress: SELENIUM_SERVER,
|
||||||
|
|
||||||
plugins: [{
|
plugins: [{
|
||||||
package: 'jasmine2-protractor-utils',
|
package: 'jasmine2-protractor-utils',
|
||||||
disableHTMLReport: false,
|
disableHTMLReport: false,
|
||||||
|
@@ -14,6 +14,7 @@ show_help() {
|
|||||||
echo "-b or --browser run the test in the browsrwer (No headless mode)"
|
echo "-b or --browser run the test in the browsrwer (No headless mode)"
|
||||||
echo "-s or --spec run a single test file"
|
echo "-s or --spec run a single test file"
|
||||||
echo "-f or --folder run a single folder test"
|
echo "-f or --folder run a single folder test"
|
||||||
|
echo "--seleniumServer configure a selenium server to use to run the e2e test"
|
||||||
echo "-proxy or --proxy proxy Back end URL to use only possibel to use with -dev option"
|
echo "-proxy or --proxy proxy Back end URL to use only possibel to use with -dev option"
|
||||||
echo "-dev or --dev run it against local development environment it will deploy on localhost:4200 the current version of your branch"
|
echo "-dev or --dev run it against local development environment it will deploy on localhost:4200 the current version of your branch"
|
||||||
echo "-host or --host URL of the Front end to test"
|
echo "-host or --host URL of the Front end to test"
|
||||||
@@ -65,6 +66,10 @@ set_test_folder(){
|
|||||||
FOLDER=$1
|
FOLDER=$1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_selenium(){
|
||||||
|
SELENIUM_SERVER=$1
|
||||||
|
}
|
||||||
|
|
||||||
while [[ $1 == -* ]]; do
|
while [[ $1 == -* ]]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h|--help|-\?) show_help; exit 0;;
|
-h|--help|-\?) show_help; exit 0;;
|
||||||
@@ -78,6 +83,7 @@ while [[ $1 == -* ]]; do
|
|||||||
-s|--spec) set_test $2; shift 2;;
|
-s|--spec) set_test $2; shift 2;;
|
||||||
-save) set_save_screenshot; shift;;
|
-save) set_save_screenshot; shift;;
|
||||||
-proxy|--proxy) set_proxy $2; shift 2;;
|
-proxy|--proxy) set_proxy $2; shift 2;;
|
||||||
|
-s|--seleniumServer) set_selenium $2; shift 2;;
|
||||||
-host|--host) set_host $2; shift 2;;
|
-host|--host) set_host $2; shift 2;;
|
||||||
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
|
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
|
||||||
esac
|
esac
|
||||||
@@ -95,6 +101,7 @@ export PROXY_HOST_ADF=$PROXY
|
|||||||
export SAVE_SCREENSHOT=$SAVE_SCREENSHOT
|
export SAVE_SCREENSHOT=$SAVE_SCREENSHOT
|
||||||
export TIMEOUT=$TIMEOUT
|
export TIMEOUT=$TIMEOUT
|
||||||
export FOLDER=$FOLDER'/'
|
export FOLDER=$FOLDER'/'
|
||||||
|
export SELENIUM_SERVER=$SELENIUM_SERVER
|
||||||
|
|
||||||
npm run lint-e2e || exit 1
|
npm run lint-e2e || exit 1
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user