import { Locator, WebDriver } from 'selenium-webdriver'; import { Expectation } from './Expectation'; /** * Assert a given expectation against a JET application's viewmodel. * Assertions are [Chai](https://www.chaijs.com)-like expressions, represented * by the {@link Expectation} class, and compared remotely on the test browser * against the identified viewmodel and its path to the target value. * * The viewmodel is typically identiied by the DOM node on which Knockout's * ko.applyBindings was called, but can also be descendants of * that originial "root" node. * ```javascript * new Expectation(...) * ``` * * The target value within the viewmodel is identified by a dot-notated path * and/or expression which yields the value. For instance, a value may be an * observable, therefore, the expression must include parenthesis to unwrap * the observable. * ```javascript * new Expecation(By.id('view-container'), 'firstName()') * ``` * * The expression to which the viewmodel value will be compared is expressed * as BDD-style chains, such as * ```javascript * const fnExpectation = new Expectation('firstName()') * .to.equal('Joe'); * ``` * * If a viewmodel value returns a Promise, the assertion will wait for it to * resolve before doing the comparison. * * @param driver The instance of WebDriver to use in performing the expectation * @param vmLocator The Locator which identifies the DOM node associated with the * viewmodel on the client. * @param expression The path within the viewmodel to locate the value * @param expectation The Expectation object to evaluate on the client browser. */ export declare function assertViewModelValue(driver: WebDriver, vmLocator: Locator, expectation: Expectation): Promise;