@applitools/visual-grid-cli-utils 1.21.24 → 1.21.25
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/package.json +1 -1
- package/src/compare.js +5 -1
package/package.json
CHANGED
package/src/compare.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
const {Eyes, Target, Configuration, BatchInfo} = require('@applitools/eyes-images')
|
|
3
3
|
const rerender = require('./rerender')
|
|
4
|
+
const { randomUUID } = require('crypto')
|
|
5
|
+
|
|
4
6
|
async function main(args) {
|
|
5
7
|
async function runRerender(browser) {
|
|
6
8
|
const {finalOutputFile} = await rerender({...args, browser})
|
|
@@ -26,11 +28,13 @@ async function compareWithEyes(rerenderResults) {
|
|
|
26
28
|
// Set the configuration to eyes
|
|
27
29
|
eyes.setConfiguration(configuration)
|
|
28
30
|
|
|
31
|
+
const uuid = randomUUID()
|
|
32
|
+
|
|
29
33
|
let i = 0
|
|
30
34
|
for (const result of rerenderResults) {
|
|
31
35
|
const {browser: name, image: file} = result
|
|
32
36
|
|
|
33
|
-
await eyes.open('VG-CLI compare',
|
|
37
|
+
await eyes.open('VG-CLI compare', `Compare browsers ${uuid}`, {width: 800, height: 600})
|
|
34
38
|
const resp = await eyes.check(name, Target.image(file))
|
|
35
39
|
console.log(`${name} resp ${i} = ${resp}`)
|
|
36
40
|
if (++i === rerenderResults.length - 1) {
|