BlinkDiffComparison Class
Blink-Diff comparison object
Constructor
Item Index
Methods
- _getApprovedImagePath
- _getBaseName
- _getBuildImagePath
- _getDiffImagePath
- _getFolderName
- _logMethodCall
- _needsApprovedSuffix
- _needsBuildSuffix
- _needsDiffSuffix
- _prepareFolders
- _requestJSON
- _saveBlob
- compare
- getApprovedPath
- getBuildPath
- getDiffPath
- getDriver
- getOptions
- setup
- shouldAutoApprove
- shouldBatchFailures
- shouldFailOnAdditions
- shouldFailOnDifference
- shouldOutputOnSuccess
- tearDown
Methods
_getApprovedImagePath
-
title
-
[id=1]
Gets the approved path for the current image
Parameters:
Returns:
_getBaseName
-
title
-
id
Gets the name of the file-base, converting unique identifiers to filename safe strings
Parameters:
Returns:
_getBuildImagePath
-
title
-
[id=1]
Gets the build path for the current image
Parameters:
Returns:
_getDiffImagePath
-
title
-
[id=1]
Gets the difference path for the current image
Parameters:
Returns:
_getFolderName
()
String
private
Gets the name of the browser folder, categorizing screenshots from the same browser + platform
Returns:
_needsApprovedSuffix
()
Boolean
private
Checks if a filename suffix is required for the approved folder
Note: This is only true if multiple file-types end up in the same folder
Returns:
_needsBuildSuffix
()
Boolean
private
Checks if a filename suffix is required for the build folder
Note: This is only true if multiple file-types end up in the same folder
Returns:
_needsDiffSuffix
()
Boolean
private
Checks if a filename suffix is required for the diff folder
Note: This is only true if multiple file-types end up in the same folder
Returns:
_prepareFolders
()
private
Prepares all of the folders, creating them if needed
_requestJSON
-
method
-
path
-
[body]
Performs a context dependent JSON request for the current session. The result is parsed for errors.
Returns:
_saveBlob
-
filePath
-
blob
Saves a blob to the filesystem
Parameters:
-
filePath
String -
blob
Buffer
compare
-
title
-
imageBlob
-
[options]
Compares a specific screenshot
setup
()
Setup of comparison
shouldFailOnDifference
()
Boolean
Should an exception be thrown when there are differences?
Returns:
shouldOutputOnSuccess
()
Boolean
Should an output be created when comparison is successful?
Returns:
tearDown
()
Tear-down of comparison