cypress 10.1.0 → 10.3.1

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.
Files changed (54) hide show
  1. package/lib/exec/open.js +1 -2
  2. package/lib/exec/spawn.js +14 -2
  3. package/lib/tasks/download.js +10 -11
  4. package/lib/tasks/install.js +7 -6
  5. package/lib/util.js +54 -10
  6. package/mount-utils/CHANGELOG.md +19 -0
  7. package/mount-utils/dist/index.js +8 -1
  8. package/mount-utils/package.json +1 -1
  9. package/package.json +13 -13
  10. package/react/CHANGELOG.md +44 -0
  11. package/react/dist/cypress-react.browser.js +17 -2
  12. package/react/dist/cypress-react.cjs.js +17 -2
  13. package/react/dist/cypress-react.esm-bundler.js +17 -2
  14. package/react/package.json +1 -3
  15. package/types/cypress.d.ts +3 -3
  16. package/vue/CHANGELOG.md +42 -0
  17. package/vue/README.md +1 -0
  18. package/vue/dist/@vue/test-utils/baseWrapper.d.ts +61 -0
  19. package/vue/dist/@vue/test-utils/components/RouterLinkStub.d.ts +21 -0
  20. package/vue/dist/@vue/test-utils/config.d.ts +28 -0
  21. package/vue/dist/@vue/test-utils/constants/dom-events.d.ts +900 -0
  22. package/vue/dist/@vue/test-utils/createDomEvent.d.ts +9 -0
  23. package/vue/dist/@vue/test-utils/domWrapper.d.ts +18 -0
  24. package/vue/dist/@vue/test-utils/emit.d.ts +4 -0
  25. package/vue/dist/@vue/test-utils/errorWrapper.d.ts +1 -0
  26. package/vue/dist/@vue/test-utils/index.d.ts +10 -0
  27. package/vue/dist/@vue/test-utils/interfaces/wrapperLike.d.ts +56 -0
  28. package/vue/dist/@vue/test-utils/mount.d.ts +33 -0
  29. package/vue/dist/@vue/test-utils/stubs.d.ts +26 -0
  30. package/vue/dist/@vue/test-utils/types.d.ts +125 -0
  31. package/vue/dist/@vue/test-utils/utils/autoUnmount.d.ts +5 -0
  32. package/vue/dist/@vue/test-utils/utils/compileSlots.d.ts +2 -0
  33. package/vue/dist/@vue/test-utils/utils/componentName.d.ts +4 -0
  34. package/vue/dist/@vue/test-utils/utils/find.d.ts +10 -0
  35. package/vue/dist/@vue/test-utils/utils/flushPromises.d.ts +1 -0
  36. package/vue/dist/@vue/test-utils/utils/getRootNodes.d.ts +2 -0
  37. package/vue/dist/@vue/test-utils/utils/isElement.d.ts +1 -0
  38. package/vue/dist/@vue/test-utils/utils/isElementVisible.d.ts +6 -0
  39. package/vue/dist/@vue/test-utils/utils/matchName.d.ts +1 -0
  40. package/vue/dist/@vue/test-utils/utils/stringifyNode.d.ts +1 -0
  41. package/vue/dist/@vue/test-utils/utils/vueCompatSupport.d.ts +8 -0
  42. package/vue/dist/@vue/test-utils/utils/vueShared.d.ts +3 -0
  43. package/vue/dist/@vue/test-utils/utils.d.ts +13 -0
  44. package/vue/dist/@vue/test-utils/vueWrapper.d.ts +34 -0
  45. package/vue/dist/@vue/test-utils/wrapperFactory.d.ts +14 -0
  46. package/vue/dist/cypress-vue.cjs.js +224 -139
  47. package/vue/dist/cypress-vue.esm-bundler.js +224 -140
  48. package/vue/dist/index.d.ts +34 -3
  49. package/vue/package.json +10 -7
  50. package/vue2/CHANGELOG.md +32 -0
  51. package/vue2/dist/cypress-vue2.browser.js +17 -2
  52. package/vue2/dist/cypress-vue2.cjs.js +17 -2
  53. package/vue2/dist/cypress-vue2.esm-bundler.js +17 -2
  54. package/vue2/package.json +2 -4
