import { and } from '@serenity-js/assertions' ; import { Expectation } from '@serenity-js/core' ; import { ElementFinder } from 'protractor' ; import { ElementFinderExpectation } from './ElementFinderExpectation' ; import { isPresent } from './isPresent' ; desc returns { serenity-js see {@link @serenity-js/assertions~Ensure} see {@link @serenity-js/core/lib/screenplay/questions~Check} see Wait export function isVisible ( ) { return Expectation . to < ElementFinder > ( 'become visible' ) . soThatActual ( and ( isPresent ( ) , isDisplayed ( ) ) ) ; } function isDisplayed ( ) { return ElementFinderExpectation . forElementTo ( 'become displayed' , actual => actual . isDisplayed ( ) ) ; }