@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 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.env("disableAutoSnapshot")) {
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((env) => ({
90
- ...env("diffThreshold") && {
91
- diffThreshold: env("diffThreshold")
89
+ var buildChromaticParams = /* @__PURE__ */ __name((expose) => ({
90
+ ...expose("diffThreshold") && {
91
+ diffThreshold: expose("diffThreshold")
92
92
  },
93
- ...env("delay") && {
94
- delay: env("delay")
93
+ ...expose("delay") && {
94
+ delay: expose("delay")
95
95
  },
96
- ...env("diffIncludeAntiAliasing") && {
97
- diffIncludeAntiAliasing: env("diffIncludeAntiAliasing")
96
+ ...expose("diffIncludeAntiAliasing") && {
97
+ diffIncludeAntiAliasing: expose("diffIncludeAntiAliasing")
98
98
  },
99
- ...env("diffThreshold") && {
100
- diffThreshold: env("diffThreshold")
99
+ ...expose("diffThreshold") && {
100
+ diffThreshold: expose("diffThreshold")
101
101
  },
102
- ...env("forcedColors") && {
103
- forcedColors: env("forcedColors")
102
+ ...expose("forcedColors") && {
103
+ forcedColors: expose("forcedColors")
104
104
  },
105
- ...env("pauseAnimationAtEnd") && {
106
- pauseAnimationAtEnd: env("pauseAnimationAtEnd")
105
+ ...expose("pauseAnimationAtEnd") && {
106
+ pauseAnimationAtEnd: expose("pauseAnimationAtEnd")
107
107
  },
108
- ...env("prefersReducedMotion") && {
109
- prefersReducedMotion: env("prefersReducedMotion")
108
+ ...expose("prefersReducedMotion") && {
109
+ prefersReducedMotion: expose("prefersReducedMotion")
110
110
  },
111
- ...env("cropToViewport") && {
112
- cropToViewport: env("cropToViewport")
111
+ ...expose("cropToViewport") && {
112
+ cropToViewport: expose("cropToViewport")
113
113
  },
114
- ...env("ignoreSelectors") && {
115
- ignoreSelectors: env("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.env("assetDomains")
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.env),
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.env("disableAutoSnapshot")) {
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((env) => ({
88
- ...env("diffThreshold") && {
89
- diffThreshold: env("diffThreshold")
87
+ var buildChromaticParams = /* @__PURE__ */ __name((expose) => ({
88
+ ...expose("diffThreshold") && {
89
+ diffThreshold: expose("diffThreshold")
90
90
  },
91
- ...env("delay") && {
92
- delay: env("delay")
91
+ ...expose("delay") && {
92
+ delay: expose("delay")
93
93
  },
94
- ...env("diffIncludeAntiAliasing") && {
95
- diffIncludeAntiAliasing: env("diffIncludeAntiAliasing")
94
+ ...expose("diffIncludeAntiAliasing") && {
95
+ diffIncludeAntiAliasing: expose("diffIncludeAntiAliasing")
96
96
  },
97
- ...env("diffThreshold") && {
98
- diffThreshold: env("diffThreshold")
97
+ ...expose("diffThreshold") && {
98
+ diffThreshold: expose("diffThreshold")
99
99
  },
100
- ...env("forcedColors") && {
101
- forcedColors: env("forcedColors")
100
+ ...expose("forcedColors") && {
101
+ forcedColors: expose("forcedColors")
102
102
  },
103
- ...env("pauseAnimationAtEnd") && {
104
- pauseAnimationAtEnd: env("pauseAnimationAtEnd")
103
+ ...expose("pauseAnimationAtEnd") && {
104
+ pauseAnimationAtEnd: expose("pauseAnimationAtEnd")
105
105
  },
106
- ...env("prefersReducedMotion") && {
107
- prefersReducedMotion: env("prefersReducedMotion")
106
+ ...expose("prefersReducedMotion") && {
107
+ prefersReducedMotion: expose("prefersReducedMotion")
108
108
  },
109
- ...env("cropToViewport") && {
110
- cropToViewport: env("cropToViewport")
109
+ ...expose("cropToViewport") && {
110
+ cropToViewport: expose("cropToViewport")
111
111
  },
112
- ...env("ignoreSelectors") && {
113
- ignoreSelectors: env("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.env("assetDomains")
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.env),
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.12.8",
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.11.0",
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
  }