@@ -7,7 +7,7 @@
7
7
 
8
8
  import require$$0$1 from 'vue';
9
9
 
10
- /*! *****************************************************************************
10
+ /******************************************************************************
11
11
  Copyright (c) Microsoft Corporation.
12
12
 
13
13
  Permission to use, copy, modify, and/or distribute this software for any
@@ -19852,7 +19852,7 @@ const getContainerEl = () => {
19852
19852
  if (el) {
19853
19853
  return el;
19854
19854
  }
19855
- throw Error(`No element found that matches selector ${ROOT_SELECTOR}. Please use the mount utils to mount it properly`);
19855
+ 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.`);
19856
19856
  };
19857
19857
  /**
19858
19858
  * Remove any style or extra link elements from the iframe placeholder
@@ -19968,6 +19968,13 @@ const injectStylesBeforeElement = (options, document, el) => {
19968
19968
  return insertLocalCssFiles(cssFiles, document, el, options.log);
19969
19969
  };
19970
19970
  function setupHooks(optionalCallback) {
19971
+ // Consumed by the framework "mount" libs. A user might register their own mount in the scaffolded 'commands.js'
19972
+ // file that is imported by e2e and component support files by default. We don't want CT side effects to run when e2e
19973
+ // testing so we early return.
19974
+ // System test to verify CT side effects do not pollute e2e: system-tests/test/e2e_with_mount_import_spec.ts
19975
+ if (Cypress.testingType !== 'component') {
19976
+ return;
19977
+ }
19971
19978
  // When running component specs, we cannot allow "cy.visit"
19972
19979
  // because it will wipe out our preparation work, and does not make much sense
19973
19980
  // thus we overwrite "cy.visit" to throw an error
@@ -20174,6 +20181,14 @@ var mount$1 = function (component, optionsOrProps) {
20174
20181
  var mountCallback = function (component, options) {
20175
20182
  return function () { return mount$1(component, options); };
20176
20183
  };
20184
+ // Side effects from "import { mount } from '@cypress/<my-framework>'" are annoying, we should avoid doing this
20185
+ // by creating an explicit function/import that the user can register in their 'component.js' support file,
20186
+ // such as:
20187
+ // import 'cypress/<my-framework>/support'
20188
+ // or
20189
+ // import { registerCT } from 'cypress/<my-framework>'
20190
+ // registerCT()
20191
+ // Note: This would be a breaking change
20177
20192
  setupHooks();
20178
20193
 
20179
20194
  export { mount$1 as mount, mountCallback };
package/vue2/package.json CHANGED
@@ -2,7 +2,6 @@
2
2
  "name": "@cypress/vue2",
3
3
  "version": "0.0.0-development",
4
4
  "description": "Browser-based Component Testing for Vue.js@2 with Cypress.io ✌️🌲",
5
- "private": true,
6
5
  "main": "dist/cypress-vue2.cjs.js",
7
6
  "scripts": {
8
7
  "typecheck": "tsc --noEmit",
@@ -38,7 +37,7 @@
38
37
  "engines": {
39
38
  "node": ">=8"
40
39
  },
41
- "types": "dist",
40
+ "types": "dist/index.d.ts",
42
41
  "license": "MIT",
43
42
  "repository": {
44
43
  "type": "git",
@@ -53,7 +52,6 @@
53
52
  "unpkg": "dist/cypress-vue2.browser.js",
54
53
  "module": "dist/cypress-vue2.esm-bundler.js",
55
54
  "publishConfig": {
56
- "access": "public",
57
- "registry": "http://registry.npmjs.org/"
55
+ "access": "public"
58
56
  }
59
57
  }