Added Window/Unix Freindly String Compare functions

This commit is contained in:
Jesse 2015-08-11 14:56:25 -07:00 committed by Victor Woeltjen
parent eb10cbf87c
commit b74cbf1969
3 changed files with 43 additions and 30 deletions

View File

@ -37,8 +37,17 @@ E2e Protractor Tests.
-Contains tests that test the UI(drag drop, fullscreen, info bubble)
-conf.js:
-protractor config file. Explained below
-stressTest:
Tests that are used to test for memory leaks. You can use the new tab option on WARP and then open the
timeline in the new tab during the browser.sleep(). Once the test is do the browser will pause and you
can look a the timeline results in the new tab.
NOTE: Cannot open chrome dev tools on same tab as the test are run on. Protractor uses the dev tools to
exectute the tests.
-StressTest will create and delete folders.
-StressTestBubble.js: creates manny bubbles.
(Delay variable in InfoGesture.js was changed to 0)
3. Conf.js
Conf.js is used by protractor to setup and execute the tests.
-allScriptsTimeout: gives more time for protractor to synchronize with the page.
@ -50,14 +59,11 @@ E2e Protractor Tests.
-specs[]: Is an array of files. Each File should have a "describe, it" test to be executed by protractor.
-capabilities: Tells protractor what browser to use and any browser arguments.
4. StressTest:
Tests that are used to test for memory leaks. You can use the new tab option on WARP and then open the
timeline in the new tab during the browser.sleep(). Once the test is do the browser will pause and you can
look a the timeline results in the new tab.
NOTE: Cannot open chrome dev tools on same tab as the test are run on. Protractor uses the dev tools to
exectute the tests.
-StressTest will create and delete folders.
-StressTestBubble.js: creates manny bubbles.
(Delay variable in InfoGesture.js was changed to 0)
4. bundle.json
bundle.json is used by npm to determine dependencies and location of script files.
-Dependencies:
"protractor": Contains protractor and webdriver package.
"psnode": Window/Unix Command, used for list/kill process.(ps aux)
"shelljs": Window/Unix Common JS Commands. eg rm,ls,exec
"sleep": Window/Unix Commands used to sleep the script
"string": Window/Unix Commands for string manipulation.

View File

@ -10,25 +10,32 @@ ps.list(function(err, results) {
results.forEach(function( process ){
//Killing Node
if((process.command.indexOf("node app.js")) != -1) {
if(S(process.command).contains("node app.js")) {
console.log();
console.log( 'Killing Node: %s', process.command);
ps.kill(process.pid, function(err, stdout) {
if (err) {
throw new Error(err);
}
console.log(stdout);
if (err) {
throw new Error(err);
}
console.log(stdout);
});
}
sleep.usleep(10000);
if((process.command.indexOf("webdriver")) != -1) {
}else if(S(process.command).contains("webdriver")) {
console.log();
console.log( 'Killing WebDriver: %s', process.command);
ps.kill(process.pid, function(err, stdout) {
if (err){
throw new Error(err);
}
console.log(stdout);
if (err){
throw new Error(err);
}
console.log(stdout);
});
}else if(S(process.command).contains("protractor")) {
console.log();
console.log( 'Killing Chrome Drive: %s', process.command);
ps.kill(process.pid, function(err, stdout) {
if (err){
throw new Error(err);
}
console.log(stdout);
});
}
});

View File

@ -1,12 +1,12 @@
{
"name": "protractorCtr",
"name": "ProtractorLauncher",
"version": "1.0.0",
"scripts" : {
"start": "bin/start.js",
"run" : "bin/run.js",
"stop" : "bin/stop.js",
"all" : "bin/start.js; bin/run.js; bin/stop.js;",
"clean": "bin/clean.js"
"start" : "bin/start.js",
"protractor" : "bin/run.js",
"stop" : "bin/stop.js",
"all" : "bin/start.js; bin/run.js; bin/stop.js;",
"clean" : "bin/clean.js"
},
"dependencies": {
"protractor": "^2.1.0",