protractor
Advanced tools
Comparing version 0.6.1 to 0.7.0
@@ -12,3 +12,3 @@ // An example configuration file. | ||
// The location of the selenium standalone server .jar file. | ||
seleniumServerJar: './selenium/selenium-server-standalone-2.33.0.jar', | ||
seleniumServerJar: './selenium/selenium-server-standalone-2.34.0.jar', | ||
// The port to start the selenium server on, or null if the server should | ||
@@ -36,3 +36,5 @@ // find its own unused port. | ||
// protractor is called. | ||
specs: ['spec/testAppSpec.js'], | ||
specs: [ | ||
'spec/*_spec.js', | ||
], | ||
@@ -42,2 +44,4 @@ // ----- Capabilities to be passed to the webdriver instance. | ||
// https://code.google.com/p/selenium/wiki/DesiredCapabilities | ||
// and | ||
// https://code.google.com/p/selenium/source/browse/javascript/webdriver/capabilities.js | ||
capabilities: { | ||
@@ -44,0 +48,0 @@ 'browserName': 'chrome' |
@@ -17,8 +17,3 @@ /** | ||
usingServer('http://localhost:4444/wd/hub'). | ||
withCapabilities({ | ||
'browserName': 'chrome', | ||
'version': '', | ||
'platform': 'ANY', | ||
'javascriptEnabled': true | ||
}).build(); | ||
withCapabilities(webdriver.Capabilities.chrome()).build(); | ||
@@ -25,0 +20,0 @@ driver.manage().timeouts().setScriptTimeout(10000); |
@@ -21,8 +21,3 @@ /** | ||
usingServer('http://localhost:4444/wd/hub'). | ||
withCapabilities({ | ||
'browserName': 'chrome', | ||
'version': '', | ||
'platform': 'ANY', | ||
'javascriptEnabled': true | ||
}).build(); | ||
withCapabilities(webdriver.Capabilities.chrome()).build(); | ||
@@ -29,0 +24,0 @@ driver.manage().timeouts().setScriptTimeout(10000); |
@@ -18,3 +18,3 @@ // An example configuration file. | ||
// protractor is called. | ||
specs: ['example/onProtractor.js'], | ||
specs: ['example/onProtractorRunner.js'], | ||
@@ -21,0 +21,0 @@ // Options to be passed to Jasmine-node. |
@@ -43,3 +43,9 @@ require('../index.js'); | ||
describe('webdriverJS Jasmine adapter plain', function() { | ||
it('should pass normal synchronous tests', function() { | ||
expect(true).toBe(true); | ||
}); | ||
}); | ||
describe('webdriverJS Jasmine adapter', function() { | ||
@@ -46,0 +52,0 @@ // Shorten this and you should see tests timing out. |
@@ -9,2 +9,3 @@ var util = require('util'); | ||
var SauceLabs = require('saucelabs'); | ||
var glob = require('glob'); | ||
@@ -68,14 +69,14 @@ var args = process.argv.slice(2); | ||
} | ||
// 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; | ||
var resolvedSpecs = []; | ||
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 file ' + specs[i] + ' not found.'); | ||
var matches = glob.sync(specs[i]); | ||
if (!matches.length) { | ||
throw new Error('Test file ' + specs[i] + ' did not match any files.'); | ||
} | ||
for (var j = 0; j < matches.length; ++j) { | ||
resolvedSpecs.push(matches[j]); | ||
} | ||
} | ||
minijn.addSpecs(specs); | ||
minijn.addSpecs(resolvedSpecs); | ||
@@ -107,4 +108,3 @@ if (config.sauceUser && config.sauceKey) { | ||
} | ||
server = new remote.SeleniumServer({ | ||
jar: config.seleniumServerJar, | ||
server = new remote.SeleniumServer(config.seleniumServerJar, { | ||
args: config.seleniumArgs, | ||
@@ -137,2 +137,8 @@ port: config.seleniumPort | ||
// Export protractor to the global namespace to be used in tests. | ||
global.protractor = protractor; | ||
// Set up the Jasmine WebDriver Adapter | ||
require('../jasminewd'); | ||
var options = config.jasmineNodeOpts; | ||
@@ -139,0 +145,0 @@ options.onComplete = cleanUp; |
@@ -320,5 +320,5 @@ var url = require('url'); | ||
/** | ||
* See webdriver.WebDriver.findElement | ||
* | ||
* Waits for Angular to finish rendering before searching for elements. | ||
* @see webdriver.WebDriver.findElement | ||
* @returns {!webdriver.WebElement} | ||
*/ | ||
@@ -334,5 +334,6 @@ Protractor.prototype.findElement = function(locator, varArgs) { | ||
/** | ||
* See webdriver.WebDriver.findElements | ||
* | ||
* Waits for Angular to finish rendering before searching for elements. | ||
* @see webdriver.WebDriver.findElements | ||
* @return {!webdriver.promise.Promise} A promise that will be resolved to an | ||
* array of the located {@link webdriver.WebElement}s. | ||
*/ | ||
@@ -397,3 +398,3 @@ Protractor.prototype.findElements = function(locator, varArgs) { | ||
this.driver.executeAsyncScript(function() { | ||
return this.driver.executeAsyncScript(function() { | ||
var callback = arguments[arguments.length - 1]; | ||
@@ -437,3 +438,4 @@ // Continue to bootstrap Angular. | ||
/** | ||
* Locators. | ||
* The Protractor Locator. | ||
* @augments webdriver.Locator.Strategy | ||
*/ | ||
@@ -553,2 +555,5 @@ var ProtractorBy = function() {}; | ||
/** | ||
* @type {ProtractorBy} | ||
*/ | ||
exports.By = new ProtractorBy(); |
{ | ||
"name" : "protractor", | ||
"description" : "Webdriver E2E test wrapper for Angular.", | ||
"homepage" : "https://github.com/juliemr/protractor", | ||
"keywords" : ["angular", "test", "testing", "webdriver", "webdriverjs", "selenium"], | ||
"author" : "Julie Ralph <ju.ralph@gmail.com>", | ||
"dependencies" : { | ||
"selenium-webdriver" : ">2.32.1", | ||
"minijasminenode" : "~0.2.0", | ||
"saucelabs" : "~0.1.0", | ||
"adm-zip" : ">=0.4.2" | ||
"name": "protractor", | ||
"description": "Webdriver E2E test wrapper for Angular.", | ||
"homepage": "https://github.com/angular/protractor", | ||
"keywords": [ | ||
"angular", | ||
"test", | ||
"testing", | ||
"webdriver", | ||
"webdriverjs", | ||
"selenium" | ||
], | ||
"author": "Julie Ralph <ju.ralph@gmail.com>", | ||
"dependencies": { | ||
"selenium-webdriver": "~2.34.0", | ||
"minijasminenode": "~0.2.0", | ||
"saucelabs": "~0.1.0", | ||
"glob": ">=3.1.14", | ||
"adm-zip": ">=0.4.2" | ||
}, | ||
"devDependencies" : { | ||
"expect.js" : "~0.2.0", | ||
"jasmine-node" : "~1.9.0", | ||
"mocha" : "~1.10.0" | ||
"devDependencies": { | ||
"expect.js": "~0.2.0", | ||
"jasmine-node": "~1.9.0", | ||
"mocha": "~1.10.0", | ||
"express": "~3.3.4" | ||
}, | ||
"repository" : { | ||
"type" : "git", | ||
"url" : "git://github.com/juliemr/protractor.git" | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/angular/protractor.git" | ||
}, | ||
"bin" : "bin/protractor", | ||
"main" : "lib/protractor.js", | ||
"scripts" : { | ||
"test" : "node lib/cli.js conf.js" | ||
"bin": "bin/protractor", | ||
"main": "lib/protractor.js", | ||
"scripts": { | ||
"test": "node lib/cli.js conf.js" | ||
}, | ||
"version" : "0.6.1" | ||
"version": "0.7.0" | ||
} |
Protractor | ||
========== | ||
Protractor is an end to end test framework for Angular applications built on top of [webdriverJS](https://code.google.com/p/selenium/wiki/WebDriverJs). | ||
Protractor is an end to end test framework for Angular applications built on top of [webdriverJS](https://code.google.com/p/selenium/wiki/WebDriverJs). | ||
@@ -18,3 +18,3 @@ Protractor can be run as a standalone binary runner, or included into your tests as a library. Use Protractor as a library if you would like to manage WebDriver and your test setup yourself. | ||
The example folder contains multiple versions of a simple test suite which runs against angularjs.org. | ||
The example folder contains multiple versions of a simple test suite which runs against angularjs.org. | ||
@@ -26,3 +26,3 @@ `onJasmineNodeSpec.js` and `onMocha.js` show how to use the Protractor library with jasmine-node and mocha. Run these with: | ||
You can also run the example suite using the Protractor runner. The runner accepts a configuration file, which runs the tests at `example/onProtractor.js`. | ||
You can also run the example suite using the Protractor runner. The runner accepts a configuration file, which runs the tests at `example/onProtractorRunner.js`. | ||
@@ -66,3 +66,5 @@ bin/protractor example/protractorConf.js | ||
When using the runner, the protractor library is exported to the global namespace as `protractor`. The current instance can be grabbed with `ptor = protractor.getInstance()`. | ||
Using the Protractor library | ||
@@ -89,3 +91,3 @@ ---------------------------- | ||
git clone https://github.com/juliemr/protractor.git | ||
git clone https://github.com/angular/protractor.git | ||
cd protractor | ||
@@ -99,7 +101,7 @@ npm install | ||
cd testapp | ||
scripts/web-server.js | ||
./scripts/web-server.js | ||
Then run the tests with | ||
bin/protractor conf.js | ||
npm test | ||
@@ -119,4 +121,4 @@ | ||
Start the selenium standalone with | ||
Start the selenium standalone with | ||
java -jar selenium/selenium-server-standalone-2.33.0.jar -Dwebdriver.chrome.driver=./selenium/chromedriver | ||
java -jar selenium/selenium-server-standalone-2.34.0.jar -Dwebdriver.chrome.driver=./selenium/chromedriver |
Sorry, the diff of this file is not supported yet
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
17
1064
119
45807
5
4
+ Addedglob@>=3.1.14
+ Added@isaacs/cliui@8.0.2(transitive)
+ Addedansi-regex@5.0.16.1.0(transitive)
+ Addedansi-styles@4.3.06.2.1(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@2.0.1(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedcross-spawn@7.0.5(transitive)
+ Addedeastasianwidth@0.2.0(transitive)
+ Addedemoji-regex@8.0.09.2.2(transitive)
+ Addedforeground-child@3.3.0(transitive)
+ Addedglob@11.0.0(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedjackspeak@4.0.2(transitive)
+ Addedlru-cache@11.0.2(transitive)
+ Addedminimatch@10.0.1(transitive)
+ Addedminipass@7.1.2(transitive)
+ Addedpackage-json-from-dist@1.0.1(transitive)
+ Addedpath-key@3.1.1(transitive)
+ Addedpath-scurry@2.0.0(transitive)
+ Addedselenium-webdriver@2.34.1(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedsignal-exit@4.1.0(transitive)
+ Addedstring-width@4.2.35.1.2(transitive)
+ Addedstrip-ansi@6.0.17.1.0(transitive)
+ Addedwhich@2.0.2(transitive)
+ Addedwrap-ansi@7.0.08.1.0(transitive)
- Removed@bazel/runfiles@6.3.1(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedimmediate@3.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedisarray@1.0.0(transitive)
- Removedjszip@3.10.1(transitive)
- Removedlie@3.3.0(transitive)
- Removedpako@1.0.11(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedselenium-webdriver@4.26.0(transitive)
- Removedsetimmediate@1.0.5(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedtmp@0.2.3(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedws@8.18.0(transitive)
Updatedselenium-webdriver@~2.34.0