Protractor v2.2.0 Release Notes

  • ๐Ÿ’ฅ Breaking Changes

    • ๐Ÿ‘€ If you use the plugin API, it has changed a lot. See [docs/plugins.md](docs/plugins.md) for details. The good news is that it is being taken out of beta, so it should be more stable in the future.

    โฌ†๏ธ Dependency Version Upgrades

    • (786ab05) chore(dependencies): update request to 2.57

    Closes #2205

    ๐Ÿ”‹ Features

    • (f2a11a7) feat(plugins): Changed and expanded the plugin API

      • Changed the plugin API so that it is more uniform (see docs/plugins.md)
      • Updated existing plugins to the new API
      • Added the onPageLoad and onPageSync entry points for plugins for modifying browser.get
      • Added the waitForPromise and waitForCondition entry points for plugins for modifying waitForAngular
      • Added tests

    This closes #2126 and helps out @andresdominguez

    • (aded26b) feat(webdriver-manager): update download logic with streaming

    Also adds a content length check to make sure the downloaded binaries are the correct size. This seems to fix up some unreliable download issues that we were previously having.

    • (7aeebd6) feat(plugins): reporting loaded plugins

    • (6c10378) feat(protractor): expose pending $http and $timeout on a timeout

    Now when a test times out while waiting for Angular to be stable, pending $timeout and $http tasks will be reported to the console.

    ๐Ÿ› Bug Fixes

    • (c30afdd) fix(test): fixed tests under npm test

    • (3508335) fix(element): ElementArrayFinder.count was slow

    The bug fix for #1903 (https://github.com/angular/protractor/commit/2a765c76e121de13ff86a279fe3f21cb15c17783) was causing ElementArrayFinder.prototype.count to be slow because of the extranous checks that must be performed. However, the checks could be delayed into the isPresent check, which will mitigate this issue

    fixes(#2359)

    • (b147033) fix(by.exactRepeater): should split by "="

    Closes #2335

    • (4c9886b) fix(Chrome Accessibility Plugin) No error context

    If your tests fail because of StaleElementReferenceError then there is no context about where this is coming from. By having the failure be handled inside of the plugin then grunt can fail gracefully. Additionally, this provides context about where the error originated from.

    Fixes #2331

    • (d15ccdc) fix(phantomJS): Reset URL cannot be a data url for PhantomJS

    When trying to use the lates version of Angular with PhantomJS we get a message complaining about "Detected a page unload event". This was fixed in earlier versions of Angular, see issue #85, but reappeared now. The problem is that using data urls to reset the page causes this issue, so we have to do as we do with Safari and use "about:blank" instead

    • (e6369ac) docs(tutorial): use Jasmine v2 in the tutorial

    • (e60dc0f) fix(browser.refresh): use timeout in milliseconds

    When invoked without arguments browser.refresh used a 10-millisecond timeout, wrongly documented as seconds. It now delegates timeout handling to browser.get, which defaults to DEFAULT_GET_PAGE_TIMEOUT (10 seconds).

    • (0262268) fix(cucumber): fix beforeFeature event handler call guard

    Fixes the run failures reported in https://github.com/cucumber/cucumber-js/issues/342.