@applitools/visual-grid-client
Advanced tools
Comparing version 7.2.2 to 7.2.3
{ | ||
"name": "@applitools/visual-grid-client", | ||
"version": "7.2.2", | ||
"version": "7.2.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "src/visual-grid-client.js", |
@@ -63,3 +63,8 @@ 'use strict'; | ||
setCheckWindowPromises( | ||
browsers.map((_browser, i) => checkWindowJob(getCheckWindowPromises()[i], i).catch(setError)), | ||
browsers.map( | ||
(_browser, i) => | ||
checkWindowJob(getCheckWindowPromises()[i], i) | ||
.catch(setError) | ||
.then(() => openEyesPromises[i]), // the checkWindow job must end after openEyes has finished, otherwise resolving the whole test in close will fail, because the test was never started. This situation could happen when a render fails and the checkWindow promise is rejected before waiting on openEyesPromise. | ||
), | ||
); | ||
@@ -81,2 +86,3 @@ | ||
); | ||
renderJobs && renderJobs[index](); | ||
return; | ||
@@ -87,2 +93,3 @@ } | ||
setError(renderErr); | ||
renderJobs && renderJobs[index](); | ||
return; | ||
@@ -98,5 +105,23 @@ } | ||
); | ||
const [renderStatusErr, renderStatusResult] = await presult( | ||
waitForRenderedStatus([renderId], renderWrapper, getError), | ||
); | ||
if (getError()) { | ||
logger.log('aborting checkWindow after render status finished'); | ||
renderJobs && renderJobs[index](); | ||
return; | ||
} | ||
if (renderStatusErr) { | ||
logger.log('aborting checkWindow becuase render status failed'); | ||
setError(renderStatusErr); | ||
renderJobs && renderJobs[index](); | ||
return; | ||
} | ||
const [ | ||
{imageLocation: screenshotUrl, domLocation, userAgent, deviceSize, selectorRegions}, | ||
] = await waitForRenderedStatus([renderId], renderWrapper, getError); | ||
] = renderStatusResult; | ||
@@ -109,5 +134,3 @@ if (screenshotUrl) { | ||
if (renderJobs) { | ||
renderJobs[index](); | ||
} | ||
renderJobs && renderJobs[index](); | ||
@@ -114,0 +137,0 @@ const wrapper = wrappers[index]; |
100737
1857