Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
Fix elements spec (#3954)
Browse files Browse the repository at this point in the history
With angular/jasminewd#78, jasminewd no longer supports passing deferreds to expect(). Change the test to pass a promise, instead.
  • Loading branch information
heathkit authored Jan 11, 2017
1 parent 0555d39 commit 0872d96
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions spec/basic/elements_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,12 @@ describe('ElementFinder', function() {

it('should propagate exceptions', function() {
browser.get('index.html#/form');
var successful = protractor.promise.defer();

var invalidElement = element(by.binding('INVALID'));
invalidElement.getText().then(function(/* string */) {
successful.fulfill(true);
}, function(/* error */) {
successful.fulfill(false);
var successful = invalidElement.getText().then(function() {
return true;
}, function() {
return false;
});
expect(successful).toEqual(false);
});
Expand Down

0 comments on commit 0872d96

Please sign in to comment.