@applitools/eyes-cypress 3.25.1 → 3.25.4

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
@@ -3,6 +3,30 @@
3
3
  ## Unreleased
4
4
 
5
5
 
6
+
7
+
8
+ ## 3.25.4 - 2022/4/15
9
+
10
+ ### Features
11
+ ### Bug fixes
12
+ - `extractText` now supports regions that don't use hints while using `x`/`y` coordinates
13
+ - add 'waitBeforeCapture' as an available type for 'Eyes.Open' and 'Eyes.Check' (for Typescript)
14
+ - Support data urls in iframes
15
+
16
+ ## 3.25.3 - 2022/3/29
17
+
18
+ ### Features
19
+ ### Bug fixes
20
+ - consider batchId from config file and environments variable when closing batch
21
+ - Fix config file parameters (e.g. `browser`) not being passed
22
+
23
+ ## 3.25.2 - 2022/3/23
24
+
25
+ ### Features
26
+ ### Bug fixes
27
+ - fix Cypress Documentation inaccuracies
28
+ - Support batchId, batchName and batchSequenceName from the config file, eyesOpen and environment variables
29
+
6
30
  ## 3.25.1 - 2022/3/15
7
31
 
8
32
  - fix test script
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes-cypress",
3
- "version": "3.25.1",
3
+ "version": "3.25.4",
4
4
  "main": "index.js",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "bin": {
@@ -19,8 +19,8 @@
19
19
  "cypress:run": "cypress run --config-file test/fixtures/cypress-play.json --spec=test/fixtures/testApp/cypress/integration-play/play.js",
20
20
  "cypress:run:new": "node_modules/cypress-new/bin/cypress run --config-file test/fixtures/cypress-play.json --spec=test/fixtures/testApp/cypress/integration-play/play.js",
21
21
  "cypress:play": "cd test/fixtures/testApp && cypress run --config integrationFolder=cypress/integration-play,pluginsFile=cypress/plugins/index-play.js,supportFile=cypress/support/index-run.js --spec=cypress/integration-play/play.js",
22
- "preversion": "yarn build && bongo preversion --skip-deps",
23
- "version": "bongo version",
22
+ "preversion": "yarn build && bongo preversion --skip-deps --verifyPendingChanges",
23
+ "version": "bongo version --withPendingChanges",
24
24
  "postversion": "bongo postversion --skip-release-notification",
25
25
  "deps": "bongo deps",
26
26
  "generate:tests": "coverage-tests generate",
@@ -46,11 +46,11 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@applitools/dom-snapshot": "4.5.12",
49
- "@applitools/eyes-api": "1.2.0",
50
- "@applitools/eyes-universal": "2.0.1",
49
+ "@applitools/eyes-api": "1.3.0",
50
+ "@applitools/eyes-universal": "2.2.0",
51
51
  "@applitools/functional-commons": "1.6.0",
52
- "@applitools/logger": "1.0.11",
53
- "@applitools/visual-grid-client": "15.10.1",
52
+ "@applitools/logger": "1.0.12",
53
+ "@applitools/visual-grid-client": "15.12.1",
54
54
  "body-parser": "1.19.0",
55
55
  "chalk": "3.0.0",
56
56
  "cors": "2.8.5",
@@ -60,14 +60,14 @@
60
60
  "ws": "8.5.0"
61
61
  },
