cypress 10.3.1 → 10.4.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/lib/exec/open.js +6 -0
- package/mount-utils/CHANGELOG.md +0 -1
- package/mount-utils/README.md +7 -0
- package/package.json +10 -5
- package/react/CHANGELOG.md +0 -19
- package/react/README.md +28 -323
- package/react/dist/createMount.d.ts +30 -0
- package/react/dist/cypress-react.cjs.js +59 -78
- package/react/dist/cypress-react.esm-bundler.js +51 -74
- package/react/dist/getDisplayName.d.ts +1 -1
- package/react/dist/index.d.ts +2 -0
- package/react/dist/mount.d.ts +5 -141
- package/react/dist/types.d.ts +50 -0
- package/react/package.json +1 -5
- package/react18/dist/cypress-react.cjs.js +422 -0
- package/react18/dist/cypress-react.esm-bundler.js +394 -0
- package/react18/dist/index.d.ts +5 -0
- package/react18/package.json +59 -0
- package/types/cypress.d.ts +9 -0
- package/types/index.d.ts +1 -1
- package/types/{net-stubbing.ts → net-stubbing.d.ts} +0 -0
- package/vue/CHANGELOG.md +2 -17
- package/vue/README.md +17 -608
- package/vue/dist/@vue/test-utils/baseWrapper.d.ts +3 -1
- package/vue/dist/@vue/test-utils/config.d.ts +4 -2
- package/vue/dist/@vue/test-utils/emit.d.ts +1 -0
- package/vue/dist/@vue/test-utils/index.d.ts +2 -1
- package/vue/dist/@vue/test-utils/interfaces/wrapperLike.d.ts +2 -2
- package/vue/dist/@vue/test-utils/mount.d.ts +2 -0
- package/vue/dist/@vue/test-utils/stubs.d.ts +2 -6
- package/vue/dist/@vue/test-utils/types.d.ts +1 -1
- package/vue/dist/@vue/test-utils/vueWrapper.d.ts +2 -1
- package/vue/dist/cypress-vue.cjs.js +5379 -5090
- package/vue/dist/cypress-vue.esm-bundler.js +5380 -5091
- package/vue/dist/index.d.ts +1 -0
- package/vue/package.json +2 -2
- package/vue2/README.md +11 -627
- package/vue2/dist/cypress-vue2.browser.js +251 -260
- package/vue2/dist/cypress-vue2.cjs.js +250 -259
- package/vue2/dist/cypress-vue2.esm-bundler.js +248 -257
- package/react/dist/cypress-react.browser.js +0 -512
@@ -0,0 +1,394 @@
|
|
1
|
+
|
2
|
+
/**
|
3
|
+
* @cypress/react18 v0.0.0-development
|
4
|
+
* (c) 2022 Cypress.io
|
5
|
+
* Released under the MIT License
|
6
|
+
*/
|
7
|
+
|
8
|
+
import ReactDOM from 'react-dom/client';
|
9
|
+
import * as React from 'react';
|
10
|
+
import 'react-dom';
|
11
|
+
|
12
|
+
/******************************************************************************
|
13
|
+
Copyright (c) Microsoft Corporation.
|
14
|
+
|
15
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
16
|
+
purpose with or without fee is hereby granted.
|
17
|
+
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
19
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
20
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
21
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
22
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
23
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
24
|
+
PERFORMANCE OF THIS SOFTWARE.
|
25
|
+
***************************************************************************** */
|
26
|
+
|
27
|
+
var __assign = function() {
|
28
|
+
__assign = Object.assign || function __assign(t) {
|
29
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
30
|
+
s = arguments[i];
|
31
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
32
|
+
}
|
33
|
+
return t;
|
34
|
+
};
|
35
|
+
return __assign.apply(this, arguments);
|
36
|
+
};
|
37
|
+
|
38
|
+
var cachedDisplayNames = new WeakMap();
|
39
|
+
/**
|
40
|
+
* Gets the display name of the component when possible.
|
41
|
+
* @param type {JSX} The type object returned from creating the react element.
|
42
|
+
* @param fallbackName {string} The alias, or fallback name to use when the name cannot be derived.
|
43
|
+
* @link https://github.com/facebook/react-devtools/blob/master/backend/getDisplayName.js
|
44
|
+
*/
|
45
|
+
function getDisplayName(type, fallbackName) {
|
46
|
+
if (fallbackName === void 0) { fallbackName = 'Unknown'; }
|
47
|
+
var nameFromCache = cachedDisplayNames.get(type);
|
48
|
+
if (nameFromCache != null) {
|
49
|
+
return nameFromCache;
|
50
|
+
}
|
51
|
+
var displayName = null;
|
52
|
+
// The displayName property is not guaranteed to be a string.
|
53
|
+
// It's only safe to use for our purposes if it's a string.
|
54
|
+
// github.com/facebook/react-devtools/issues/803
|
55
|
+
if (typeof type.displayName === 'string') {
|
56
|
+
displayName = type.displayName;
|
57
|
+
}
|
58
|
+
if (!displayName) {
|
59
|
+
displayName = type.name || fallbackName;
|
60
|
+
}
|
61
|
+
// Facebook-specific hack to turn "Image [from Image.react]" into just "Image".
|
62
|
+
// We need displayName with module name for error reports but it clutters the DevTools.
|
63
|
+
var match = displayName.match(/^(.*) \[from (.*)\]$/);
|
64
|
+
if (match) {
|
65
|
+
var componentName = match[1];
|
66
|
+
var moduleName = match[2];
|
67
|
+
if (componentName && moduleName) {
|
68
|
+
if (moduleName === componentName ||
|
69
|
+
moduleName.startsWith(componentName + ".")) {
|
70
|
+
displayName = componentName;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
try {
|
75
|
+
cachedDisplayNames.set(type, displayName);
|
76
|
+
}
|
77
|
+
catch (e) {
|
78
|
+
// do nothing
|
79
|
+
}
|
80
|
+
return displayName;
|
81
|
+
}
|
82
|
+
|
83
|
+
const ROOT_SELECTOR = '[data-cy-root]';
|
84
|
+
const getContainerEl = () => {
|
85
|
+
const el = document.querySelector(ROOT_SELECTOR);
|
86
|
+
if (el) {
|
87
|
+
return el;
|
88
|
+
}
|
89
|
+
throw Error(`No element found that matches selector ${ROOT_SELECTOR}. Please add a root element with data-cy-root attribute to your "component-index.html" file so that Cypress can attach your component to the DOM.`);
|
90
|
+
};
|
91
|
+
/**
|
92
|
+
* Remove any style or extra link elements from the iframe placeholder
|
93
|
+
* left from any previous test
|
94
|
+
*
|
95
|
+
*/
|
96
|
+
function cleanupStyles() {
|
97
|
+
const styles = document.body.querySelectorAll('[data-cy=injected-style-tag]');
|
98
|
+
styles.forEach((styleElement) => {
|
99
|
+
if (styleElement.parentElement) {
|
100
|
+
styleElement.parentElement.removeChild(styleElement);
|
101
|
+
}
|
102
|
+
});
|
103
|
+
const links = document.body.querySelectorAll('[data-cy=injected-stylesheet]');
|
104
|
+
links.forEach((link) => {
|
105
|
+
if (link.parentElement) {
|
106
|
+
link.parentElement.removeChild(link);
|
107
|
+
}
|
108
|
+
});
|
109
|
+
}
|
110
|
+
/**
|
111
|
+
* Insert links to external style resources.
|
112
|
+
*/
|
113
|
+
function insertStylesheets(stylesheets, document, el) {
|
114
|
+
stylesheets.forEach((href) => {
|
115
|
+
const link = document.createElement('link');
|
116
|
+
link.type = 'text/css';
|
117
|
+
link.rel = 'stylesheet';
|
118
|
+
link.href = href;
|
119
|
+
link.dataset.cy = 'injected-stylesheet';
|
120
|
+
document.body.insertBefore(link, el);
|
121
|
+
});
|
122
|
+
}
|
123
|
+
/**
|
124
|
+
* Inserts a single stylesheet element
|
125
|
+
*/
|
126
|
+
function insertStyles(styles, document, el) {
|
127
|
+
styles.forEach((style) => {
|
128
|
+
const styleElement = document.createElement('style');
|
129
|
+
styleElement.dataset.cy = 'injected-style-tag';
|
130
|
+
styleElement.appendChild(document.createTextNode(style));
|
131
|
+
document.body.insertBefore(styleElement, el);
|
132
|
+
});
|
133
|
+
}
|
134
|
+
function insertSingleCssFile(cssFilename, document, el, log) {
|
135
|
+
return cy.readFile(cssFilename, { log }).then((css) => {
|
136
|
+
const style = document.createElement('style');
|
137
|
+
style.appendChild(document.createTextNode(css));
|
138
|
+
document.body.insertBefore(style, el);
|
139
|
+
});
|
140
|
+
}
|
141
|
+
/**
|
142
|
+
* Reads the given CSS file from local file system
|
143
|
+
* and adds the loaded style text as an element.
|
144
|
+
*/
|
145
|
+
function insertLocalCssFiles(cssFilenames, document, el, log) {
|
146
|
+
return Cypress.Promise.mapSeries(cssFilenames, (cssFilename) => {
|
147
|
+
return insertSingleCssFile(cssFilename, document, el, log);
|
148
|
+
});
|
149
|
+
}
|
150
|
+
/**
|
151
|
+
* Injects custom style text or CSS file or 3rd party style resources
|
152
|
+
* into the given document.
|
153
|
+
*/
|
154
|
+
const injectStylesBeforeElement = (options, document, el) => {
|
155
|
+
if (!el)
|
156
|
+
return;
|
157
|
+
// first insert all stylesheets as Link elements
|
158
|
+
let stylesheets = [];
|
159
|
+
if (typeof options.stylesheet === 'string') {
|
160
|
+
stylesheets.push(options.stylesheet);
|
161
|
+
}
|
162
|
+
else if (Array.isArray(options.stylesheet)) {
|
163
|
+
stylesheets = stylesheets.concat(options.stylesheet);
|
164
|
+
}
|
165
|
+
if (typeof options.stylesheets === 'string') {
|
166
|
+
options.stylesheets = [options.stylesheets];
|
167
|
+
}
|
168
|
+
if (options.stylesheets) {
|
169
|
+
stylesheets = stylesheets.concat(options.stylesheets);
|
170
|
+
}
|
171
|
+
insertStylesheets(stylesheets, document, el);
|
172
|
+
// insert any styles as <style>...</style> elements
|
173
|
+
let styles = [];
|
174
|
+
if (typeof options.style === 'string') {
|
175
|
+
styles.push(options.style);
|
176
|
+
}
|
177
|
+
else if (Array.isArray(options.style)) {
|
178
|
+
styles = styles.concat(options.style);
|
179
|
+
}
|
180
|
+
if (typeof options.styles === 'string') {
|
181
|
+
styles.push(options.styles);
|
182
|
+
}
|
183
|
+
else if (Array.isArray(options.styles)) {
|
184
|
+
styles = styles.concat(options.styles);
|
185
|
+
}
|
186
|
+
insertStyles(styles, document, el);
|
187
|
+
// now load any css files by path and add their content
|
188
|
+
// as <style>...</style> elements
|
189
|
+
let cssFiles = [];
|
190
|
+
if (typeof options.cssFile === 'string') {
|
191
|
+
cssFiles.push(options.cssFile);
|
192
|
+
}
|
193
|
+
else if (Array.isArray(options.cssFile)) {
|
194
|
+
cssFiles = cssFiles.concat(options.cssFile);
|
195
|
+
}
|
196
|
+
if (typeof options.cssFiles === 'string') {
|
197
|
+
cssFiles.push(options.cssFiles);
|
198
|
+
}
|
199
|
+
else if (Array.isArray(options.cssFiles)) {
|
200
|
+
cssFiles = cssFiles.concat(options.cssFiles);
|
201
|
+
}
|
202
|
+
return insertLocalCssFiles(cssFiles, document, el, options.log);
|
203
|
+
};
|
204
|
+
function setupHooks(optionalCallback) {
|
205
|
+
// Consumed by the framework "mount" libs. A user might register their own mount in the scaffolded 'commands.js'
|
206
|
+
// file that is imported by e2e and component support files by default. We don't want CT side effects to run when e2e
|
207
|
+
// testing so we early return.
|
208
|
+
// System test to verify CT side effects do not pollute e2e: system-tests/test/e2e_with_mount_import_spec.ts
|
209
|
+
if (Cypress.testingType !== 'component') {
|
210
|
+
return;
|
211
|
+
}
|
212
|
+
// When running component specs, we cannot allow "cy.visit"
|
213
|
+
// because it will wipe out our preparation work, and does not make much sense
|
214
|
+
// thus we overwrite "cy.visit" to throw an error
|
215
|
+
Cypress.Commands.overwrite('visit', () => {
|
216
|
+
throw new Error('cy.visit from a component spec is not allowed');
|
217
|
+
});
|
218
|
+
// @ts-ignore
|
219
|
+
Cypress.on('test:before:run', () => {
|
220
|
+
optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback();
|
221
|
+
cleanupStyles();
|
222
|
+
});
|
223
|
+
}
|
224
|
+
|
225
|
+
/**
|
226
|
+
* Inject custom style text or CSS file or 3rd party style resources
|
227
|
+
*/
|
228
|
+
var injectStyles = function (options) {
|
229
|
+
return function () {
|
230
|
+
var el = getContainerEl();
|
231
|
+
return injectStylesBeforeElement(options, document, el);
|
232
|
+
};
|
233
|
+
};
|
234
|
+
var lastMountedReactDom;
|
235
|
+
/**
|
236
|
+
* Create an `mount` function. Performs all the non-React-version specific
|
237
|
+
* behavior related to mounting. The React-version-specific code
|
238
|
+
* is injected. This helps us to maintain a consistent public API
|
239
|
+
* and handle breaking changes in React's rendering API.
|
240
|
+
*
|
241
|
+
* This is designed to be consumed by `npm/react{16,17,18}`, and other React adapters,
|
242
|
+
* or people writing adapters for third-party, custom adapters.
|
243
|
+
*/
|
244
|
+
var makeMountFn = function (type, jsx, options, rerenderKey, internalMountOptions) {
|
245
|
+
if (options === void 0) { options = {}; }
|
246
|
+
if (!internalMountOptions) {
|
247
|
+
throw Error('internalMountOptions must be provided with `render` and `reactDom` parameters');
|
248
|
+
}
|
249
|
+
// Get the display name property via the component constructor
|
250
|
+
// @ts-ignore FIXME
|
251
|
+
var componentName = getDisplayName(jsx.type, options.alias);
|
252
|
+
var displayName = options.alias || componentName;
|
253
|
+
var jsxComponentName = "<" + componentName + " ... />";
|
254
|
+
var message = options.alias
|
255
|
+
? jsxComponentName + " as \"" + options.alias + "\""
|
256
|
+
: jsxComponentName;
|
257
|
+
return cy
|
258
|
+
.then(injectStyles(options))
|
259
|
+
.then(function () {
|
260
|
+
var _a, _b, _c;
|
261
|
+
var reactDomToUse = internalMountOptions.reactDom;
|
262
|
+
lastMountedReactDom = reactDomToUse;
|
263
|
+
var el = getContainerEl();
|
264
|
+
if (!el) {
|
265
|
+
throw new Error([
|
266
|
+
"[@cypress/react] \uD83D\uDD25 Hmm, cannot find root element to mount the component. Searched for " + ROOT_SELECTOR,
|
267
|
+
].join(' '));
|
268
|
+
}
|
269
|
+
var key = rerenderKey !== null && rerenderKey !== void 0 ? rerenderKey :
|
270
|
+
// @ts-ignore provide unique key to the the wrapped component to make sure we are rerendering between tests
|
271
|
+
(((_c = (_b = (_a = Cypress === null || Cypress === void 0 ? void 0 : Cypress.mocha) === null || _a === void 0 ? void 0 : _a.getRunner()) === null || _b === void 0 ? void 0 : _b.test) === null || _c === void 0 ? void 0 : _c.title) || '') + Math.random();
|
272
|
+
var props = {
|
273
|
+
key: key,
|
274
|
+
};
|
275
|
+
var reactComponent = React.createElement(options.strict ? React.StrictMode : React.Fragment, props, jsx);
|
276
|
+
// since we always surround the component with a fragment
|
277
|
+
// let's get back the original component
|
278
|
+
var userComponent = reactComponent.props.children;
|
279
|
+
internalMountOptions.render(reactComponent, el, reactDomToUse);
|
280
|
+
if (options.log !== false) {
|
281
|
+
Cypress.log({
|
282
|
+
name: type,
|
283
|
+
type: 'parent',
|
284
|
+
message: [message],
|
285
|
+
// @ts-ignore
|
286
|
+
$el: el.children.item(0),
|
287
|
+
consoleProps: function () {
|
288
|
+
return {
|
289
|
+
// @ts-ignore protect the use of jsx functional components use ReactNode
|
290
|
+
props: jsx.props,
|
291
|
+
description: type === 'mount' ? 'Mounts React component' : 'Rerenders mounted React component',
|
292
|
+
home: 'https://github.com/cypress-io/cypress',
|
293
|
+
};
|
294
|
+
},
|
295
|
+
}).snapshot('mounted').end();
|
296
|
+
}
|
297
|
+
return (
|
298
|
+
// Separate alias and returned value. Alias returns the component only, and the thenable returns the additional functions
|
299
|
+
cy.wrap(userComponent, { log: false })
|
300
|
+
.as(displayName)
|
301
|
+
.then(function () {
|
302
|
+
return cy.wrap({
|
303
|
+
component: userComponent,
|
304
|
+
rerender: function (newComponent) { return makeMountFn('rerender', newComponent, options, key, internalMountOptions); },
|
305
|
+
unmount: internalMountOptions.unmount,
|
306
|
+
}, { log: false });
|
307
|
+
})
|
308
|
+
// by waiting, we delaying test execution for the next tick of event loop
|
309
|
+
// and letting hooks and component lifecycle methods to execute mount
|
310
|
+
// https://github.com/bahmutov/cypress-react-unit-test/issues/200
|
311
|
+
.wait(0, { log: false }));
|
312
|
+
// Bluebird types are terrible. I don't think the return type can be carried without this cast
|
313
|
+
});
|
314
|
+
};
|
315
|
+
/**
|
316
|
+
* Create an `unmount` function. Performs all the non-React-version specific
|
317
|
+
* behavior related to unmounting.
|
318
|
+
*
|
319
|
+
* This is designed to be consumed by `npm/react{16,17,18}`, and other React adapters,
|
320
|
+
* or people writing adapters for third-party, custom adapters.
|
321
|
+
*/
|
322
|
+
var makeUnmountFn = function (options, internalUnmountOptions) {
|
323
|
+
return cy.then(function () {
|
324
|
+
return cy.get(ROOT_SELECTOR, { log: false }).then(function ($el) {
|
325
|
+
var _a;
|
326
|
+
if (lastMountedReactDom) {
|
327
|
+
internalUnmountOptions.unmount($el[0]);
|
328
|
+
var wasUnmounted = internalUnmountOptions.unmount($el[0]);
|
329
|
+
if (wasUnmounted && options.log) {
|
330
|
+
Cypress.log({
|
331
|
+
name: 'unmount',
|
332
|
+
type: 'parent',
|
333
|
+
message: [(_a = options.boundComponentMessage) !== null && _a !== void 0 ? _a : 'Unmounted component'],
|
334
|
+
consoleProps: function () {
|
335
|
+
return {
|
336
|
+
description: 'Unmounts React component',
|
337
|
+
parent: $el[0],
|
338
|
+
home: 'https://github.com/cypress-io/cypress',
|
339
|
+
};
|
340
|
+
},
|
341
|
+
});
|
342
|
+
}
|
343
|
+
}
|
344
|
+
});
|
345
|
+
});
|
346
|
+
};
|
347
|
+
// Cleanup before each run
|
348
|
+
// NOTE: we cannot use unmount here because
|
349
|
+
// we are not in the context of a test
|
350
|
+
var preMountCleanup = function () {
|
351
|
+
var el = getContainerEl();
|
352
|
+
if (el && lastMountedReactDom) {
|
353
|
+
lastMountedReactDom.unmountComponentAtNode(el);
|
354
|
+
}
|
355
|
+
};
|
356
|
+
// Side effects from "import { mount } from '@cypress/<my-framework>'" are annoying, we should avoid doing this
|
357
|
+
// by creating an explicit function/import that the user can register in their 'component.js' support file,
|
358
|
+
// such as:
|
359
|
+
// import 'cypress/<my-framework>/support'
|
360
|
+
// or
|
361
|
+
// import { registerCT } from 'cypress/<my-framework>'
|
362
|
+
// registerCT()
|
363
|
+
// Note: This would be a breaking change
|
364
|
+
// it is required to unmount component in beforeEach hook in order to provide a clean state inside test
|
365
|
+
// because `mount` can be called after some preparation that can side effect unmount
|
366
|
+
// @see npm/react/cypress/component/advanced/set-timeout-example/loading-indicator-spec.js
|
367
|
+
setupHooks(preMountCleanup);
|
368
|
+
|
369
|
+
var root;
|
370
|
+
function mount(jsx, options, rerenderKey) {
|
371
|
+
if (options === void 0) { options = {}; }
|
372
|
+
var internalOptions = {
|
373
|
+
reactDom: ReactDOM,
|
374
|
+
render: function (reactComponent, el) {
|
375
|
+
root = ReactDOM.createRoot(el);
|
376
|
+
return root.render(reactComponent);
|
377
|
+
},
|
378
|
+
unmount: unmount,
|
379
|
+
};
|
380
|
+
return makeMountFn('mount', jsx, __assign({ ReactDom: ReactDOM }, options), rerenderKey, internalOptions);
|
381
|
+
}
|
382
|
+
function unmount(options) {
|
383
|
+
if (options === void 0) { options = { log: true }; }
|
384
|
+
var internalOptions = {
|
385
|
+
// type is ReturnType<typeof ReactDOM.createRoot>
|
386
|
+
unmount: function () {
|
387
|
+
root.unmount();
|
388
|
+
return true;
|
389
|
+
},
|
390
|
+
};
|
391
|
+
return makeUnmountFn(options, internalOptions);
|
392
|
+
}
|
393
|
+
|
394
|
+
export { mount, unmount };
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/// <reference types="cypress" />
|
2
|
+
import React from 'react';
|
3
|
+
import type { MountOptions, UnmountArgs } from '@cypress/react';
|
4
|
+
export declare function mount(jsx: React.ReactNode, options?: MountOptions, rerenderKey?: string): Cypress.Chainable<import("@cypress/react").MountReturn>;
|
5
|
+
export declare function unmount(options?: UnmountArgs): Cypress.Chainable<JQuery<HTMLElement>>;
|
@@ -0,0 +1,59 @@
|
|
1
|
+
{
|
2
|
+
"name": "@cypress/react18",
|
3
|
+
"version": "0.0.0-development",
|
4
|
+
"description": "Test React components using Cypress",
|
5
|
+
"main": "dist/cypress-react.cjs.js",
|
6
|
+
"scripts": {
|
7
|
+
"build": "rimraf dist && rollup -c rollup.config.js",
|
8
|
+
"postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
|
9
|
+
"build-prod": "yarn build",
|
10
|
+
"watch": "yarn build --watch --watch.exclude ./dist/**/*"
|
11
|
+
},
|
12
|
+
"devDependencies": {
|
13
|
+
"@cypress/react": "0.0.0-development",
|
14
|
+
"@rollup/plugin-commonjs": "^17.1.0",
|
15
|
+
"@rollup/plugin-node-resolve": "^11.1.1",
|
16
|
+
"@types/react": "^16",
|
17
|
+
"@types/react-dom": "^16",
|
18
|
+
"cypress": "0.0.0-development",
|
19
|
+
"react": "^16",
|
20
|
+
"react-dom": "^16",
|
21
|
+
"rollup": "^2.38.5",
|
22
|
+
"rollup-plugin-typescript2": "^0.29.0",
|
23
|
+
"typescript": "^4.2.3"
|
24
|
+
},
|
25
|
+
"peerDependencies": {
|
26
|
+
"@types/react": "^18",
|
27
|
+
"@types/react-dom": "^18",
|
28
|
+
"cypress": "*",
|
29
|
+
"react": "^18",
|
30
|
+
"react-dom": "^18"
|
31
|
+
},
|
32
|
+
"files": [
|
33
|
+
"dist"
|
34
|
+
],
|
35
|
+
"types": "dist/index.d.ts",
|
36
|
+
"license": "MIT",
|
37
|
+
"repository": {
|
38
|
+
"type": "git",
|
39
|
+
"url": "https://github.com/cypress-io/cypress.git"
|
40
|
+
},
|
41
|
+
"homepage": "https://github.com/cypress-io/cypress/blob/master/npm/react18/#readme",
|
42
|
+
"bugs": "https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm%3A%20%40cypress%2Freact18&template=1-bug-report.md&title=",
|
43
|
+
"keywords": [
|
44
|
+
"react",
|
45
|
+
"cypress",
|
46
|
+
"cypress-io",
|
47
|
+
"test",
|
48
|
+
"testing"
|
49
|
+
],
|
50
|
+
"module": "dist/cypress-react.esm-bundler.js",
|
51
|
+
"peerDependenciesMeta": {
|
52
|
+
"@types/react": {
|
53
|
+
"optional": true
|
54
|
+
}
|
55
|
+
},
|
56
|
+
"publishConfig": {
|
57
|
+
"access": "public"
|
58
|
+
}
|
59
|
+
}
|
package/types/cypress.d.ts
CHANGED
@@ -2849,6 +2849,15 @@ declare namespace Cypress {
|
|
2849
2849
|
* @default false
|
2850
2850
|
*/
|
2851
2851
|
experimentalSessionAndOrigin: boolean
|
2852
|
+
/**
|
2853
|
+
* Whether Cypress will search for and replace obstructive code in third party .js or .html files.
|
2854
|
+
* NOTE: Setting this flag to true removes Subresource Integrity (SRI).
|
2855
|
+
* Please see https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity.
|
2856
|
+
* This option has no impact on experimentalSourceRewriting and is only used with the
|
2857
|
+
* non-experimental source rewriter.
|
2858
|
+
* @see https://on.cypress.io/configuration#experimentalModifyObstructiveThirdPartyCode
|
2859
|
+
*/
|
2860
|
+
experimentalModifyObstructiveThirdPartyCode: boolean
|
2852
2861
|
/**
|
2853
2862
|
* Generate and save commands directly to your test suite by interacting with your app as an end user would.
|
2854
2863
|
* @default false
|
package/types/index.d.ts
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
// hmm, how to load it better?
|
27
27
|
/// <reference path="./cypress-npm-api.d.ts" />
|
28
28
|
|
29
|
-
/// <reference path="./net-stubbing.ts" />
|
29
|
+
/// <reference path="./net-stubbing.d.ts" />
|
30
30
|
/// <reference path="./cypress.d.ts" />
|
31
31
|
/// <reference path="./cypress-global-vars.d.ts" />
|
32
32
|
/// <reference path="./cypress-type-helpers.d.ts" />
|
File without changes
|
package/vue/CHANGELOG.md
CHANGED
@@ -5,10 +5,6 @@
|
|
5
5
|
|
6
6
|
* display cy.mount command log ([#21500](https://github.com/cypress-io/cypress/issues/21500)) ([140b4ba](https://github.com/cypress-io/cypress/commit/140b4ba2110243712a614a39b2408c30cce4d0b1))
|
7
7
|
* Doc changes around vue2 ([#21066](https://github.com/cypress-io/cypress/issues/21066)) ([17905a7](https://github.com/cypress-io/cypress/commit/17905a79ee5106b0d72c8e74bb717fcd7b796dee))
|
8
|
-
* scope config to current testing type ([#20677](https://github.com/cypress-io/cypress/issues/20677)) ([61f7cfc](https://github.com/cypress-io/cypress/commit/61f7cfc59284a2938e0a1c15d74ee75215ba5f8b))
|
9
|
-
* update scaffold template to use correct path ([#20047](https://github.com/cypress-io/cypress/issues/20047)) ([6e80359](https://github.com/cypress-io/cypress/commit/6e803597a379222cf936e5977c8314d693ee1912))
|
10
|
-
* wire up scaffolded indexHtml to dev servers ([#20453](https://github.com/cypress-io/cypress/issues/20453)) ([3a8797e](https://github.com/cypress-io/cypress/commit/3a8797e54db9fd0ef93a14ddc71c138ba8251e53))
|
11
|
-
* **unified-desktop-gui branch:** initial installation on windows ([#18247](https://github.com/cypress-io/cypress/issues/18247)) ([8614e97](https://github.com/cypress-io/cypress/commit/8614e978029bcbf7155b7ae98ac54feb11f2e7f3))
|
12
8
|
|
13
9
|
|
14
10
|
### chore
|
@@ -18,22 +14,11 @@
|
|
18
14
|
|
19
15
|
### Features
|
20
16
|
|
21
|
-
*
|
22
|
-
* Add vue2 package from npm/vue/v2 branch ([#21026](https://github.com/cypress-io/cypress/issues/21026)) ([3aa69e2](https://github.com/cypress-io/cypress/commit/3aa69e2538aae5702bfc48789c54f37263ce08fc))
|
23
|
-
* adding settings accordion ([e977b60](https://github.com/cypress-io/cypress/commit/e977b60521b863a227eb37189ab1b3081af00d9f))
|
24
|
-
* Deprecate run-ct / open-ct, and update all examples to use --ct instead ([#18422](https://github.com/cypress-io/cypress/issues/18422)) ([196e8f6](https://github.com/cypress-io/cypress/commit/196e8f62cc6d27974f235945cb5700624b3dae41))
|
17
|
+
* Update "typescript" dev dependency ([e977b60](https://github.com/cypress-io/cypress/commit/e977b60521b863a227eb37189ab1b3081af00d9f))
|
25
18
|
* embedding mount into the cypress binary (real dependency) ([#20930](https://github.com/cypress-io/cypress/issues/20930)) ([3fe5f50](https://github.com/cypress-io/cypress/commit/3fe5f50e7832a4bfb20df8e71648434eb7f263d5))
|
26
|
-
* merging / delegating remote queries to cloud schema ([#17875](https://github.com/cypress-io/cypress/issues/17875)) ([94541d4](https://github.com/cypress-io/cypress/commit/94541d4f18591e8fa4b8702c39e92b0a7238aa5d))
|
27
|
-
* Structuring context & schema so it can be used on the client ([#17489](https://github.com/cypress-io/cypress/issues/17489)) ([e2f395e](https://github.com/cypress-io/cypress/commit/e2f395e330f384993ed1116469102a5315a21270)), closes [#17551](https://github.com/cypress-io/cypress/issues/17551)
|
28
|
-
* support specPattern, deprecate integrationFolder and componentFolder ([#19319](https://github.com/cypress-io/cypress/issues/19319)) ([792980a](https://github.com/cypress-io/cypress/commit/792980ac12746ef47b9c944ebe4c6c353a187ab2))
|
29
19
|
* swap the #__cy_root id selector to become data-cy-root for component mounting ([#20951](https://github.com/cypress-io/cypress/issues/20951)) ([0e7b555](https://github.com/cypress-io/cypress/commit/0e7b555f93fb403f431c5de4a07ae7ad6ac89ba2))
|
30
20
|
* update on-links ([#19235](https://github.com/cypress-io/cypress/issues/19235)) ([cc2d734](https://github.com/cypress-io/cypress/commit/cc2d7348185e2a090c60d92d9319ab460d8c7827))
|
31
|
-
*
|
32
|
-
* use devServer instad of startDevServer ([#20092](https://github.com/cypress-io/cypress/issues/20092)) ([8a6768f](https://github.com/cypress-io/cypress/commit/8a6768fee6f46b908c5a9daf23da8b804a6c627f))
|
33
|
-
* Use plugins on config files ([#18798](https://github.com/cypress-io/cypress/issues/18798)) ([bb8251b](https://github.com/cypress-io/cypress/commit/bb8251b752ac44f1184f9160194cf12d41fc867f))
|
34
|
-
* use supportFile by testingType ([#19364](https://github.com/cypress-io/cypress/issues/19364)) ([0366d4f](https://github.com/cypress-io/cypress/commit/0366d4fa8971e5e5189c6fd6450cc3c8d72dcfe1))
|
35
|
-
* validate specPattern root level ([#19980](https://github.com/cypress-io/cypress/issues/19980)) ([5d52758](https://github.com/cypress-io/cypress/commit/5d52758d82c47033803c69c7858fc786a900faaf))
|
36
|
-
* vue-cli and nuxt preset for CT object API architecture ([#20956](https://github.com/cypress-io/cypress/issues/20956)) ([57659c4](https://github.com/cypress-io/cypress/commit/57659c42468591265143aae2ff06bae4e440085f))
|
21
|
+
* Update "@vue/test-utils" dependency ([#20956](https://github.com/cypress-io/cypress/issues/20956)) ([57659c4](https://github.com/cypress-io/cypress/commit/57659c42468591265143aae2ff06bae4e440085f))
|
37
22
|
|
38
23
|
|
39
24
|
### BREAKING CHANGES
|