@percy/playwright 1.0.10 → 1.1.0-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.
Files changed (2) hide show
  1. package/index.js +9 -1
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -71,7 +71,15 @@ const percySnapshot = async function(page, name, options) {
71
71
  // This section only handles cross-origin iframe serialization and resource merging.
72
72
  const pageUrl = new URL(page.url());
73
73
  const crossOriginFrames = page.frames()
74
- .filter(frame => frame.url() !== 'about:blank' && new URL(frame.url()).origin !== pageUrl.origin);
74
+ .filter(frame => {
75
+ const frameUrl = frame.url();
76
+ if (!frameUrl || frameUrl === 'about:blank') return false;
77
+ try {
78
+ return new URL(frameUrl).origin !== pageUrl.origin;
79
+ } catch {
80
+ return false;
81
+ }
82
+ });
75
83
 
76
84
  // Inject Percy DOM into all cross-origin frames before processing them in parallel
77
85
  await Promise.all(crossOriginFrames.map(frame => frame.evaluate(percyDOM)));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@percy/playwright",
3
3
  "description": "Playwright client library for visual testing with Percy",
4
- "version": "1.0.10",
4
+ "version": "1.1.0-beta.0",
5
5
  "license": "MIT",
6
6
  "author": "Perceptual Inc.",
7
7
  "repository": "https://github.com/percy/percy-playwright",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public",
32
- "tag": "latest"
32
+ "tag": "beta"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "playwright-core": ">=1"