@percy/playwright 1.0.2 → 1.0.3
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/index.js +2 -2
- package/package.json +5 -5
package/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const utils = require('@percy/sdk-utils');
|
|
2
|
+
|
|
1
3
|
// Collect client and environment information
|
|
2
4
|
const sdkPkg = require('./package.json');
|
|
3
5
|
const playwrightPkg = require(require.resolve('./package.json', { paths: [__dirname] }));
|
|
@@ -6,8 +8,6 @@ const ENV_INFO = `${playwrightPkg.name}/${playwrightPkg.version}`;
|
|
|
6
8
|
|
|
7
9
|
// Take a DOM snapshot and post it to the snapshot endpoint
|
|
8
10
|
async function percySnapshot(page, name, options) {
|
|
9
|
-
let utils = await import('@percy/sdk-utils');
|
|
10
|
-
|
|
11
11
|
if (!page) throw new Error('A Playwright `page` object is required.');
|
|
12
12
|
if (!name) throw new Error('The `name` argument is required.');
|
|
13
13
|
if (!(await utils.isPercyEnabled())) return;
|
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.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Perceptual Inc.",
|
|
7
7
|
"repository": "https://github.com/percy/percy-playwright",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@percy/sdk-utils": "^1.0.
|
|
32
|
+
"@percy/sdk-utils": "^1.0.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"playwright": ">=1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@percy/core": "^1.
|
|
39
|
-
"@playwright/test": "^1.
|
|
38
|
+
"@percy/core": "^1.1.2",
|
|
39
|
+
"@playwright/test": "^1.21.0",
|
|
40
40
|
"cross-env": "^7.0.2",
|
|
41
41
|
"eslint": "^7.18.0",
|
|
42
42
|
"eslint-config-standard": "^16.0.2",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"eslint-plugin-promise": "^5.1.0",
|
|
46
46
|
"eslint-plugin-standard": "^5.0.0",
|
|
47
47
|
"nyc": "^15.1.0",
|
|
48
|
-
"playwright": "^1.
|
|
48
|
+
"playwright": "^1.21.0",
|
|
49
49
|
"tsd": "^0.20.0"
|
|
50
50
|
}
|
|
51
51
|
}
|