@applitools/eyes-cypress 3.24.0-beta.3 → 3.24.0-beta.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.
- package/README.md +7 -3
- package/package.json +1 -1
- package/src/browser/commands.js +10 -7
package/README.md
CHANGED
|
@@ -522,11 +522,15 @@ cy.eyesClose();
|
|
|
522
522
|
#### GetAllTestResults
|
|
523
523
|
|
|
524
524
|
Returns an object with the applitools test results from a given test / test file.
|
|
525
|
-
This should be called after `close
|
|
525
|
+
This should be called after `close`. For example:
|
|
526
526
|
|
|
527
527
|
```js
|
|
528
|
-
|
|
529
|
-
|
|
528
|
+
after(() => {
|
|
529
|
+
cy.eyesGetAllTestResults().then(results => {
|
|
530
|
+
console.log(results)
|
|
531
|
+
})
|
|
532
|
+
})
|
|
533
|
+
```
|
|
530
534
|
|
|
531
535
|
## Concurrency
|
|
532
536
|
|
package/package.json
CHANGED
package/src/browser/commands.js
CHANGED
|
@@ -32,14 +32,17 @@ const shouldUseBrowserHooks =
|
|
|
32
32
|
(getGlobalConfigProperty('isInteractive') ||
|
|
33
33
|
!getGlobalConfigProperty('eyesIsGlobalHooksSupported'));
|
|
34
34
|
|
|
35
|
-
Cypress.Commands.add('eyesGetAllTestResults',
|
|
36
|
-
|
|
37
|
-
isCurrentTestDisabled
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
Cypress.Commands.add('eyesGetAllTestResults', () => {
|
|
36
|
+
return cy.then({timeout: 86400000}, async () => {
|
|
37
|
+
if (isCurrentTestDisabled) {
|
|
38
|
+
isCurrentTestDisabled = false;
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
await Promise.all(closePromiseArr);
|
|
42
|
+
return socket.request('EyesManager.closeAllEyes', {manager, throwErr});
|
|
43
|
+
})
|
|
42
44
|
});
|
|
45
|
+
|
|
43
46
|
|
|
44
47
|
if (shouldUseBrowserHooks) {
|
|
45
48
|
after(() => {
|