protractor
Advanced tools
Comparing version 0.5.0 to 0.6.1
11
conf.js
@@ -31,4 +31,8 @@ // An example configuration file. | ||
// The address of a running selenium server. | ||
// seleniumAddress: 'http://localhost:4444/wd/hub', | ||
seleniumAddress: 'http://localhost:4444/wd/hub', | ||
// Spec patterns are relative to the current working directly when | ||
// protractor is called. | ||
specs: ['spec/testAppSpec.js'], | ||
// ----- Capabilities to be passed to the webdriver instance. | ||
@@ -45,7 +49,4 @@ // For a full list of available capabilities, see | ||
// ----- Options to be passed to Jasmine-node. | ||
// ----- Options to be passed to minijasminenode. | ||
jasmineNodeOpts: { | ||
// Spec folders are relative to the current working directly when | ||
// protractor is called. | ||
specFolders: ['spec'], | ||
// onComplete will be called before the driver quits. | ||
@@ -52,0 +53,0 @@ onComplete: null, |
@@ -16,7 +16,8 @@ // An example configuration file. | ||
// Spec patterns are relative to the current working directly when | ||
// protractor is called. | ||
specs: ['example/onProtractor.js'], | ||
// Options to be passed to Jasmine-node. | ||
jasmineNodeOpts: { | ||
// Spec folders are relative to the current working directly when | ||
// protractor is called. This can be folders or files. | ||
specFolders: ['example/onProtractor.js'], | ||
isVerbose: false, | ||
@@ -23,0 +24,0 @@ showColors: true, |
@@ -6,3 +6,3 @@ var util = require('util'); | ||
var remote = require('selenium-webdriver/remote'); | ||
var jasmine = require('jasmine-node'); | ||
var minijn = require('minijasminenode'); | ||
var protractor = require('./protractor.js'); | ||
@@ -23,3 +23,3 @@ var SauceLabs = require('saucelabs'); | ||
jasmineNodeOpts: { | ||
specFolders: [], | ||
specs: [], | ||
onComplete: null, | ||
@@ -40,13 +40,18 @@ isVerbose: false, | ||
var passed = runner.results().failedCount == 0; | ||
if (sauceAccount) { | ||
sauceAccount.updateJob(id, {'passed': passed}, function() {}); | ||
} | ||
if (originalOnComplete) { | ||
originalOnComplete(runner, log); | ||
} | ||
driver.quit(); | ||
if (server) { | ||
util.puts('Shutting down selenium standalone server'); | ||
server.stop(); | ||
if (sauceAccount) { | ||
sauceAccount.updateJob(id, {'passed': passed}, function() {}); | ||
process.exit(passed? 0 : 1); | ||
} | ||
driver.quit().then(function() { | ||
if (server) { | ||
util.puts('Shutting down selenium standalone server'); | ||
server.stop(); | ||
} | ||
}).then(function() { | ||
process.exit(passed? 0 : 1); | ||
}); | ||
}; | ||
@@ -61,10 +66,18 @@ | ||
var run = function() { | ||
// Check the spec folders. | ||
var specs = config.jasmineNodeOpts.specFolders; | ||
if (config.jasmineNodeOpts.specFolders) { | ||
throw new Error('Using config.jasmineNodeOpts.specFolders is deprecated ' + | ||
'in Protractor 0.6.0. Please switch to config.specs.'); | ||
} | ||
// Check the specs. | ||
// TODO(ralphj): Interpret patterns from the specs, e.g. | ||
// 'specs/*.js' | ||
// Probably want to use 'glob' for this, but consider the extra dependency. | ||
var specs = config.specs; | ||
for (var i = 0; i < specs.length; ++i) { | ||
specs[i] = path.resolve(process.cwd(), specs[i]); | ||
if (!fs.existsSync(specs[i])) { | ||
throw new Error('Test folder/file ' + specs[i] + ' not found.'); | ||
throw new Error('Test file ' + specs[i] + ' not found.'); | ||
} | ||
} | ||
minijn.addSpecs(specs); | ||
@@ -102,2 +115,3 @@ if (config.sauceUser && config.sauceKey) { | ||
server.start().then(function(url) { | ||
util.puts('Selenium standalone server started at ' + url); | ||
@@ -128,3 +142,3 @@ config.seleniumAddress = server.address(); | ||
jasmine.executeSpecsInFolder(options); | ||
minijn.executeSpecs(options); | ||
} | ||
@@ -131,0 +145,0 @@ |
@@ -9,3 +9,3 @@ { | ||
"selenium-webdriver" : ">2.32.1", | ||
"jasmine-node" : "~1.9.0", | ||
"minijasminenode" : "~0.2.0", | ||
"saucelabs" : "~0.1.0", | ||
@@ -16,2 +16,3 @@ "adm-zip" : ">=0.4.2" | ||
"expect.js" : "~0.2.0", | ||
"jasmine-node" : "~1.9.0", | ||
"mocha" : "~1.10.0" | ||
@@ -25,3 +26,6 @@ }, | ||
"main" : "lib/protractor.js", | ||
"version" : "0.5.0" | ||
"scripts" : { | ||
"test" : "node lib/cli.js conf.js" | ||
}, | ||
"version" : "0.6.1" | ||
} |
@@ -47,3 +47,3 @@ Protractor | ||
jasmineNodeOpts: { | ||
specFolders: ['myTest.js', 'myOtherTestFolder'] | ||
specs: ['myTest.js', 'myFolder/myOtherTest.js'] | ||
} | ||
@@ -50,0 +50,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
200381
1058
3
+ Addedminijasminenode@~0.2.0
+ Addedminijasminenode@0.2.7(transitive)
- Removedjasmine-node@~1.9.0
- Removed@xmldom/xmldom@0.8.10(transitive)
- Removedcoffee-script@1.12.7(transitive)
- Removedfileset@0.1.8(transitive)
- Removedgaze@0.3.4(transitive)
- Removedglob@3.2.11(transitive)
- Removedjasmine-node@1.9.1(transitive)
- Removedjasmine-reporters@2.5.2(transitive)
- Removedlru-cache@2.7.3(transitive)
- Removedminimatch@0.2.140.3.0(transitive)
- Removedmkdirp@0.3.51.0.4(transitive)
- Removedrequirejs@2.3.7(transitive)
- Removedsigmund@1.0.1(transitive)
- Removedunderscore@1.13.7(transitive)
- Removedwalkdir@0.4.1(transitive)