How to use the @serenity-js/assertions.Expectation.to 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 / src / expectations / isVisible.ts View on Github external
export function isVisible(): Expectation {
    return Expectation.to('become visible').soThatActual(and(
        isPresent(),
        isDisplayed(),
    ));
}
github jan-molak / serenity-js / packages / protractor / src / expectations / isSelected.ts View on Github external
export function isSelected(): Expectation {
    return Expectation.to('become selected').soThatActual(and(
        isPresent(),
        ElementFinderExpectation.forElementTo('become selected', actual => actual.isSelected()),
    ));
}
github jan-molak / serenity-js / packages / protractor / src / expectations / isClickable.ts View on Github external
export function isClickable(): Expectation {
    return Expectation.to('become clickable').soThatActual(and(isVisible(), isEnabled()));
}