Created
December 28, 2016 10:55
-
-
Save anonymous/21ea87157babc31c188dd172bd080c36 to your computer and use it in GitHub Desktop.
example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
waitForPromiseToResolveWithACertainCondition: function(someFunctionThatReturnsAPromise, functionThatTestsTheResolvedValue, args){ | |
browser.wait(function () { | |
var deferred = protractor.promise.defer(); | |
someFunctionThatReturnsAPromise(args).then(function (resolvedValue) { | |
deferred.fulfill(functionThatTestsTheResolvedValue(resolvedValue)); | |
}); | |
return deferred.promise; | |
}, 10000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment