Added starrynight test setup

This commit is contained in:
Erik Ziegler 2016-01-25 21:46:41 +01:00
parent b2fa6ead3b
commit 98222abd0a
8 changed files with 177 additions and 0 deletions

1
LesionTracker/.gagarin/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
local

View File

@ -0,0 +1,136 @@
{
"starrynight": {
"version": "3.7.0"
},
"nightwatch": {
"version": "0.8.6"
},
"src_folders": [
"./tests/nightwatch/walkthroughs"
],
"output_folder": "./tests/nightwatch/reports",
"custom_commands_path": [
"./tests/nightwatch/commands",
"./tests/nightwatch/commands/api/meteor",
"./tests/nightwatch/commands/actions",
"./tests/nightwatch/commands/components",
"./tests/nightwatch/commands/methods"
],
"custom_assertions_path": [
"./tests/nightwatch/assertions"
],
"globals_path": "./tests/nightwatch/globals.json",
"selenium": {
"start_process": true,
"server_path": "${npm_config_prefix}/lib/node_modules/starrynight/node_modules/selenium-server-standalone-jar/jar/selenium-server-standalone-2.45.0.jar",
"log_path": "tests/nightwatch/logs",
"host": "127.0.0.1",
"port": 4444,
"cli_args": {
"webdriver.chrome.driver": "${npm_config_prefix}/lib/node_modules/starrynight/node_modules/chromedriver/bin/chromedriver"
}
},
"test_settings": {
"default": {
"launch_url": "http://localhost:5000",
"selenium_host": "127.0.0.1",
"selenium_port": 4444,
"pathname": "/wd/hub",
"silent": true,
"disable_colors": false,
"firefox_profile": false,
"ie_driver": "",
"screenshots": {
"enabled": false,
"path": "./tests/nightwatch/screenshots"
},
"desiredCapabilities": {
"browserName": "chrome",
"javascriptEnabled": true,
"acceptSslCerts": true,
"loggingPrefs": {
"browser": "ALL"
}
},
"exclude": "./tests/nightwatch/unittests/*"
},
"phantomjs": {
"desiredCapabilities": {
"browserName": "phantomjs",
"javascriptEnabled": true,
"databaseEnabled": false,
"locationContextEnabled": false,
"applicationCacheEnabled": false,
"browserConnectionEnabled": false,
"webStorageEnabled": false,
"acceptSslCerts": true,
"rotatable": false,
"nativeEvents": false,
"phantomjs.binary.path": "${npm_config_prefix}/lib/node_modules/starrynight/node_modules/phantomjs/bin/phantomjs"
}
},
"travis": {
"launch_url": "http://localhost:3000",
"selenium_host": "127.0.0.1",
"selenium_port": 4444,
"pathname": "/wd/hub",
"silent": true,
"disable_colors": false,
"firefox_profile": false,
"screenshots": {
"enabled": false,
"path": "./tests/nightwatch/screenshots"
},
"desiredCapabilities": {
"browserName": "firefox",
"javascriptEnabled": true,
"databaseEnabled": true,
"locationContextEnabled": true,
"applicationCacheEnabled": true,
"browserConnectionEnabled": true,
"webStorageEnabled": true,
"acceptSslCerts": true,
"rotatable": true,
"nativeEvents": true
}
},
"travischrome": {
"launch_url": "http://localhost:3000",
"selenium_host": "127.0.0.1",
"selenium_port": 4444,
"pathname": "/wd/hub",
"silent": true,
"disable_colors": false,
"firefox_profile": false,
"screenshots": {
"enabled": false,
"path": "./tests/nightwatch/screenshots"
},
"desiredCapabilities": {
"browserName": "chrome",
"javascriptEnabled": true,
"databaseEnabled": true,
"locationContextEnabled": true,
"applicationCacheEnabled": true,
"browserConnectionEnabled": true,
"webStorageEnabled": true,
"acceptSslCerts": true,
"rotatable": true,
"nativeEvents": true,
"chromeOptions": {
"args": [
"--no-sandbox"
]
}
}
},
"unittests": {
"selenium": {
"start_process": false,
"start_session": false
},
"filter": "./tests/nightwatch/unittests/*",
"exclude": ""
}
}
}

View File

@ -47,3 +47,5 @@ clinical:theming-ui
clinical:fonts
clinical:glass-ui
clinical:hipaa-logger
anti:gagarin@=0.4.11
check

View File

@ -1,5 +1,6 @@
accounts-base@1.2.2
accounts-password@1.1.4
anti:gagarin@0.4.11
anti:i18n@0.4.3
arsnebula:reactive-promise@0.9.1
autoupdate@1.2.4

View File

@ -0,0 +1,30 @@
Meteor.startup(function() {
if (Meteor.settings.dicomWeb) {
console.log('dicomWeb settings defined!');
console.log(Meteor.settings);
return;
}
console.log('Using default LesionTracker dicomWeb settings');
Meteor.settings = {
"dicomWeb" : {
"endpoints": [
{
"name": "Orthanc",
"wadoUriRootNOTE" : "either this uri is not correct for wado-uri or wado-uri is not configured on orthanc currently",
"wadoUriRoot" : "http://localhost:8043/wado",
"qidoRoot": "http://localhost:8042/dicom-web",
"wadoRoot": "http://localhost:8042/dicom-web",
"qidoSupportsIncludeField": false,
"imageRendering" : "wadouri",
"requestOptions" : {
"auth": "orthanc:orthanc",
"logRequests" : true,
"logResponses" : false,
"logTiming" : true
}
}
]
}
};
});

View File

@ -0,0 +1 @@
starrynight run-tests --framework gagarin --debug --verbose --webdriver http://localhost:9515 --path ../Packages/*/tests/gagarin/**/*.js

View File

@ -0,0 +1 @@
starrynight run-tests --framework nightwatch

View File

@ -4,6 +4,11 @@ Meteor.methods({
* @param filter
*/
'WorklistSearch': function(filter) {
if (!Meteor.settings.dicomWeb) {
console.warn('No dicomWeb settings provided! Worklist search is not possible!')
return;
}
// Get the server data. This is user-defined in the
// config.json files used to run the Meteor server
var server = Meteor.settings.dicomWeb.endpoints[0];