How to use the @serenity-js/assertions.isGreaterThan function in @serenity-js/assertions

To help you get started, we’ve selected a few @serenity-js/assertions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jan-molak / serenity-js / packages / protractor / spec / screenplay / interactions / Scroll.spec.ts View on Github external
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)),
    ));