@percy/core 1.27.2 → 1.27.3-beta.0
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/dist/config.js +25 -1
- package/dist/utils.js +8 -6
- package/package.json +8 -8
package/dist/config.js
CHANGED
|
@@ -51,9 +51,33 @@ export const configSchema = {
|
|
|
51
51
|
type: 'string'
|
|
52
52
|
},
|
|
53
53
|
freezeAnimation: {
|
|
54
|
+
// for backward compatibility
|
|
54
55
|
type: 'boolean',
|
|
55
56
|
onlyAutomate: true
|
|
56
57
|
},
|
|
58
|
+
freezeAnimatedImage: {
|
|
59
|
+
type: 'boolean',
|
|
60
|
+
onlyAutomate: true
|
|
61
|
+
},
|
|
62
|
+
freezeAnimatedImageOptions: {
|
|
63
|
+
type: 'object',
|
|
64
|
+
additionalProperties: false,
|
|
65
|
+
onlyAutomate: true,
|
|
66
|
+
properties: {
|
|
67
|
+
freezeImageBySelectors: {
|
|
68
|
+
type: 'array',
|
|
69
|
+
items: {
|
|
70
|
+
type: 'string'
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
freezeImageByXpaths: {
|
|
74
|
+
type: 'array',
|
|
75
|
+
items: {
|
|
76
|
+
type: 'string'
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
57
81
|
ignoreRegions: {
|
|
58
82
|
type: 'object',
|
|
59
83
|
additionalProperties: false,
|
|
@@ -84,7 +108,7 @@ export const configSchema = {
|
|
|
84
108
|
type: 'string'
|
|
85
109
|
}
|
|
86
110
|
},
|
|
87
|
-
|
|
111
|
+
considerRegionXpaths: {
|
|
88
112
|
type: 'array',
|
|
89
113
|
items: {
|
|
90
114
|
type: 'string'
|
package/dist/utils.js
CHANGED
|
@@ -23,7 +23,7 @@ export function normalizeURL(url) {
|
|
|
23
23
|
/* istanbul ignore next: tested, but coverage is stripped */
|
|
24
24
|
// Returns the body for automateScreenshot in structure
|
|
25
25
|
export function percyAutomateRequestHandler(req, percy) {
|
|
26
|
-
var _percy$config$snapsho, _percy$config$snapsho2, _percy$config$snapsho3, _percy$config$snapsho4;
|
|
26
|
+
var _percy$config$snapsho, _percy$config$snapsho2, _percy$config$snapsho3, _percy$config$snapsho4, _percy$config$snapsho5, _percy$config$snapsho6;
|
|
27
27
|
if (req.body.client_info) {
|
|
28
28
|
req.body.clientInfo = req.body.client_info;
|
|
29
29
|
}
|
|
@@ -38,11 +38,13 @@ export function percyAutomateRequestHandler(req, percy) {
|
|
|
38
38
|
});
|
|
39
39
|
req.body.options = merge([{
|
|
40
40
|
percyCSS: percy.config.snapshot.percyCSS,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
freezeAnimatedImage: percy.config.snapshot.freezeAnimatedImage || percy.config.snapshot.freezeAnimation,
|
|
42
|
+
freezeImageBySelectors: (_percy$config$snapsho = percy.config.snapshot.freezeAnimatedImageOptions) === null || _percy$config$snapsho === void 0 ? void 0 : _percy$config$snapsho.freezeImageBySelectors,
|
|
43
|
+
freezeImageByXpaths: (_percy$config$snapsho2 = percy.config.snapshot.freezeAnimatedImageOptions) === null || _percy$config$snapsho2 === void 0 ? void 0 : _percy$config$snapsho2.freezeImageByXpaths,
|
|
44
|
+
ignoreRegionSelectors: (_percy$config$snapsho3 = percy.config.snapshot.ignoreRegions) === null || _percy$config$snapsho3 === void 0 ? void 0 : _percy$config$snapsho3.ignoreRegionSelectors,
|
|
45
|
+
ignoreRegionXpaths: (_percy$config$snapsho4 = percy.config.snapshot.ignoreRegions) === null || _percy$config$snapsho4 === void 0 ? void 0 : _percy$config$snapsho4.ignoreRegionXpaths,
|
|
46
|
+
considerRegionSelectors: (_percy$config$snapsho5 = percy.config.snapshot.considerRegions) === null || _percy$config$snapsho5 === void 0 ? void 0 : _percy$config$snapsho5.considerRegionSelectors,
|
|
47
|
+
considerRegionXpaths: (_percy$config$snapsho6 = percy.config.snapshot.considerRegions) === null || _percy$config$snapsho6 === void 0 ? void 0 : _percy$config$snapsho6.considerRegionXpaths
|
|
46
48
|
}, camelCasedOptions], (path, prev, next) => {
|
|
47
49
|
switch (path.map(k => k.toString()).join('.')) {
|
|
48
50
|
case 'percyCSS':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/core",
|
|
3
|
-
"version": "1.27.
|
|
3
|
+
"version": "1.27.3-beta.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public",
|
|
12
|
-
"tag": "
|
|
12
|
+
"tag": "beta"
|
|
13
13
|
},
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=14"
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"test:types": "tsd"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@percy/client": "1.27.
|
|
47
|
-
"@percy/config": "1.27.
|
|
48
|
-
"@percy/dom": "1.27.
|
|
49
|
-
"@percy/logger": "1.27.
|
|
50
|
-
"@percy/webdriver-utils": "1.27.
|
|
46
|
+
"@percy/client": "1.27.3-beta.0",
|
|
47
|
+
"@percy/config": "1.27.3-beta.0",
|
|
48
|
+
"@percy/dom": "1.27.3-beta.0",
|
|
49
|
+
"@percy/logger": "1.27.3-beta.0",
|
|
50
|
+
"@percy/webdriver-utils": "1.27.3-beta.0",
|
|
51
51
|
"content-disposition": "^0.5.4",
|
|
52
52
|
"cross-spawn": "^7.0.3",
|
|
53
53
|
"extract-zip": "^2.0.1",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"rimraf": "^3.0.2",
|
|
59
59
|
"ws": "^8.0.0"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "a9b7ebc7005ee50761373f49ce3454449f38f227"
|
|
62
62
|
}
|