@percy/core 1.30.11-beta.1 → 1.30.11-beta.2

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 CHANGED
@@ -122,6 +122,14 @@ export const configSchema = {
122
122
  thTestCaseExecutionId: {
123
123
  type: 'string'
124
124
  },
125
+ browsers: {
126
+ type: 'array',
127
+ items: {
128
+ type: 'string',
129
+ minLength: 1
130
+ },
131
+ onlyWeb: true
132
+ },
125
133
  fullPage: {
126
134
  type: 'boolean',
127
135
  onlyAutomate: true
@@ -476,6 +484,9 @@ export const snapshotSchema = {
476
484
  thTestCaseExecutionId: {
477
485
  $ref: '/config/snapshot#/properties/thTestCaseExecutionId'
478
486
  },
487
+ browsers: {
488
+ $ref: '/config/snapshot#/properties/browsers'
489
+ },
479
490
  reshuffleInvalidTags: {
480
491
  $ref: '/config/snapshot#/properties/reshuffleInvalidTags'
481
492
  },
package/dist/discovery.js CHANGED
@@ -36,6 +36,7 @@ function debugSnapshotOptions(snapshot) {
36
36
  debugProp(snapshot, 'waitForTimeout');
37
37
  debugProp(snapshot, 'waitForSelector');
38
38
  debugProp(snapshot, 'scopeOptions.scroll');
39
+ debugProp(snapshot, 'browsers');
39
40
  debugProp(snapshot, 'execute.afterNavigation');
40
41
  debugProp(snapshot, 'execute.beforeResize');
41
42
  debugProp(snapshot, 'execute.afterResize');
package/dist/snapshot.js CHANGED
@@ -154,11 +154,13 @@ function getSnapshotOptions(options, {
154
154
  retry: config.discovery.retry
155
155
  }
156
156
  }, options], (path, prev, next) => {
157
- var _next, _next2;
157
+ var _next, _next2, _next3;
158
158
  switch (path.map(k => k.toString()).join('.')) {
159
159
  case 'widths':
160
160
  // dedup, sort, and override widths when not empty
161
161
  return [path, !((_next = next) !== null && _next !== void 0 && _next.length) ? prev : [...new Set(next)].sort((a, b) => a - b)];
162
+ case 'browsers':
163
+ return [path, !((_next2 = next) !== null && _next2 !== void 0 && _next2.length) ? prev : [...new Set(next)]];
162
164
  case 'percyCSS':
163
165
  // concatenate percy css
164
166
  return [path, [prev, next].filter(Boolean).join('\n')];
@@ -167,7 +169,7 @@ function getSnapshotOptions(options, {
167
169
  return Array.isArray(next) || typeof next !== 'object' ? [path.concat('beforeSnapshot'), next] : [path];
168
170
  case 'discovery.disallowedHostnames':
169
171
  // prevent disallowing the root hostname
170
- return [path, !((_next2 = next) !== null && _next2 !== void 0 && _next2.length) ? prev : (prev ?? []).concat(next).filter(h => !hostnameMatches(h, options.url))];
172
+ return [path, !((_next3 = next) !== null && _next3 !== void 0 && _next3.length) ? prev : (prev ?? []).concat(next).filter(h => !hostnameMatches(h, options.url))];
171
173
  }
172
174
 
173
175
  // ensure additional snapshots have complete names
package/dist/utils.js CHANGED
@@ -558,6 +558,7 @@ const OPTION_MAPPINGS = {
558
558
  testcase: 'testCase',
559
559
  labels: 'labels',
560
560
  thtestcaseexecutionid: 'thTestCaseExecutionId',
561
+ browsers: 'browsers',
561
562
  resources: 'resources',
562
563
  meta: 'meta',
563
564
  snapshot: 'snapshot'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/core",
3
- "version": "1.30.11-beta.1",
3
+ "version": "1.30.11-beta.2",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,12 +43,12 @@
43
43
  "test:types": "tsd"
44
44
  },
45
45
  "dependencies": {
46
- "@percy/client": "1.30.11-beta.1",
47
- "@percy/config": "1.30.11-beta.1",
48
- "@percy/dom": "1.30.11-beta.1",
49
- "@percy/logger": "1.30.11-beta.1",
50
- "@percy/monitoring": "1.30.11-beta.1",
51
- "@percy/webdriver-utils": "1.30.11-beta.1",
46
+ "@percy/client": "1.30.11-beta.2",
47
+ "@percy/config": "1.30.11-beta.2",
48
+ "@percy/dom": "1.30.11-beta.2",
49
+ "@percy/logger": "1.30.11-beta.2",
50
+ "@percy/monitoring": "1.30.11-beta.2",
51
+ "@percy/webdriver-utils": "1.30.11-beta.2",
52
52
  "content-disposition": "^0.5.4",
53
53
  "cross-spawn": "^7.0.3",
54
54
  "extract-zip": "^2.0.1",
@@ -61,5 +61,5 @@
61
61
  "ws": "^8.17.1",
62
62
  "yaml": "^2.4.1"
63
63
  },
64
- "gitHead": "dbf8e51006ea5ad1d235c8fe2272ec9f78daef60"
64
+ "gitHead": "d02449fd160c4ac0a63134b249f3de5704fef7c0"
65
65
  }
package/types/index.d.ts CHANGED
@@ -57,6 +57,7 @@ interface CommonSnapshotOptions {
57
57
  reshuffleInvalidTags?: boolean;
58
58
  devicePixelRatio?: number;
59
59
  scopeOptions?: ScopeOptions;
60
+ browsers?: string[];
60
61
  }
61
62
 
62
63
  export interface SnapshotOptions extends CommonSnapshotOptions {