@applitools/eyes-cypress 3.25.4 → 3.25.7

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,28 @@
5
5
 
6
6
 
7
7
 
8
+
9
+
10
+ ## 3.25.7 - 2022/5/6
11
+
12
+ ### Features
13
+ ### Bug fixes
14
+ - update the README entry 'saveNewTests'
15
+ - added `properties` and `notifyOnCompletion` as optional Types of Batch (for TS)
16
+
17
+ ## 3.25.6 - 2022/4/25
18
+
19
+ ### Features
20
+ ### Bug fixes
21
+ - 'batch.properties' and 'batch.notifyOnCompletion' not propagated correctly
22
+ - 'batch.name' was overridden in case 'batch.id' was not defined
23
+
24
+ ## 3.25.5 - 2022/4/19
25
+
26
+ ### Features
27
+ ### Bug fixes
28
+ - fix beforeCaptureScreenshot hook not being respected
29
+
8
30
  ## 3.25.4 - 2022/4/15
9
31
 
10
32
  ### Features
package/README.md CHANGED
@@ -580,7 +580,7 @@ The list above is also the order of precedence, which means that if you pass a p
580
580
  | `baselineBranchName` | undefined | The name of the baseline branch. |
581
581
  | `parentBranchName` | undefined | Sets the branch under which new branches are created. |
582
582
  | `saveFailedTests` | false | Set whether or not failed tests are saved by default. |
583
- | `saveNewTests` | false | Set whether or not new tests are saved by default. |
583
+ | `saveNewTests` | true | Set whether or not new tests are saved by default. |
584
584
  | `properties` | undefined | Custom properties for the eyes test. The format is an array of objects with name/value properties. For example: `[{name: 'My prop', value:'My value'}]`. |
585
585
  | `ignoreDisplacements` | false | Sets whether Test Manager should intially display mismatches for image features that have only been displaced, as opposed to real mismatches. |
586
586
  | `compareWithParentBranch` | false | |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes-cypress",
3
- "version": "3.25.4",
3
+ "version": "3.25.7",
4
4
  "main": "index.js",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "bin": {
@@ -46,11 +46,11 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@applitools/dom-snapshot": "4.5.12",
49
- "@applitools/eyes-api": "1.3.0",
50
- "@applitools/eyes-universal": "2.2.0",
49
+ "@applitools/eyes-api": "1.3.1",
50
+ "@applitools/eyes-universal": "2.5.1",
51
51
  "@applitools/functional-commons": "1.6.0",
52
- "@applitools/logger": "1.0.12",
53
- "@applitools/visual-grid-client": "15.12.1",
52
+ "@applitools/logger": "1.1.2",
53
+ "@applitools/visual-grid-client": "15.12.13",
54
54
  "body-parser": "1.19.0",
55
55
  "chalk": "3.0.0",
56
56
  "cors": "2.8.5",
@@ -65,8 +65,8 @@
65
65
  "@applitools/sdk-coverage-tests": "^2.3.18",
66
66
  "@applitools/snaptdout": "1.0.1",
67
67
  "@applitools/test-server": "1.0.8",
68
- "@applitools/test-utils": "1.3.1",
69
- "@applitools/types": "^1.3.1",
68
+ "@applitools/test-utils": "1.3.2",
69
+ "@applitools/types": "^1.4.2",
70
70
  "@applitools/utils": "1.2.14",
71
71
  "@types/node": "17.0.13",
72
72
  "@types/ws": "^8.2.2",
@@ -5,7 +5,7 @@ function eyesCheckMapValues({args}) {
5
5
  function toCheckWindowConfiguration(config = {}) {
6
6
  const mappedValues = [
7
7
  'tag',
8
- 'hooks',
8
+ 'scriptHooks',
9
9
  'ignore',
10
10
  'floating',
11
11
  'strict',
@@ -20,7 +20,7 @@ function toCheckWindowConfiguration(config = {}) {
20
20
  let shadowDomSettings = {};
21
21
  const checkSettings = {
22
22
  name: config.tag,
23
- scriptHooks: config.hooks,
23
+ hooks: config.scriptHooks,
24
24
  ignoreRegions: config.ignore,
25
25
  floatingRegions: convertFloatingRegion(config.floating),
26
26
  strictRegions: config.strict,
@@ -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') {