Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('allows the actor to scroll to a given target so that it appears in the viewport', () => Gandalf.attemptsTo(
Navigate.to(aLongSpell),
ExecuteScript.sync(`return arguments[0].getBoundingClientRect().top;`).withArguments(Page.Execute_Button),
Ensure.that(LastScriptExecution.result(), isGreaterThan(1000)),
Scroll.to(Page.Execute_Button),
ExecuteScript.sync(`return arguments[0].getBoundingClientRect().top;`).withArguments(Page.Execute_Button),
Ensure.that(LastScriptExecution.result(), isLessThan(1000)),
));