cypress 12.1.0 → 12.2.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.
@@ -7,16 +7,11 @@
7
7
 
8
8
  'use strict';
9
9
 
10
- Object.defineProperty(exports, '__esModule', { value: true });
11
-
12
10
  var ReactDOM = require('react-dom/client');
13
11
  var React = require('react');
14
12
  require('react-dom');
15
13
 
16
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
17
-
18
- function _interopNamespace(e) {
19
- if (e && e.__esModule) return e;
14
+ function _interopNamespaceDefault(e) {
20
15
  var n = Object.create(null);
21
16
  if (e) {
22
17
  Object.keys(e).forEach(function (k) {
@@ -29,12 +24,11 @@ function _interopNamespace(e) {
29
24
  }
30
25
  });
31
26
  }
32
- n["default"] = e;
27
+ n.default = e;
33
28
  return Object.freeze(n);
34
29
  }
35
30
 
36
- var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
37
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
31
+ var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
38
32
 
39
33
  const ROOT_SELECTOR$1 = '[data-cy-root]';
40
34
  /**
@@ -521,17 +515,17 @@ function mount(jsx, options = {}, rerenderKey) {
521
515
  // to wipe away any state
522
516
  cleanup();
523
517
  const internalOptions = {
524
- reactDom: ReactDOM__default["default"],
518
+ reactDom: ReactDOM,
525
519
  render: (reactComponent, el) => {
526
520
  if (!root) {
527
- root = ReactDOM__default["default"].createRoot(el);
521
+ root = ReactDOM.createRoot(el);
528
522
  }
529
523
  return root.render(reactComponent);
530
524
  },
531
525
  unmount: internalUnmount,
532
526
  cleanup,
533
527
  };
534
- return makeMountFn('mount', jsx, Object.assign({ ReactDom: ReactDOM__default["default"] }, options), rerenderKey, internalOptions);
528
+ return makeMountFn('mount', jsx, Object.assign({ ReactDom: ReactDOM }, options), rerenderKey, internalOptions);
535
529
  }
536
530
  function internalUnmount(options = { log: true }) {
537
531
  return makeUnmountFn(options);
@@ -20,7 +20,7 @@
20
20
  "cypress": "0.0.0-development",
21
21
  "react": "^16",
22
22
  "react-dom": "^16",
23
- "rollup": "^2.38.5",
23
+ "rollup": "3.7.3",
24
24
  "rollup-plugin-typescript2": "^0.29.0",
25
25
  "typescript": "^4.7.4"
26
26
  },
@@ -7,8 +7,6 @@
7
7
 
8
8
  'use strict';
9
9
 
10
- Object.defineProperty(exports, '__esModule', { value: true });
11
-
12
10
  const ROOT_SELECTOR = '[data-cy-root]';
13
11
  /**
14
12
  * Gets the root element used to mount the component.
@@ -1589,19 +1589,19 @@ declare namespace Cypress {
1589
1589
  *
1590
1590
  * @see https://on.cypress.io/nextuntil
1591
1591
  */
1592
- nextUntil<K extends keyof HTMLElementTagNameMap>(selector: K, options?: Partial<Loggable & Timeoutable>): Chainable<JQuery<HTMLElementTagNameMap[K]>>
1592
+ nextUntil<K extends keyof HTMLElementTagNameMap>(selector: K, filter?: string, options?: Partial<Loggable & Timeoutable>): Chainable<JQuery<HTMLElementTagNameMap[K]>>
1593
1593
  /**
1594
1594
  * Get all following siblings of each DOM element in a set of matched DOM elements up to, but not including, the element provided.
1595
1595
  *
1596
1596
  * @see https://on.cypress.io/nextuntil
1597
1597
  */
1598
- nextUntil<E extends HTMLElement = HTMLElement>(options?: Partial<Loggable & Timeoutable>): Chainable<JQuery<E>>
1598
+ nextUntil<E extends Node = HTMLElement>(selector: string, filter?: string, options?: Partial<Loggable & Timeoutable>): Chainable<JQuery<E>>
1599
1599
  /**
1600
1600
  * Get all following siblings of each DOM element in a set of matched DOM elements up to, but not including, the element provided.
1601
1601
  *
1602
1602
  * @see https://on.cypress.io/nextuntil
1603
1603
  */
1604
- nextUntil<E extends HTMLElement = HTMLElement>(selector: string, options?: Partial<Loggable & Timeoutable>): Chainable<JQuery<E>>
1604
+ nextUntil<E extends Node = HTMLElement>(element: E | JQuery<E>, filter?: string, options?: Partial<Loggable & Timeoutable>): Chainable<JQuery<E>>
1605
1605
 
1606
1606
  /**
1607
1607
  * Filter DOM element(s) from a set of DOM elements. Opposite of `.filter()`
@@ -1774,21 +1774,21 @@ declare namespace Cypress {
1774
1774
  * Get all previous siblings of each DOM element in a set of matched DOM elements up to, but not including, the element provided.
1775
1775
  * > The querying behavior of this command matches exactly how [.prevUntil()](http://api.jquery.com/prevUntil) works in jQuery.
1776
1776
  *
1777
- * @see https://on.cypress.io/prevall
1777
+ * @see https://on.cypress.io/prevuntil
1778
1778
  */
1779
1779
  prevUntil<K extends keyof HTMLElementTagNameMap>(selector: K, filter?: string, options?: Partial<Loggable & Timeoutable>): Chainable<JQuery<HTMLElementTagNameMap[K]>>
1780
1780
  /**
1781
1781
  * Get all previous siblings of each DOM element in a set of matched DOM elements up to, but not including, the element provided.
1782
1782
  * > The querying behavior of this command matches exactly how [.prevUntil()](http://api.jquery.com/prevUntil) works in jQuery.
1783
1783
  *
1784
- * @see https://on.cypress.io/prevall
1784
+ * @see https://on.cypress.io/prevuntil
1785
1785
  */
1786
1786
  prevUntil<E extends Node = HTMLElement>(selector: string, filter?: string, options?: Partial<Loggable & Timeoutable>): Chainable<JQuery<E>>
1787
1787
  /**
1788
1788
  * Get all previous siblings of each DOM element in a set of matched DOM elements up to, but not including, the element provided.
1789
1789
  * > The querying behavior of this command matches exactly how [.prevUntil()](http://api.jquery.com/prevUntil) works in jQuery.
1790
1790
  *
1791
- * @see https://on.cypress.io/prevall
1791
+ * @see https://on.cypress.io/prevuntil
1792
1792
  */
1793
1793
  prevUntil<E extends Node = HTMLElement>(element: E | JQuery<E>, filter?: string, options?: Partial<Loggable & Timeoutable>): Chainable<JQuery<E>>
1794
1794
 
@@ -68,6 +68,9 @@ type Method =
68
68
  | 'unlink'
69
69
  | 'unlock'
70
70
  | 'unsubscribe'
71
+
72
+ export type ResourceType = 'document' | 'fetch' | 'xhr' | 'websocket' | 'stylesheet' | 'script' | 'image' | 'font' | 'cspviolationreport' | 'ping' | 'manifest' | 'other'
73
+
71
74
  export namespace CyHttpMessages {
72
75
  export interface BaseMessage {
73
76
  /**
@@ -139,6 +142,10 @@ export namespace CyHttpMessages {
139
142
  * The HTTP version used in the request. Read only.
140
143
  */
141
144
  httpVersion: string
145
+ /**
146
+ * The resource type that is being requested, according to the browser.
147
+ */
148
+ resourceType: ResourceType
142
149
  /**
143
150
  * If provided, the number of milliseconds before an upstream response to this request
144
151
  * will time out and cause an error. By default, `responseTimeout` from config is used.
@@ -370,6 +377,10 @@ export interface RouteMatcherOptionsGeneric<S> {
370
377
  * Match on parsed querystring parameters.
371
378
  */
372
379
  query?: DictMatcher<S>
380
+ /**
381
+ * Match on the request's resource type, according to the browser.
382
+ */
383
+ resourceType?: ResourceType | S
373
384
  /**
374
385
  * If set, this `RouteMatcher` will only match the first `times` requests.
375
386
  */
@@ -7,12 +7,9 @@
7
7
 
8
8
  'use strict';
9
9
 
10
- Object.defineProperty(exports, '__esModule', { value: true });
11
-
12
10
  var Vue = require('vue');
13
11
 
14
- function _interopNamespace(e) {
15
- if (e && e.__esModule) return e;
12
+ function _interopNamespaceDefault(e) {
16
13
  var n = Object.create(null);
17
14
  if (e) {
18
15
  Object.keys(e).forEach(function (k) {
@@ -25,11 +22,11 @@ function _interopNamespace(e) {
25
22
  }
26
23
  });
27
24
  }
28
- n["default"] = e;
25
+ n.default = e;
29
26
  return Object.freeze(n);
30
27
  }
31
28
 
32
- var Vue__namespace = /*#__PURE__*/_interopNamespace(Vue);
29
+ var Vue__namespace = /*#__PURE__*/_interopNamespaceDefault(Vue);
33
30
 
34
31
  /******************************************************************************
35
32
  Copyright (c) Microsoft Corporation.
package/vue/package.json CHANGED
@@ -27,7 +27,7 @@
27
27
  "globby": "^11.0.1",
28
28
  "tailwindcss": "1.1.4",
29
29
  "typescript": "^4.7.4",
30
- "vite": "3.1.0",
30
+ "vite": "4.0.1",
31
31
  "vue": "3.2.31",
32
32
  "vue-i18n": "9.0.0-rc.6",
33
33
  "vue-router": "^4.0.0",
@@ -7,14 +7,8 @@
7
7
 
8
8
  'use strict';
9
9
 
10
- Object.defineProperty(exports, '__esModule', { value: true });
11
-
12
10
  var Vue = require('vue');
13
11
 
14
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
-
16
- var Vue__default = /*#__PURE__*/_interopDefaultLegacy(Vue);
17
-
18
12
  var commonjsGlobal$1 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
19
13
 
20
14
  function createCommonjsModule$1(fn) {
@@ -1076,9 +1070,6 @@ var isIE = UA$1 && /msie|trident/.test(UA$1);
1076
1070
  UA$1 && UA$1.indexOf('msie 9.0') > 0;
1077
1071
  var isEdge$1 = UA$1 && UA$1.indexOf('edge/') > 0;
1078
1072
  (UA$1 && UA$1.indexOf('android') > 0) || (weexPlatform === 'android');
1079
- (UA$1 && /iphone|ipad|ipod|ios/.test(UA$1)) || (weexPlatform === 'ios');
1080
- UA$1 && /chrome\/\d+/.test(UA$1) && !isEdge$1;
1081
- UA$1 && /phantomjs/.test(UA$1);
1082
1073
  UA$1 && UA$1.match(/firefox\/(\d+)/);
1083
1074
 
1084
1075
  // Firefox has a "watch" function on Object.prototype...
@@ -5737,7 +5728,7 @@ var build = /*#__PURE__*/Object.defineProperty({
5737
5728
  }, '__esModule', {value: true});
5738
5729
 
5739
5730
  try {
5740
- var vueVersion = Vue__default["default"].version;
5731
+ var vueVersion = Vue.version;
5741
5732
  } catch (e) {}
5742
5733
 
5743
5734
  var vueTemplateCompiler = build;
@@ -7413,17 +7404,17 @@ var DOM_SELECTOR = 'DOM_SELECTOR';
7413
7404
  var INVALID_SELECTOR = 'INVALID_SELECTOR';
7414
7405
 
7415
7406
  var VUE_VERSION = Number(
7416
- ((Vue__default["default"].version.split('.')[0]) + "." + (Vue__default["default"].version.split('.')[1]))
7407
+ ((Vue.version.split('.')[0]) + "." + (Vue.version.split('.')[1]))
7417
7408
  );
7418
7409
 
7419
7410
  var FUNCTIONAL_OPTIONS =
7420
7411
  VUE_VERSION >= 2.5 ? 'fnOptions' : 'functionalOptions';
7421
7412
 
7422
- var BEFORE_RENDER_LIFECYCLE_HOOK = semver.gt(Vue__default["default"].version, '2.1.8')
7413
+ var BEFORE_RENDER_LIFECYCLE_HOOK = semver.gt(Vue.version, '2.1.8')
7423
7414
  ? 'beforeCreate'
7424
7415
  : 'beforeMount';
7425
7416
 
7426
- var CREATE_ELEMENT_ALIAS = semver.gt(Vue__default["default"].version, '2.1.5')
7417
+ var CREATE_ELEMENT_ALIAS = semver.gt(Vue.version, '2.1.5')
7427
7418
  ? '_c'
7428
7419
  : '_h';
7429
7420
 
@@ -7497,7 +7488,7 @@ var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
7497
7488
 
7498
7489
  // get the event used to trigger v-model handler that updates bound data
7499
7490
  function getCheckedEvent() {
7500
- var version = Vue__default["default"].version;
7491
+ var version = Vue.version;
7501
7492
 
7502
7493
  if (semver.satisfies(version, '2.1.9 - 2.1.10')) {
7503
7494
  return 'click'
@@ -7517,9 +7508,9 @@ function getCheckedEvent() {
7517
7508
  * @return {Promise<R>}
7518
7509
  */
7519
7510
  function nextTick() {
7520
- if (VUE_VERSION > 2) { return Vue__default["default"].nextTick() }
7511
+ if (VUE_VERSION > 2) { return Vue.nextTick() }
7521
7512
  return new Promise(function (resolve) {
7522
- Vue__default["default"].nextTick(resolve);
7513
+ Vue.nextTick(resolve);
7523
7514
  })
7524
7515
  }
7525
7516
 
@@ -7563,7 +7554,7 @@ function addMocks(
7563
7554
  );
7564
7555
  }
7565
7556
  // $FlowIgnore
7566
- Vue__default["default"].util.defineReactive(_Vue, key, mockedProperties[key]);
7557
+ Vue.util.defineReactive(_Vue, key, mockedProperties[key]);
7567
7558
  });
7568
7559
  }
7569
7560
 
@@ -8064,8 +8055,8 @@ function createStubFromComponent(
8064
8055
  var tagName = (name || 'anonymous') + "-stub";
8065
8056
 
8066
8057
  // ignoreElements does not exist in Vue 2.0.x
8067
- if (Vue__default["default"].config.ignoredElements) {
8068
- Vue__default["default"].config.ignoredElements.push(tagName);
8058
+ if (Vue.config.ignoredElements) {
8059
+ Vue.config.ignoredElements.push(tagName);
8069
8060
  }
8070
8061
 
8071
8062
  return Object.assign({}, getCoreProperties(componentOptions),
@@ -17080,7 +17071,7 @@ function createWrapper(
17080
17071
  return wrapper$1
17081
17072
  }
17082
17073
  var wrapper =
17083
- node instanceof Vue__default["default"]
17074
+ node instanceof Vue
17084
17075
  ? new VueWrapper(node, options)
17085
17076
  : new Wrapper(node, options);
17086
17077
  return wrapper
@@ -19581,7 +19572,7 @@ function _createLocalVue(
19581
19572
  _Vue,
19582
19573
  config
19583
19574
  ) {
19584
- if ( _Vue === void 0 ) _Vue = Vue__default["default"];
19575
+ if ( _Vue === void 0 ) _Vue = Vue;
19585
19576
  if ( config === void 0 ) config = {};
19586
19577
 
19587
19578
  var instance = _Vue.extend();
@@ -19603,14 +19594,14 @@ function _createLocalVue(
19603
19594
  });
19604
19595
 
19605
19596
  // config is not enumerable
19606
- instance.config = cloneDeep_1(Vue__default["default"].config);
19597
+ instance.config = cloneDeep_1(Vue.config);
19607
19598
 
19608
19599
  // if a user defined errorHandler is defined by a localVue instance via createLocalVue, register it
19609
19600
  instance.config.errorHandler = config.errorHandler;
19610
19601
 
19611
19602
  // option merge strategies need to be exposed by reference
19612
19603
  // so that merge strats registered by plugins can work properly
19613
- instance.config.optionMergeStrategies = Vue__default["default"].config.optionMergeStrategies;
19604
+ instance.config.optionMergeStrategies = Vue.config.optionMergeStrategies;
19614
19605
 
19615
19606
  // make sure all extends are based on this instance.
19616
19607
  // this is important so that global components registered by plugins,
@@ -19731,8 +19722,8 @@ function validateOptions(options, component) {
19731
19722
  }
19732
19723
  }
19733
19724
 
19734
- Vue__default["default"].config.productionTip = false;
19735
- Vue__default["default"].config.devtools = false;
19725
+ Vue.config.productionTip = false;
19726
+ Vue.config.devtools = false;
19736
19727
 
19737
19728
  function mount$1(component, options) {
19738
19729
  if ( options === void 0 ) options = {};
@@ -19741,7 +19732,7 @@ function mount$1(component, options) {
19741
19732
 
19742
19733
  polyfill();
19743
19734
 
19744
- addGlobalErrorHandler(Vue__default["default"]);
19735
+ addGlobalErrorHandler(Vue);
19745
19736
 
19746
19737
  var _Vue = _createLocalVue(
19747
19738
  options.localVue,
@@ -20016,7 +20007,7 @@ const mount = (component, optionsOrProps = {}) => {
20016
20007
  })
20017
20008
  .then(() => {
20018
20009
  if (optionsOrProps.log !== false) {
20019
- return Vue__default["default"].nextTick(() => {
20010
+ return Vue.nextTick(() => {
20020
20011
  Cypress.log({
20021
20012
  name: 'mount',
20022
20013
  message: [message],
@@ -1068,9 +1068,6 @@ var isIE = UA$1 && /msie|trident/.test(UA$1);
1068
1068
  UA$1 && UA$1.indexOf('msie 9.0') > 0;
1069
1069
  var isEdge$1 = UA$1 && UA$1.indexOf('edge/') > 0;
1070
1070
  (UA$1 && UA$1.indexOf('android') > 0) || (weexPlatform === 'android');
1071
- (UA$1 && /iphone|ipad|ipod|ios/.test(UA$1)) || (weexPlatform === 'ios');
1072
- UA$1 && /chrome\/\d+/.test(UA$1) && !isEdge$1;
1073
- UA$1 && /phantomjs/.test(UA$1);
1074
1071
  UA$1 && UA$1.match(/firefox\/(\d+)/);
1075
1072
 
1076
1073
  // Firefox has a "watch" function on Object.prototype...