@applitools/eyes-sdk-core
Advanced tools
Comparing version 5.9.3 to 5.10.0
@@ -6,2 +6,14 @@ # Change Log | ||
# [5.10.0](https://github.com/applitools/eyes.sdk.javascript1/compare/@applitools/eyes-sdk-core@5.9.3...@applitools/eyes-sdk-core@5.10.0) (2019-06-24) | ||
### Features | ||
* **eyes-sdk-core:** added renderId to MatchWindowData ([db05cbf](https://github.com/applitools/eyes.sdk.javascript1/commit/db05cbf)) | ||
* **eyes-sdk-core:** remove `isSaved` property of TestResults ([fd9cf90](https://github.com/applitools/eyes.sdk.javascript1/commit/fd9cf90)) | ||
## [5.9.3](https://github.com/applitools/eyes.sdk.javascript1/compare/@applitools/eyes-sdk-core@5.9.2...@applitools/eyes-sdk-core@5.9.3) (2019-06-19) | ||
@@ -8,0 +20,0 @@ |
@@ -427,3 +427,2 @@ 'use strict'; | ||
results.setIsNew(isNewSession); | ||
results.setIsSaved(save); | ||
results.setUrl(sessionResultsUrl); | ||
@@ -430,0 +429,0 @@ |
@@ -35,2 +35,4 @@ 'use strict'; | ||
this._stitchContent = false; | ||
/** @type {string} */ | ||
this._renderId = undefined; | ||
@@ -90,2 +92,23 @@ this._timeout = timeout; | ||
/** | ||
* Set the render ID of the screenshot. | ||
* | ||
* @package | ||
* @param {string} renderId - The render ID to use. | ||
* @return {this} - This instance of the settings object. | ||
*/ | ||
renderId(renderId) { | ||
this._renderId = renderId; | ||
return this; | ||
} | ||
/** | ||
* @ignore | ||
* @return {string} | ||
*/ | ||
getRenderId() { | ||
return this._renderId; | ||
} | ||
// noinspection JSUnusedGlobalSymbols | ||
/** | ||
* Shortcut to set the match level to {@code MatchLevel.LAYOUT}. | ||
@@ -92,0 +115,0 @@ * |
@@ -13,2 +13,3 @@ 'use strict'; | ||
* @param {string} name - The tag of the window to be matched. | ||
* @param {string} renderId - The render ID of the screenshot to match. | ||
* @param {Trigger[]} userInputs - A list of triggers between the previous matchWindow call and the current matchWindow | ||
@@ -26,3 +27,3 @@ * call. Can be array of size 0, but MUST NOT be null. | ||
*/ | ||
constructor({ name, userInputs, ignoreMismatch, ignoreMatch, forceMismatch, forceMatch, imageMatchSettings } = {}) { | ||
constructor({ name, renderId, userInputs, ignoreMismatch, ignoreMatch, forceMismatch, forceMatch, imageMatchSettings } = {}) { | ||
if (arguments.length > 1) { | ||
@@ -35,2 +36,3 @@ throw new TypeError('Please, use object as a parameter to the constructor!'); | ||
this._name = name; | ||
this._renderId = renderId; | ||
this._userInputs = userInputs; | ||
@@ -54,2 +56,10 @@ this._ignoreMismatch = ignoreMismatch; | ||
/** | ||
* @return {string} | ||
*/ | ||
getRenderId() { | ||
return this._renderId; | ||
} | ||
// noinspection JSUnusedGlobalSymbols | ||
/** | ||
* @return {Trigger[]} | ||
@@ -56,0 +66,0 @@ */ |
@@ -38,2 +38,3 @@ 'use strict'; | ||
* @param {string} name - Optional tag to be associated with the match (can be {@code null}). | ||
* @param {string} renderId - Optional render ID to be associated with the match (can be {@code null}). | ||
* @param {boolean} ignoreMismatch - Whether to instruct the server to ignore the match attempt in case of a mismatch. | ||
@@ -43,5 +44,5 @@ * @param {ImageMatchSettings} imageMatchSettings - The settings to use. | ||
*/ | ||
async performMatch(userInputs, appOutput, name, ignoreMismatch, imageMatchSettings) { | ||
async performMatch(userInputs, appOutput, name, renderId, ignoreMismatch, imageMatchSettings) { | ||
// Prepare match model. | ||
const options = new Options({ name, userInputs, ignoreMismatch, ignoreMatch: false, forceMismatch: false, forceMatch: false, imageMatchSettings }); | ||
const options = new Options({ name, renderId, userInputs, ignoreMismatch, ignoreMatch: false, forceMismatch: false, forceMatch: false, imageMatchSettings }); | ||
const data = new MatchSingleWindowData({ startInfo: this._startInfo, userInputs, appOutput: appOutput.getAppOutput(), tag: name, ignoreMismatch, options }); | ||
@@ -48,0 +49,0 @@ data.setRemoveSessionIfMatching(ignoreMismatch); |
@@ -51,2 +51,3 @@ 'use strict'; | ||
* @param {string} name - Optional tag to be associated with the match (can be {@code null}). | ||
* @param {string} renderId - Optional render ID to be associated with the match (can be {@code null}). | ||
* @param {boolean} ignoreMismatch - Whether to instruct the server to ignore the match attempt in case of a mismatch. | ||
@@ -56,5 +57,5 @@ * @param {ImageMatchSettings} imageMatchSettings - The settings to use. | ||
*/ | ||
async performMatch(userInputs, appOutput, name, ignoreMismatch, imageMatchSettings) { | ||
async performMatch(userInputs, appOutput, name, renderId, ignoreMismatch, imageMatchSettings) { | ||
// Prepare match model. | ||
const options = new Options({ name, userInputs, ignoreMismatch, ignoreMatch: false, forceMismatch: false, forceMatch: false, imageMatchSettings }); | ||
const options = new Options({ name, renderId, userInputs, ignoreMismatch, ignoreMatch: false, forceMismatch: false, forceMatch: false, imageMatchSettings }); | ||
const data = new MatchWindowData({ userInputs, appOutput: appOutput.getAppOutput(), tag: name, ignoreMismatch, options }); | ||
@@ -299,5 +300,6 @@ // Perform match. | ||
const appOutput = await this._appOutputProvider.getAppOutput(region, this._lastScreenshot, checkSettings); | ||
const renderId = checkSettings.getRenderId(); | ||
const screenshot = appOutput.getScreenshot(); | ||
const matchSettings = await this.createImageMatchSettings(checkSettings, screenshot); | ||
this._matchResult = await this.performMatch(userInputs, appOutput, tag, ignoreMismatch, matchSettings); | ||
this._matchResult = await this.performMatch(userInputs, appOutput, tag, renderId, ignoreMismatch, matchSettings); | ||
return screenshot; | ||
@@ -304,0 +306,0 @@ } |
@@ -361,3 +361,2 @@ 'use strict'; | ||
* @param {boolean} [isNew] | ||
* @param {boolean} [isSaved] | ||
* @param {boolean} [isDifferent] | ||
@@ -380,3 +379,3 @@ * @param {boolean} [isAborted] | ||
constructor({ id, name, secretToken, status, appName, batchName, batchId, branchName, hostOS, hostApp, | ||
hostDisplaySize, startedAt, duration, isNew, isSaved, isDifferent, isAborted, appUrls, apiUrls, stepsInfo, steps, | ||
hostDisplaySize, startedAt, duration, isNew, isDifferent, isAborted, appUrls, apiUrls, stepsInfo, steps, | ||
matches, mismatches, missing, exactMatches, strictMatches, contentMatches, layoutMatches, noneMatches, url } = {}) { | ||
@@ -418,3 +417,2 @@ if (hostDisplaySize && !(hostDisplaySize instanceof RectangleSize)) { | ||
this._isNew = isNew; | ||
this._isSaved = isSaved; | ||
this._isDifferent = isDifferent; | ||
@@ -664,16 +662,2 @@ this._isAborted = isAborted; | ||
/** | ||
* @return {boolean} - Whether or not test was automatically saved as a baseline. | ||
*/ | ||
getIsSaved() { | ||
return this._isSaved; | ||
} | ||
/** | ||
* @param {boolean} value - Whether or not test was automatically saved as a baseline. | ||
*/ | ||
setIsSaved(value) { | ||
this._isSaved = value; | ||
} | ||
/** | ||
* @return {boolean} | ||
@@ -680,0 +664,0 @@ */ |
@@ -155,5 +155,2 @@ 'use strict'; | ||
} | ||
if (currentResult.getIsSaved()) { | ||
tapString += '#\tTest was automatically saved as a baseline.\n'; | ||
} | ||
} | ||
@@ -226,5 +223,2 @@ | ||
} | ||
if (currentResult.getIsSaved()) { | ||
tapString += '#\tTest was automatically saved as a baseline.\n'; | ||
} | ||
} | ||
@@ -231,0 +225,0 @@ |
{ | ||
"name": "@applitools/eyes-sdk-core", | ||
"version": "5.9.3", | ||
"version": "5.10.0", | ||
"description": "The core components of Eyes JavaScript SDK", | ||
@@ -49,3 +49,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "19dde597efd11b9cb22fe8c6aeb131ab8ba5e04c" | ||
"gitHead": "aa1eed8c7e2aa2a7083a5f6e5c7fa252e27f5578" | ||
} |
370251
10642