@applitools/eyes-cypress 3.25.5 → 3.25.6

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/CHANGELOG.md CHANGED
@@ -5,6 +5,15 @@
5
5
 
6
6
 
7
7
 
8
+
9
+
10
+ ## 3.25.6 - 2022/4/25
11
+
12
+ ### Features
13
+ ### Bug fixes
14
+ - 'batch.properties' and 'batch.notifyOnCompletion' not propagated correctly
15
+ - 'batch.name' was overridden in case 'batch.id' was not defined
16
+
8
17
  ## 3.25.5 - 2022/4/19
9
18
 
10
19
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes-cypress",
3
- "version": "3.25.5",
3
+ "version": "3.25.6",
4
4
  "main": "index.js",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "bin": {
@@ -47,10 +47,10 @@
47
47
  "dependencies": {
48
48
  "@applitools/dom-snapshot": "4.5.12",
49
49
  "@applitools/eyes-api": "1.3.0",
50
- "@applitools/eyes-universal": "2.2.1",
50
+ "@applitools/eyes-universal": "2.2.5",
51
51
  "@applitools/functional-commons": "1.6.0",
52
52
  "@applitools/logger": "1.0.12",
53
- "@applitools/visual-grid-client": "15.12.2",
53
+ "@applitools/visual-grid-client": "15.12.4",
54
54
  "body-parser": "1.19.0",
55
55
  "chalk": "3.0.0",
56
56
  "cors": "2.8.5",
@@ -1,29 +1,35 @@
1
+ const batchPropertiesRetriever = (args, appliConfFile) => {
2
+ return function(prop, nestedProp) {
3
+ nestedProp = nestedProp || prop;
4
+ if (args.hasOwnProperty(prop)) {
5
+ return args[prop];
6
+ } else if (args.batch && args.batch.hasOwnProperty(nestedProp)) {
7
+ return args.batch[nestedProp];
8
+ } else if (appliConfFile.hasOwnProperty(prop)) {
9
+ return appliConfFile[prop];
10
+ } else if (appliConfFile.batch && appliConfFile.batch.hasOwnProperty(nestedProp)) {
11
+ return appliConfFile.batch[nestedProp];
12
+ }
13
+ return undefined;
14
+ };
15
+ };
1
16
  function eyesOpenMapValues({args, appliConfFile, testName, shouldUseBrowserHooks}) {
2
17
  let browsersInfo = args.browser || appliConfFile.browser;
3
18
  let accessibilitySettings = args.accessibilityValidation || appliConfFile.accessibilityValidation;
19
+ const batchProperties = batchPropertiesRetriever(args, appliConfFile);
4
20
  const batch = {
5
- id:
6
- args.batchId ||
7
- (args.batch ? args.batch.id : undefined) ||
8
- appliConfFile.batchId ||
9
- (appliConfFile.batch ? appliConfFile.batch.id : undefined),
10
- name:
11
- args.batchName ||
12
- (args.batch ? args.batch.name : undefined) ||
13
- appliConfFile.batchName ||
14
- (appliConfFile.batch ? appliConfFile.batch.name : undefined),
15
- sequenceName:
16
- args.batchSequenceName ||
17
- (args.batch ? args.batch.sequenceName : undefined) ||
18
- appliConfFile.batchSequenceName ||
19
- (appliConfFile.batch ? appliConfFile.batch.sequenceName : undefined),
21
+ id: batchProperties('batchId', 'id'),
22
+ name: batchProperties('batchName', 'name'),
23
+ sequenceName: batchProperties('batchSequenceName', 'sequenceName'),
24
+ notifyOnCompletion: batchProperties('notifyOnCompletion'),
25
+ properties:
26
+ (args.batch ? args.batch.properties : undefined) ||
27
+ (appliConfFile.batch ? appliConfFile.batch.properties : undefined),
20
28
  };
21
-
22
- if (!batch.name) {
23
- delete batch['name'];
24
- }
25
- if (!batch.sequenceName) {
26
- delete batch['sequenceName'];
29
+ for (let prop in batch) {
30
+ if (typeof batch[prop] === 'undefined') {
31
+ delete batch[prop];
32
+ }
27
33
  }
28
34
 
29
35
  const mappedValues = [
@@ -16,9 +16,7 @@ function makeConfig() {
16
16
  });
17
17
 
18
18
  if ((!config.batch || !config.batch.id) && !config.batchId) {
19
- config.batch = {
20
- id: uuid.v4(),
21
- };
19
+ config.batch = {id: uuid.v4(), ...config.batch};
22
20
  }
23
21
 
24
22
  if (config.failCypressOnDiff === '0') {