expect-webdriverio 4.11.6 → 4.11.7

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.
@@ -6,7 +6,7 @@ export async function toBeClickable(received, options = DEFAULT_OPTIONS) {
6
6
  matcherName: 'toBeClickable',
7
7
  options,
8
8
  });
9
- const result = await executeCommandBe.call(this, received, el => el.isClickable(), options);
9
+ const result = await executeCommandBe.call(this, received, el => el?.isClickable(), options);
10
10
  await options.afterAssertion?.({
11
11
  matcherName: 'toBeClickable',
12
12
  options,
@@ -6,7 +6,7 @@ export async function toBeDisplayed(received, options = DEFAULT_OPTIONS) {
6
6
  matcherName: 'toBeDisplayed',
7
7
  options,
8
8
  });
9
- const result = await executeCommandBe.call(this, received, el => el.isDisplayed(), options);
9
+ const result = await executeCommandBe.call(this, received, el => el?.isDisplayed(), options);
10
10
  await options.afterAssertion?.({
11
11
  matcherName: 'toBeDisplayed',
12
12
  options,
@@ -6,7 +6,7 @@ export async function toBeDisplayedInViewport(received, options = DEFAULT_OPTION
6
6
  matcherName: 'toBeDisplayedInViewport',
7
7
  options,
8
8
  });
9
- const result = await executeCommandBe.call(this, received, el => el.isDisplayedInViewport(), options);
9
+ const result = await executeCommandBe.call(this, received, el => el?.isDisplayedInViewport(), options);
10
10
  await options.afterAssertion?.({
11
11
  matcherName: 'toBeDisplayedInViewport',
12
12
  options,
@@ -6,7 +6,7 @@ export async function toBeEnabled(received, options = DEFAULT_OPTIONS) {
6
6
  matcherName: 'toBeEnabled',
7
7
  options,
8
8
  });
9
- const result = await executeCommandBe.call(this, received, el => el.isEnabled(), options);
9
+ const result = await executeCommandBe.call(this, received, el => el?.isEnabled(), options);
10
10
  await options.afterAssertion?.({
11
11
  matcherName: 'toBeEnabled',
12
12
  options,
@@ -7,7 +7,7 @@ export async function toExist(received, options = DEFAULT_OPTIONS) {
7
7
  matcherName: 'toExist',
8
8
  options,
9
9
  });
10
- const result = await executeCommandBe.call(this, received, el => el.isExisting(), options);
10
+ const result = await executeCommandBe.call(this, received, el => el?.isExisting(), options);
11
11
  await options.afterAssertion?.({
12
12
  matcherName: 'toExist',
13
13
  options,
@@ -6,7 +6,7 @@ export async function toBeFocused(received, options = DEFAULT_OPTIONS) {
6
6
  matcherName: 'toBeFocused',
7
7
  options,
8
8
  });
9
- const result = await executeCommandBe.call(this, received, el => el.isFocused(), options);
9
+ const result = await executeCommandBe.call(this, received, el => el?.isFocused(), options);
10
10
  await options.afterAssertion?.({
11
11
  matcherName: 'toBeFocused',
12
12
  options,
@@ -6,7 +6,7 @@ export async function toBeSelected(received, options = DEFAULT_OPTIONS) {
6
6
  matcherName: 'toBeSelected',
7
7
  options,
8
8
  });
9
- const result = await executeCommandBe.call(this, received, el => el.isSelected(), options);
9
+ const result = await executeCommandBe.call(this, received, el => el?.isSelected(), options);
10
10
  await options.afterAssertion?.({
11
11
  matcherName: 'toBeSelected',
12
12
  options,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expect-webdriverio",
3
- "version": "4.11.6",
3
+ "version": "4.11.7",
4
4
  "author": "Mykola Grybyk <mykola.grybyk@gmail.com>",
5
5
  "description": "WebdriverIO Assertion Library",
6
6
  "license": "MIT",