@percy/nightwatch 2.0.0 → 2.0.1
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/README.md +1 -6
- package/commands/percySnapshot.js +2 -2
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -99,12 +99,7 @@ OK. 2 assertions passed.
|
|
|
99
99
|
`percySnapshot([name][, options])`
|
|
100
100
|
|
|
101
101
|
- `name` - The snapshot name; must be unique to each snapshot
|
|
102
|
-
- `options` -
|
|
103
|
-
- `options.widths` - An array of widths to take screenshots at
|
|
104
|
-
- `options.minHeight` - The minimum viewport height to take screenshots at
|
|
105
|
-
- `options.percyCSS` - Percy specific CSS only applied in Percy's rendering environment
|
|
106
|
-
- `options.requestHeaders` - Headers that should be used during asset discovery
|
|
107
|
-
- `options.enableJavaScript` - Enable JavaScript in Percy's rendering environment
|
|
102
|
+
- `options` - [See per-snapshot configuration options](https://docs.percy.io/docs/cli-configuration#per-snapshot-configuration)
|
|
108
103
|
|
|
109
104
|
## Upgrading
|
|
110
105
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
const utils = require('@percy/sdk-utils');
|
|
2
|
-
|
|
3
1
|
// Collect client and environment information
|
|
4
2
|
const sdkPkg = require('../package.json');
|
|
5
3
|
const nightwatchPkg = require('nightwatch/package.json');
|
|
@@ -9,6 +7,8 @@ const ENV_INFO = `${nightwatchPkg.name}/${nightwatchPkg.version}`;
|
|
|
9
7
|
// Take a DOM snapshot and post it to the snapshot endpoint
|
|
10
8
|
module.exports = class PercySnapshotCommand {
|
|
11
9
|
async command(name, options) {
|
|
10
|
+
let utils = await import('@percy/sdk-utils');
|
|
11
|
+
|
|
12
12
|
if (!(await utils.isPercyEnabled())) return;
|
|
13
13
|
name = name || this.api.currentTest.name;
|
|
14
14
|
let log = utils.logger('nightwatch');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/nightwatch",
|
|
3
3
|
"description": "Nightwatch client library for visual testing with Percy",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Perceptual Inc.",
|
|
7
7
|
"repository": "https://github.com/percy/percy-nightwatch",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"types/percySnapshot.d.ts"
|
|
18
18
|
],
|
|
19
19
|
"engines": {
|
|
20
|
-
"node": ">=
|
|
20
|
+
"node": ">=14"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"lint": "eslint --ignore-path .gitignore .",
|
|
@@ -26,25 +26,25 @@
|
|
|
26
26
|
"test:types": "tsd"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@percy/sdk-utils": "
|
|
29
|
+
"@percy/sdk-utils": "^1.0.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"nightwatch": "~1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@percy/core": "
|
|
36
|
-
"@types/nightwatch": "^
|
|
35
|
+
"@percy/core": "^1.0.0",
|
|
36
|
+
"@types/nightwatch": "^2.0.0",
|
|
37
37
|
"eslint": "^7.11.0",
|
|
38
38
|
"eslint-config-standard": "^16.0.1",
|
|
39
39
|
"eslint-plugin-import": "^2.22.1",
|
|
40
40
|
"eslint-plugin-node": "^11.1.0",
|
|
41
|
-
"eslint-plugin-promise": "^
|
|
41
|
+
"eslint-plugin-promise": "^5.1.0",
|
|
42
42
|
"eslint-plugin-standard": "^5.0.0",
|
|
43
|
-
"expect": "^
|
|
44
|
-
"geckodriver": "^
|
|
45
|
-
"mocha": "^
|
|
43
|
+
"expect": "^27.0.2",
|
|
44
|
+
"geckodriver": "^3.0.1",
|
|
45
|
+
"mocha": "^9.0.0",
|
|
46
46
|
"nightwatch": "^1.5.1",
|
|
47
47
|
"nyc": "^15.1.0",
|
|
48
|
-
"tsd": "^0.
|
|
48
|
+
"tsd": "^0.20.0"
|
|
49
49
|
}
|
|
50
50
|
}
|