@chromatic-com/playwright 0.14.2 → 0.14.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/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4125,9 +4125,10 @@ async function executeSnapshotScript(context) {
|
|
|
4125
4125
|
type: "module",
|
|
4126
4126
|
path: __require.resolve("@chromatic-com/playwright/browser")
|
|
4127
4127
|
});
|
|
4128
|
-
|
|
4129
|
-
return await window.__chromatic_takeSnapshot();
|
|
4128
|
+
const snapshot = await context.evaluate(async () => {
|
|
4129
|
+
return JSON.stringify(await window.__chromatic_takeSnapshot());
|
|
4130
4130
|
});
|
|
4131
|
+
return JSON.parse(snapshot);
|
|
4131
4132
|
}
|
|
4132
4133
|
__name(executeSnapshotScript, "executeSnapshotScript");
|
|
4133
4134
|
function findIframes(node) {
|
package/dist/index.mjs
CHANGED
|
@@ -4119,9 +4119,10 @@ async function executeSnapshotScript(context) {
|
|
|
4119
4119
|
type: "module",
|
|
4120
4120
|
path: __require.resolve("@chromatic-com/playwright/browser")
|
|
4121
4121
|
});
|
|
4122
|
-
|
|
4123
|
-
return await window.__chromatic_takeSnapshot();
|
|
4122
|
+
const snapshot = await context.evaluate(async () => {
|
|
4123
|
+
return JSON.stringify(await window.__chromatic_takeSnapshot());
|
|
4124
4124
|
});
|
|
4125
|
+
return JSON.parse(snapshot);
|
|
4125
4126
|
}
|
|
4126
4127
|
__name(executeSnapshotScript, "executeSnapshotScript");
|
|
4127
4128
|
function findIframes(node) {
|