62
62
  "devDependencies": {
63
+ "@applitools/bongo": "^2.0.3",
63
64
  "@applitools/scripts": "1.1.0",
64
65
  "@applitools/sdk-coverage-tests": "^2.3.18",
65
- "@applitools/sdk-release-kit": "0.13.11",
66
66
  "@applitools/snaptdout": "1.0.1",
67
67
  "@applitools/test-server": "1.0.8",
68
- "@applitools/test-utils": "1.1.5",
69
- "@applitools/types": "^1.2.2",
70
- "@applitools/utils": "1.2.13",
68
+ "@applitools/test-utils": "1.3.1",
69
+ "@applitools/types": "^1.3.1",
70
+ "@applitools/utils": "1.2.14",
71
71
  "@types/node": "17.0.13",
72
72
  "@types/ws": "^8.2.2",
73
73
  "@typescript-eslint/eslint-plugin": "^5.10.2",
@@ -1,6 +1,31 @@
1
1
  function eyesOpenMapValues({args, appliConfFile, testName, shouldUseBrowserHooks}) {
2
2
  let browsersInfo = args.browser || appliConfFile.browser;
3
3
  let accessibilitySettings = args.accessibilityValidation || appliConfFile.accessibilityValidation;
4
+ 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),
20
+ };
21
+
22
+ if (!batch.name) {
23
+ delete batch['name'];
24
+ }
25
+ if (!batch.sequenceName) {
26
+ delete batch['sequenceName'];
27
+ }
28
+
4
29
  const mappedValues = [
5
30
  'accessibilityValidation',
6
31
  'browser',
@@ -9,6 +34,9 @@ function eyesOpenMapValues({args, appliConfFile, testName, shouldUseBrowserHooks
9
34
  'enablePatterns',
10
35
  'ignoreDisplacements',
11
36
  'ignoreCaret',
37
+ 'batchName',
38
+ 'batchId',
39
+ 'batchSequenceName',
12
40
  ];
13
41
 
14
42
  if (browsersInfo) {
@@ -29,12 +57,13 @@ function eyesOpenMapValues({args, appliConfFile, testName, shouldUseBrowserHooks
29
57
  ignoreDisplacements: args.ignoreDisplacements || appliConfFile.ignoreDisplacements,
30
58
  };
31
59
 
60
+ const appliConfFileCopy = {...appliConfFile};
32
61
  for (const val of mappedValues) {
33
62
  if (args.hasOwnProperty(val)) {
34
63
  delete args[val];
35
64
  }
36
- if (appliConfFile.hasOwnProperty(val)) {
37
- delete appliConfFile[val];
65
+ if (appliConfFileCopy.hasOwnProperty(val)) {
66
+ delete appliConfFileCopy[val];
38
67
  }
39
68
  }
40
69
 
@@ -42,11 +71,12 @@ function eyesOpenMapValues({args, appliConfFile, testName, shouldUseBrowserHooks
42
71
  ...args,
43
72
  browsersInfo,
44
73
  defaultMatchSettings,
74
+ batch,
45
75
  };
46
76
 
47
77
  return Object.assign(
48
78
  {testName, dontCloseBatches: !shouldUseBrowserHooks},
49
- appliConfFile,
79
+ appliConfFileCopy,
50
80
  mappedArgs,
51
81
  );
52
82
  }
@@ -15,9 +15,12 @@ function makeConfig() {
15
15
  ],
16
16
  });
17
17
 
18
- if (!config.batch || !config.batch.id) {
19
- config.batch = {id: uuid.v4(), ...config.batch};
18
+ if ((!config.batch || !config.batch.id) && !config.batchId) {
19
+ config.batch = {
20
+ id: uuid.v4(),
21
+ };
20
22
  }
23
+
21
24
  if (config.failCypressOnDiff === '0') {
22
25
  config.failCypressOnDiff = false;
23
26
  }
@@ -26,7 +26,7 @@ function makeGlobalRunHooks({closeManager, closeBatches, closeUniversalServer})
26
26
  }
27
27
  if (!config.appliConfFile.dontCloseBatches) {
28
28
  await closeBatches({
29
- batchIds: [config.appliConfFile.batch.id],
29
+ batchIds: [config.appliConfFile.batchId || config.appliConfFile.batch.id],
30
30
  serverUrl: config.appliConfFile.serverUrl,
31
31
  proxy: config.appliConfFile.proxy,
32
32
  apiKey: config.appliConfFile.apiKey,