Socket
Socket
Sign inDemoInstall

protractor

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protractor - npm Package Compare versions

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 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc