Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@applitools/eyes.cypress

Package Overview
Dependencies
Maintainers
12
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/eyes.cypress - npm Package Compare versions

Comparing version 3.2.9 to 3.2.10

2

package.json
{
"name": "@applitools/eyes.cypress",
"version": "3.2.9",
"version": "3.2.10",
"main": "index.js",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -13,4 +13,4 @@ /* global Cypress,cy,window,before,after */

before(() => {
sendRequest({command: 'batchStart'});
const openEyes = poll(function(data) {
return sendRequest({command: 'open', data});
});

@@ -22,2 +22,6 @@

before(() => {
sendRequest({command: 'batchStart'});
});
after(() => {

@@ -30,3 +34,3 @@ return batchEnd({timeout: Cypress.config('eyesTimeout')});

Cypress.log({name: 'Eyes: open'});
return sendRequest({command: 'open', data: Object.assign({testName}, args)});
return openEyes(Object.assign({testName}, args));
});

@@ -33,0 +37,0 @@

'use strict';
const pollingHandler = require('./pollingHandler');
const {PollingStatus} = pollingHandler;
const makeWaitForBatch = require('./waitForBatch');

@@ -11,3 +12,3 @@ const {DiffsFoundError} = require('@applitools/visual-grid-client');

logger.log('[handlers] creating handlers with the following config:', config);
let openEyes, pollBatchEnd, checkWindow, close, resources, openErr;
let pollOpenEyes, pollBatchEnd, checkWindow, close, resources, openErr;
let runningTests = [];

@@ -19,13 +20,18 @@

logger.log(`[handlers] open: close=${typeof close}, args=`, args);
const eyes = await openEyes(args);
const runningTest = {
abort: eyes.abort,
closePromise: undefined,
};
checkWindow = eyes.checkWindow;
close = makeClose(eyes.close, runningTest);
resources = {};
runningTests.push(runningTest);
logger.log('[handlers] open finished');
return eyes;
const pollResult = await pollOpenEyes({timeout: 3600000, args});
logger.log('[handlers] open polling result', pollResult);
if (pollResult.status === PollingStatus.DONE) {
const eyes = pollResult.results;
const runningTest = {
abort: eyes.abort,
closePromise: undefined,
};
checkWindow = eyes.checkWindow;
close = makeClose(eyes.close, runningTest);
resources = {};
runningTests.push(runningTest);
logger.log('[handlers] open finished');
}
return pollResult;
} catch (err) {

@@ -42,3 +48,3 @@ logger.log(`[handlers] openEyes error ${err}`);

const client = makeVisualGridClient(config);
openEyes = client.openEyes;
pollOpenEyes = pollingHandler(client.openEyes, TIMEOUT_MSG);
const waitForBatch = makeWaitForBatch({

@@ -56,3 +62,3 @@ waitForTestResults: client.waitForTestResults,

logger.log(`[handlers] batchEnd, timeout=${timeout}`);
return await pollBatchEnd(timeout);
return await pollBatchEnd({timeout});
},

@@ -59,0 +65,0 @@

@@ -19,3 +19,3 @@ 'use strict';

return (timeout = DEFAULT_TIMEOUT) => {
return ({args, timeout = DEFAULT_TIMEOUT}) => {
switch (pollingStatus) {

@@ -29,3 +29,3 @@ case PollingStatus.IDLE:

}, timeout);
doWork()
doWork(args)
.then(results => {

@@ -32,0 +32,0 @@ pollingStatus = PollingStatus.DONE;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc