expect-webdriverio 5.0.2 → 5.0.4
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.
|
@@ -20,6 +20,7 @@ export async function toBeElementsArrayOfSize(received, expectedValue, options =
|
|
|
20
20
|
numberOptions = expectedValue;
|
|
21
21
|
}
|
|
22
22
|
let elements = await received;
|
|
23
|
+
const originalLength = elements.length;
|
|
23
24
|
const pass = await waitUntil(async () => {
|
|
24
25
|
const isPassing = compareNumbers(elements.length, numberOptions);
|
|
25
26
|
if (isPassing) {
|
|
@@ -28,8 +29,13 @@ export async function toBeElementsArrayOfSize(received, expectedValue, options =
|
|
|
28
29
|
elements = await refetchElements(elements, numberOptions.wait, true);
|
|
29
30
|
return false;
|
|
30
31
|
}, isNot, { ...numberOptions, ...options });
|
|
32
|
+
if (Array.isArray(received) && pass) {
|
|
33
|
+
for (let index = originalLength; index < elements.length; index++) {
|
|
34
|
+
received.push(elements[index]);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
31
37
|
const error = numberError(numberOptions);
|
|
32
|
-
const message = enhanceError(elements, error,
|
|
38
|
+
const message = enhanceError(elements, error, originalLength, this, verb, expectation, '', numberOptions);
|
|
33
39
|
const result = {
|
|
34
40
|
pass,
|
|
35
41
|
message: () => message
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["../src/constants.ts","../src/index.ts","../src/jasmineUtils.ts","../src/matchers.ts","../src/snapshot.ts","../src/types.ts","../src/utils.ts","../src/matchers/snapshot.ts","../src/matchers/browser/toHaveClipboardText.ts","../src/matchers/browser/toHaveTitle.ts","../src/matchers/browser/toHaveUrl.ts","../src/matchers/element/toBeClickable.ts","../src/matchers/element/toBeDisabled.ts","../src/matchers/element/toBeDisplayed.ts","../src/matchers/element/toBeDisplayedInViewport.ts","../src/matchers/element/toBeEnabled.ts","../src/matchers/element/toBeExisting.ts","../src/matchers/element/toBeFocused.ts","../src/matchers/element/toBeSelected.ts","../src/matchers/element/toHaveAttribute.ts","../src/matchers/element/toHaveChildren.ts","../src/matchers/element/toHaveClass.ts","../src/matchers/element/toHaveComputedLabel.ts","../src/matchers/element/toHaveComputedRole.ts","../src/matchers/element/toHaveElementProperty.ts","../src/matchers/element/toHaveHTML.ts","../src/matchers/element/toHaveHeight.ts","../src/matchers/element/toHaveHref.ts","../src/matchers/element/toHaveId.ts","../src/matchers/element/toHaveSize.ts","../src/matchers/element/toHaveStyle.ts","../src/matchers/element/toHaveText.ts","../src/matchers/element/toHaveValue.ts","../src/matchers/element/toHaveWidth.ts","../src/matchers/elements/toBeElementsArrayOfSize.ts","../src/matchers/mock/toBeRequested.ts","../src/matchers/mock/toBeRequestedTimes.ts","../src/matchers/mock/toBeRequestedWith.ts","../src/util/elementsUtil.ts","../src/util/executeCommand.ts","../src/util/formatMessage.ts","../src/util/refetchElements.ts"],"version":"5.6.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expect-webdriverio",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.4",
|
|
4
4
|
"author": "Mykola Grybyk <mykola.grybyk@gmail.com>",
|
|
5
5
|
"description": "WebdriverIO Assertion Library",
|
|
6
6
|
"license": "MIT",
|
|
@@ -67,22 +67,22 @@
|
|
|
67
67
|
"@types/debug": "^4.1.12",
|
|
68
68
|
"@types/jest": "^29.5.12",
|
|
69
69
|
"@types/lodash.isequal": "^4.5.8",
|
|
70
|
-
"@types/node": "^22.
|
|
71
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
72
|
-
"@typescript-eslint/parser": "^8.
|
|
73
|
-
"@vitest/coverage-v8": "^2.
|
|
70
|
+
"@types/node": "^22.9.0",
|
|
71
|
+
"@typescript-eslint/eslint-plugin": "^8.13.0",
|
|
72
|
+
"@typescript-eslint/parser": "^8.13.0",
|
|
73
|
+
"@vitest/coverage-v8": "^2.1.4",
|
|
74
74
|
"c8": "^10.1.2",
|
|
75
75
|
"eslint": "^8.56.0",
|
|
76
76
|
"eslint-plugin-import": "^2.29.1",
|
|
77
|
-
"eslint-plugin-unicorn": "^
|
|
77
|
+
"eslint-plugin-unicorn": "^56.0.0",
|
|
78
78
|
"husky": "^9.1.5",
|
|
79
|
-
"npm-run-all2": "^
|
|
79
|
+
"npm-run-all2": "^7.0.1",
|
|
80
80
|
"release-it": "^17.6.0",
|
|
81
81
|
"rimraf": "^6.0.1",
|
|
82
82
|
"shelljs": "^0.8.5",
|
|
83
83
|
"typescript": "^5.5.4",
|
|
84
|
-
"vitest": "2.
|
|
85
|
-
"webdriverio": "9.
|
|
84
|
+
"vitest": "^2.1.4",
|
|
85
|
+
"webdriverio": "^9.2.11"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
88
|
"@wdio/globals": "^9.0.0",
|
|
@@ -381,7 +381,7 @@ declare namespace ExpectWebdriverIO {
|
|
|
381
381
|
toBeElementsArrayOfSize(
|
|
382
382
|
size: number | ExpectWebdriverIO.NumberOptions,
|
|
383
383
|
options?: ExpectWebdriverIO.NumberOptions
|
|
384
|
-
): R
|
|
384
|
+
): R & Promise<WebdriverIO.ElementArray>;
|
|
385
385
|
|
|
386
386
|
// ==== network mock ====
|
|
387
387
|
/**
|