Skip to content
Permalink
Browse files
fix(protractor): Corrected the interface of LastScriptExecution.result
  • Loading branch information
jan-molak committed Mar 14, 2019
1 parent fdd5d2b commit 09ccdb00a4967f3d0722445899155df6ffd41e25
@@ -30,12 +30,12 @@ describe('Scroll', function() {
Navigate.to(aLongSpell),

ExecuteScript.sync(`return arguments[0].getBoundingClientRect().top;`).withArguments(Page.Execute_Button),
Ensure.that(LastScriptExecution.result(), isGreaterThan(1000)),
Ensure.that(LastScriptExecution.result<number>(), isGreaterThan(1000)),

Scroll.to(Page.Execute_Button),

ExecuteScript.sync(`return arguments[0].getBoundingClientRect().top;`).withArguments(Page.Execute_Button),
Ensure.that(LastScriptExecution.result(), isLessThan(1000)),
Ensure.that(LastScriptExecution.result<number>(), isLessThan(1000)),
));

/** @test {Enter#toString} */
@@ -7,9 +7,9 @@ export class LastScriptExecution {
* @desc
* Enables asserting on the result of a function executed via {@link ExecuteScript}.
*
* @returns {Question<Promise<R>>}
* @returns {Question<R>}
*/
static result<R>(): Question<Promise<R>> {
static result<R>(): Question<R> {
return Question.about(`last script execution result`, actor =>
BrowseTheWeb.as(actor).getLastScriptExecutionResult());
}

0 comments on commit 09ccdb0

Please sign in to comment.