@chromatic-com/cypress 0.12.8 → 0.13.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/dist/support.js +22 -22
- package/dist/support.mjs +22 -22
- package/package.json +5 -2
package/dist/support.js
CHANGED
|
@@ -6,7 +6,7 @@ var __defProp = Object.defineProperty;
|
|
|
6
6
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
7
|
var takeSnapshot = /* @__PURE__ */ __name((doc, viewport, isManualSnapshot) => {
|
|
8
8
|
return new Promise((resolve) => {
|
|
9
|
-
if (!isManualSnapshot && Cypress.
|
|
9
|
+
if (!isManualSnapshot && Cypress.expose("disableAutoSnapshot")) {
|
|
10
10
|
resolve(null);
|
|
11
11
|
}
|
|
12
12
|
const mirror = rrwebSnapshot.createMirror();
|
|
@@ -86,33 +86,33 @@ Cypress.Commands.add("takeSnapshot", (name) => {
|
|
|
86
86
|
});
|
|
87
87
|
|
|
88
88
|
// src/support.ts
|
|
89
|
-
var buildChromaticParams = /* @__PURE__ */ __name((
|
|
90
|
-
...
|
|
91
|
-
diffThreshold:
|
|
89
|
+
var buildChromaticParams = /* @__PURE__ */ __name((expose) => ({
|
|
90
|
+
...expose("diffThreshold") && {
|
|
91
|
+
diffThreshold: expose("diffThreshold")
|
|
92
92
|
},
|
|
93
|
-
...
|
|
94
|
-
delay:
|
|
93
|
+
...expose("delay") && {
|
|
94
|
+
delay: expose("delay")
|
|
95
95
|
},
|
|
96
|
-
...
|
|
97
|
-
diffIncludeAntiAliasing:
|
|
96
|
+
...expose("diffIncludeAntiAliasing") && {
|
|
97
|
+
diffIncludeAntiAliasing: expose("diffIncludeAntiAliasing")
|
|
98
98
|
},
|
|
99
|
-
...
|
|
100
|
-
diffThreshold:
|
|
99
|
+
...expose("diffThreshold") && {
|
|
100
|
+
diffThreshold: expose("diffThreshold")
|
|
101
101
|
},
|
|
102
|
-
...
|
|
103
|
-
forcedColors:
|
|
102
|
+
...expose("forcedColors") && {
|
|
103
|
+
forcedColors: expose("forcedColors")
|
|
104
104
|
},
|
|
105
|
-
...
|
|
106
|
-
pauseAnimationAtEnd:
|
|
105
|
+
...expose("pauseAnimationAtEnd") && {
|
|
106
|
+
pauseAnimationAtEnd: expose("pauseAnimationAtEnd")
|
|
107
107
|
},
|
|
108
|
-
...
|
|
109
|
-
prefersReducedMotion:
|
|
108
|
+
...expose("prefersReducedMotion") && {
|
|
109
|
+
prefersReducedMotion: expose("prefersReducedMotion")
|
|
110
110
|
},
|
|
111
|
-
...
|
|
112
|
-
cropToViewport:
|
|
111
|
+
...expose("cropToViewport") && {
|
|
112
|
+
cropToViewport: expose("cropToViewport")
|
|
113
113
|
},
|
|
114
|
-
...
|
|
115
|
-
ignoreSelectors:
|
|
114
|
+
...expose("ignoreSelectors") && {
|
|
115
|
+
ignoreSelectors: expose("ignoreSelectors")
|
|
116
116
|
}
|
|
117
117
|
}), "buildChromaticParams");
|
|
118
118
|
beforeEach(() => {
|
|
@@ -123,7 +123,7 @@ beforeEach(() => {
|
|
|
123
123
|
cy.task("prepareArchives", {
|
|
124
124
|
action: "setup-network-listener",
|
|
125
125
|
payload: {
|
|
126
|
-
allowedDomains: Cypress.
|
|
126
|
+
allowedDomains: Cypress.expose("assetDomains")
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
129
|
});
|
|
@@ -154,7 +154,7 @@ afterEach(() => {
|
|
|
154
154
|
automaticSnapshot
|
|
155
155
|
] : []
|
|
156
156
|
],
|
|
157
|
-
chromaticStorybookParams: buildChromaticParams(Cypress.
|
|
157
|
+
chromaticStorybookParams: buildChromaticParams(Cypress.expose),
|
|
158
158
|
pageUrl: url,
|
|
159
159
|
outputDir: Cypress.config("downloadsFolder")
|
|
160
160
|
}
|
package/dist/support.mjs
CHANGED
|
@@ -4,7 +4,7 @@ var __defProp = Object.defineProperty;
|
|
|
4
4
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
5
|
var takeSnapshot = /* @__PURE__ */ __name((doc, viewport, isManualSnapshot) => {
|
|
6
6
|
return new Promise((resolve) => {
|
|
7
|
-
if (!isManualSnapshot && Cypress.
|
|
7
|
+
if (!isManualSnapshot && Cypress.expose("disableAutoSnapshot")) {
|
|
8
8
|
resolve(null);
|
|
9
9
|
}
|
|
10
10
|
const mirror = createMirror();
|
|
@@ -84,33 +84,33 @@ Cypress.Commands.add("takeSnapshot", (name) => {
|
|
|
84
84
|
});
|
|
85
85
|
|
|
86
86
|
// src/support.ts
|
|
87
|
-
var buildChromaticParams = /* @__PURE__ */ __name((
|
|
88
|
-
...
|
|
89
|
-
diffThreshold:
|
|
87
|
+
var buildChromaticParams = /* @__PURE__ */ __name((expose) => ({
|
|
88
|
+
...expose("diffThreshold") && {
|
|
89
|
+
diffThreshold: expose("diffThreshold")
|
|
90
90
|
},
|
|
91
|
-
...
|
|
92
|
-
delay:
|
|
91
|
+
...expose("delay") && {
|
|
92
|
+
delay: expose("delay")
|
|
93
93
|
},
|
|
94
|
-
...
|
|
95
|
-
diffIncludeAntiAliasing:
|
|
94
|
+
...expose("diffIncludeAntiAliasing") && {
|
|
95
|
+
diffIncludeAntiAliasing: expose("diffIncludeAntiAliasing")
|
|
96
96
|
},
|
|
97
|
-
...
|
|
98
|
-
diffThreshold:
|
|
97
|
+
...expose("diffThreshold") && {
|
|
98
|
+
diffThreshold: expose("diffThreshold")
|
|
99
99
|
},
|
|
100
|
-
...
|
|
101
|
-
forcedColors:
|
|
100
|
+
...expose("forcedColors") && {
|
|
101
|
+
forcedColors: expose("forcedColors")
|
|
102
102
|
},
|
|
103
|
-
...
|
|
104
|
-
pauseAnimationAtEnd:
|
|
103
|
+
...expose("pauseAnimationAtEnd") && {
|
|
104
|
+
pauseAnimationAtEnd: expose("pauseAnimationAtEnd")
|
|
105
105
|
},
|
|
106
|
-
...
|
|
107
|
-
prefersReducedMotion:
|
|
106
|
+
...expose("prefersReducedMotion") && {
|
|
107
|
+
prefersReducedMotion: expose("prefersReducedMotion")
|
|
108
108
|
},
|
|
109
|
-
...
|
|
110
|
-
cropToViewport:
|
|
109
|
+
...expose("cropToViewport") && {
|
|
110
|
+
cropToViewport: expose("cropToViewport")
|
|
111
111
|
},
|
|
112
|
-
...
|
|
113
|
-
ignoreSelectors:
|
|
112
|
+
...expose("ignoreSelectors") && {
|
|
113
|
+
ignoreSelectors: expose("ignoreSelectors")
|
|
114
114
|
}
|
|
115
115
|
}), "buildChromaticParams");
|
|
116
116
|
beforeEach(() => {
|
|
@@ -121,7 +121,7 @@ beforeEach(() => {
|
|
|
121
121
|
cy.task("prepareArchives", {
|
|
122
122
|
action: "setup-network-listener",
|
|
123
123
|
payload: {
|
|
124
|
-
allowedDomains: Cypress.
|
|
124
|
+
allowedDomains: Cypress.expose("assetDomains")
|
|
125
125
|
}
|
|
126
126
|
});
|
|
127
127
|
});
|
|
@@ -152,7 +152,7 @@ afterEach(() => {
|
|
|
152
152
|
automaticSnapshot
|
|
153
153
|
] : []
|
|
154
154
|
],
|
|
155
|
-
chromaticStorybookParams: buildChromaticParams(Cypress.
|
|
155
|
+
chromaticStorybookParams: buildChromaticParams(Cypress.expose),
|
|
156
156
|
pageUrl: url,
|
|
157
157
|
outputDir: Cypress.config("downloadsFolder")
|
|
158
158
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chromatic-com/cypress",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Chromatic Visual Regression Testing for Cypress",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -68,9 +68,12 @@
|
|
|
68
68
|
"@storybook/builder-webpack5": "10.2.13",
|
|
69
69
|
"@storybook/server": "10.2.13",
|
|
70
70
|
"@storybook/server-webpack5": "10.2.13",
|
|
71
|
-
"cypress": "^15.
|
|
71
|
+
"cypress": "^15.18.0",
|
|
72
72
|
"start-server-and-test": "^2.0.3"
|
|
73
73
|
},
|
|
74
|
+
"peerDependencies": {
|
|
75
|
+
"cypress": ">=15.10.0"
|
|
76
|
+
},
|
|
74
77
|
"publishConfig": {
|
|
75
78
|
"access": "public"
|
|
76
79
|
}
|