@percy/playwright 1.0.8-beta.0 → 1.0.9-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/README.md +12 -1
- package/index.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -177,7 +177,18 @@ const obj1 = {
|
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
179
|
|
|
180
|
-
|
|
180
|
+
// we can use the createRegion function
|
|
181
|
+
|
|
182
|
+
const { createRegion } = percySnapshot;
|
|
183
|
+
|
|
184
|
+
const obj2 = createRegion({
|
|
185
|
+
algorithm: "intelliignore",
|
|
186
|
+
diffSensitivity: 3,
|
|
187
|
+
adsEnabled: true,
|
|
188
|
+
diffIgnoreThreshold: 0.4
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
percySnapshot(page, "Homepage 1", { regions: [obj1] });
|
|
181
192
|
```
|
|
182
193
|
|
|
183
194
|
### Creating Percy on automate build
|
package/index.js
CHANGED
|
@@ -25,6 +25,8 @@ const percySnapshot = async function(page, name, options) {
|
|
|
25
25
|
return PercyDOM.serialize(options);
|
|
26
26
|
}, options);
|
|
27
27
|
|
|
28
|
+
domSnapshot.cookies = await page.context().cookies();
|
|
29
|
+
|
|
28
30
|
// Post the DOM to the snapshot endpoint with snapshot options and other info
|
|
29
31
|
const response = await utils.postSnapshot({
|
|
30
32
|
...options,
|
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.9-beta.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Perceptual Inc.",
|
|
7
7
|
"repository": "https://github.com/percy/percy-playwright",
|