expect-webdriverio 3.5.1 → 3.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/matchers/element/toBeClickable.js +1 -1
- package/lib/matchers/element/toBeDisabled.js +1 -1
- package/lib/matchers/element/toBeDisplayed.js +1 -1
- package/lib/matchers/element/toBeDisplayedInViewport.js +1 -1
- package/lib/matchers/element/toBeEnabled.js +1 -1
- package/lib/matchers/element/toBeExisting.js +1 -1
- package/lib/matchers/element/toBeFocused.js +1 -1
- package/lib/matchers/element/toBeSelected.js +1 -1
- package/lib/matchers/element/toHaveAttribute.js +2 -2
- package/lib/matchers/element/toHaveChildren.js +1 -1
- package/lib/matchers/element/toHaveElementClass.js +1 -1
- package/lib/matchers/element/toHaveElementProperty.js +1 -1
- package/lib/matchers/element/toHaveStyle.js +1 -1
- package/lib/matchers/element/toHaveText.js +1 -1
- package/lib/matchers/elements/toBeElementsArrayOfSize.js +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ const utils_1 = require("../../utils");
|
|
|
5
5
|
const expectAdapter_1 = require("../../util/expectAdapter");
|
|
6
6
|
async function toBeClickableFn(received, options = {}) {
|
|
7
7
|
this.expectation = this.expectation || 'clickable';
|
|
8
|
-
const browser = (0, utils_1.getBrowserObject)(received);
|
|
8
|
+
const browser = (0, utils_1.getBrowserObject)(await received);
|
|
9
9
|
return browser.call(async () => {
|
|
10
10
|
const result = await utils_1.executeCommandBe.call(this, received, async (el) => {
|
|
11
11
|
try {
|
|
@@ -6,7 +6,7 @@ const expectAdapter_1 = require("../../util/expectAdapter");
|
|
|
6
6
|
async function toBeDisabledFn(received, options = {}) {
|
|
7
7
|
this.expectation = this.expectation || 'disabled';
|
|
8
8
|
received = await received;
|
|
9
|
-
const browser = (0, utils_1.getBrowserObject)(received);
|
|
9
|
+
const browser = (0, utils_1.getBrowserObject)(await received);
|
|
10
10
|
return browser.call(async () => {
|
|
11
11
|
const result = await utils_1.executeCommandBe.call(this, received, async (el) => !await el.isEnabled(), options);
|
|
12
12
|
return result;
|
|
@@ -6,7 +6,7 @@ const expectAdapter_1 = require("../../util/expectAdapter");
|
|
|
6
6
|
async function toBeDisplayedFn(received, options = {}) {
|
|
7
7
|
this.expectation = this.expectation || 'displayed';
|
|
8
8
|
received = await received;
|
|
9
|
-
const browser = (0, utils_1.getBrowserObject)(received);
|
|
9
|
+
const browser = (0, utils_1.getBrowserObject)(await received);
|
|
10
10
|
return browser.call(async () => {
|
|
11
11
|
const result = await utils_1.executeCommandBe.call(this, received, async (el) => {
|
|
12
12
|
try {
|
|
@@ -5,7 +5,7 @@ const utils_1 = require("../../utils");
|
|
|
5
5
|
const expectAdapter_1 = require("../../util/expectAdapter");
|
|
6
6
|
async function toBeDisplayedInViewportFn(received, options = {}) {
|
|
7
7
|
this.expectation = this.expectation || 'displayed in viewport';
|
|
8
|
-
const browser = (0, utils_1.getBrowserObject)(received);
|
|
8
|
+
const browser = (0, utils_1.getBrowserObject)(await received);
|
|
9
9
|
return browser.call(async () => {
|
|
10
10
|
const result = await utils_1.executeCommandBe.call(this, received, async (el) => {
|
|
11
11
|
try {
|
|
@@ -5,7 +5,7 @@ const utils_1 = require("../../utils");
|
|
|
5
5
|
const expectAdapter_1 = require("../../util/expectAdapter");
|
|
6
6
|
async function toBeEnabledFn(received, options = {}) {
|
|
7
7
|
this.expectation = this.expectation || 'enabled';
|
|
8
|
-
const browser = (0, utils_1.getBrowserObject)(received);
|
|
8
|
+
const browser = (0, utils_1.getBrowserObject)(await received);
|
|
9
9
|
return browser.call(async () => {
|
|
10
10
|
const result = await utils_1.executeCommandBe.call(this, received, el => el.isEnabled(), options);
|
|
11
11
|
return result;
|
|
@@ -7,7 +7,7 @@ async function toExistFn(received, options = {}) {
|
|
|
7
7
|
this.expectation = this.expectation || 'exist';
|
|
8
8
|
this.verb = this.verb || '';
|
|
9
9
|
received = await received;
|
|
10
|
-
const browser = (0, utils_1.getBrowserObject)(received);
|
|
10
|
+
const browser = (0, utils_1.getBrowserObject)(await received);
|
|
11
11
|
return browser.call(async () => {
|
|
12
12
|
const result = await utils_1.executeCommandBe.call(this, received, async (el) => {
|
|
13
13
|
try {
|
|
@@ -5,7 +5,7 @@ const utils_1 = require("../../utils");
|
|
|
5
5
|
const expectAdapter_1 = require("../../util/expectAdapter");
|
|
6
6
|
async function toBeFocusedFn(received, options = {}) {
|
|
7
7
|
this.expectation = this.expectation || 'focused';
|
|
8
|
-
const browser = (0, utils_1.getBrowserObject)(received);
|
|
8
|
+
const browser = (0, utils_1.getBrowserObject)(await received);
|
|
9
9
|
return browser.call(async () => {
|
|
10
10
|
const result = await utils_1.executeCommandBe.call(this, received, el => el.isFocused(), options);
|
|
11
11
|
return result;
|
|
@@ -5,7 +5,7 @@ const utils_1 = require("../../utils");
|
|
|
5
5
|
const expectAdapter_1 = require("../../util/expectAdapter");
|
|
6
6
|
async function toBeSelectedFn(received, options = {}) {
|
|
7
7
|
this.expectation = this.expectation || 'selected';
|
|
8
|
-
const browser = (0, utils_1.getBrowserObject)(received);
|
|
8
|
+
const browser = (0, utils_1.getBrowserObject)(await received);
|
|
9
9
|
return browser.call(async () => {
|
|
10
10
|
const result = await utils_1.executeCommandBe.call(this, received, el => el.isSelected(), options);
|
|
11
11
|
return result;
|
|
@@ -22,7 +22,7 @@ async function conditionAttrAndValue(el, attribute, value, options) {
|
|
|
22
22
|
async function toHaveAttributeAndValueFn(received, attribute, value, options = {}) {
|
|
23
23
|
const isNot = this.isNot;
|
|
24
24
|
const { expectation = 'attribute', verb = 'have' } = this;
|
|
25
|
-
const browser = (0, utils_1.getBrowserObject)(received);
|
|
25
|
+
const browser = (0, utils_1.getBrowserObject)(await received);
|
|
26
26
|
return browser.call(async () => {
|
|
27
27
|
let el = await received;
|
|
28
28
|
let attr;
|
|
@@ -45,7 +45,7 @@ exports.toHaveAttributeAndValueFn = toHaveAttributeAndValueFn;
|
|
|
45
45
|
async function toHaveAttributeFn(received, attribute) {
|
|
46
46
|
const isNot = this.isNot;
|
|
47
47
|
const { expectation = 'attribute', verb = 'have' } = this;
|
|
48
|
-
const browser = (0, utils_1.getBrowserObject)(received);
|
|
48
|
+
const browser = (0, utils_1.getBrowserObject)(await received);
|
|
49
49
|
return browser.call(async () => {
|
|
50
50
|
let el = await received;
|
|
51
51
|
const pass = await (0, utils_1.waitUntil)(async () => {
|
|
@@ -28,7 +28,7 @@ async function toHaveChildrenFn(received, expected, options = {}) {
|
|
|
28
28
|
else if (typeof expected === 'object') {
|
|
29
29
|
numberOptions = expected;
|
|
30
30
|
}
|
|
31
|
-
const browser = (0, utils_1.getBrowserObject)(received);
|
|
31
|
+
const browser = (0, utils_1.getBrowserObject)(await received);
|
|
32
32
|
return browser.call(async () => {
|
|
33
33
|
let el = await received;
|
|
34
34
|
let children;
|
|
@@ -31,7 +31,7 @@ async function toHaveElementClassFn(received, className, options = {}) {
|
|
|
31
31
|
const isNot = this.isNot;
|
|
32
32
|
const { expectation = 'class', verb = 'have' } = this;
|
|
33
33
|
const attribute = 'class';
|
|
34
|
-
const browser = (0, utils_1.getBrowserObject)(received);
|
|
34
|
+
const browser = (0, utils_1.getBrowserObject)(await received);
|
|
35
35
|
return browser.call(async () => {
|
|
36
36
|
let el = await received;
|
|
37
37
|
let attr;
|
|
@@ -21,7 +21,7 @@ async function condition(el, property, value, options = {}) {
|
|
|
21
21
|
async function toHaveElementPropertyFn(received, property, value, options = {}) {
|
|
22
22
|
const isNot = this.isNot;
|
|
23
23
|
const { expectation = 'property', verb = 'have' } = this;
|
|
24
|
-
const browser = (0, utils_1.getBrowserObject)(received);
|
|
24
|
+
const browser = (0, utils_1.getBrowserObject)(await received);
|
|
25
25
|
return browser.call(async () => {
|
|
26
26
|
let el = await received;
|
|
27
27
|
let prop;
|
|
@@ -9,7 +9,7 @@ async function condition(el, style, options) {
|
|
|
9
9
|
async function toHaveStyleFn(received, style, options = {}) {
|
|
10
10
|
const isNot = this.isNot;
|
|
11
11
|
const { expectation = 'style', verb = 'have' } = this;
|
|
12
|
-
const browser = (0, utils_1.getBrowserObject)(received);
|
|
12
|
+
const browser = (0, utils_1.getBrowserObject)(await received);
|
|
13
13
|
return browser.call(async () => {
|
|
14
14
|
let el = await received;
|
|
15
15
|
let actualStyle;
|
|
@@ -13,7 +13,7 @@ async function condition(el, text, options) {
|
|
|
13
13
|
async function toHaveTextFn(received, text, options = {}) {
|
|
14
14
|
const isNot = this.isNot;
|
|
15
15
|
const { expectation = 'text', verb = 'have' } = this;
|
|
16
|
-
const browser = (0, utils_1.getBrowserObject)(received);
|
|
16
|
+
const browser = (0, utils_1.getBrowserObject)(await received);
|
|
17
17
|
return browser.call(async () => {
|
|
18
18
|
let el = await received;
|
|
19
19
|
let actualText;
|
|
@@ -17,7 +17,7 @@ async function toBeElementsArrayOfSizeFn(received, expected, options = {}) {
|
|
|
17
17
|
else {
|
|
18
18
|
numberOptions = expected;
|
|
19
19
|
}
|
|
20
|
-
const browser = (0, utils_1.getBrowserObject)(received);
|
|
20
|
+
const browser = (0, utils_1.getBrowserObject)(await received);
|
|
21
21
|
return browser.call(async () => {
|
|
22
22
|
let elements = await received;
|
|
23
23
|
const arrLength = elements.length;
|