Expect
expect is the out-of-the-box solution for asserting within tests. It is heavily inspired by Jest, favouring a sane autocomplete system.
Usage
expect(value)
Parameters
value(Any): Value to assert.
Support
| Platform | Supported |
|---|---|
| iOS | Yes |
| Android | Yes |
| Web | Yes |
Examples
TODO: Description here.
const { element, by, expect } = require("appdriver");
(async () => {
const $input = await element(by.label("text-input"));
await expect($input).toHaveValue("Example Text");
})();
TODO: Description here.
const { element, by, expect } = require("appdriver");
(async () => {
const $button = await element(by.label("button"));
await expect($button).toExist();
})();
TODO: Description here.
const { element, by, expect } = require("appdriver");
(async () => {
const $image = await element(by.label("image"));
await expect($image).not.toBeVisible();
})();