angular-slickgrid 5.0.2 → 5.1.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 (207) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +182 -181
  3. package/app/modules/angular-slickgrid/components/angular-slickgrid.component.d.ts +3 -2
  4. package/app/modules/angular-slickgrid/models/angularGridInstance.interface.d.ts +3 -0
  5. package/esm2020/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +21 -7
  6. package/esm2020/app/modules/angular-slickgrid/constants.mjs +1 -1
  7. package/esm2020/app/modules/angular-slickgrid/extensions/index.mjs +1 -1
  8. package/esm2020/app/modules/angular-slickgrid/extensions/slickRowDetailView.mjs +3 -3
  9. package/esm2020/app/modules/angular-slickgrid/global-grid-options.mjs +1 -1
  10. package/esm2020/app/modules/angular-slickgrid/index.mjs +1 -1
  11. package/esm2020/app/modules/angular-slickgrid/models/angularComponentOutput.interface.mjs +1 -1
  12. package/esm2020/app/modules/angular-slickgrid/models/angularGridInstance.interface.mjs +1 -1
  13. package/esm2020/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.mjs +1 -1
  14. package/esm2020/app/modules/angular-slickgrid/models/gridOption.interface.mjs +1 -1
  15. package/esm2020/app/modules/angular-slickgrid/models/index.mjs +1 -1
  16. package/esm2020/app/modules/angular-slickgrid/models/rowDetailView.interface.mjs +1 -1
  17. package/esm2020/app/modules/angular-slickgrid/models/slickGrid.interface.mjs +1 -1
  18. package/esm2020/app/modules/angular-slickgrid/modules/angular-slickgrid.module.mjs +5 -5
  19. package/esm2020/app/modules/angular-slickgrid/services/angularUtil.service.mjs +4 -4
  20. package/esm2020/app/modules/angular-slickgrid/services/container.service.mjs +4 -4
  21. package/esm2020/app/modules/angular-slickgrid/services/index.mjs +1 -1
  22. package/esm2020/app/modules/angular-slickgrid/services/translater.service.mjs +4 -4
  23. package/esm2020/app/modules/angular-slickgrid/services/utilities.mjs +1 -1
  24. package/esm2020/app/modules/angular-slickgrid/slickgrid-config.mjs +1 -1
  25. package/esm2020/public_api.mjs +1 -1
  26. package/fesm2015/angular-slickgrid.mjs +35 -21
  27. package/fesm2015/angular-slickgrid.mjs.map +1 -1
  28. package/fesm2020/angular-slickgrid.mjs +35 -21
  29. package/fesm2020/angular-slickgrid.mjs.map +1 -1
  30. package/i18n/en.json +90 -90
  31. package/i18n/fr.json +91 -91
  32. package/package.json +10 -10
  33. package/test/cypress/node_modules/@4tw/cypress-drag-drop/README.md +169 -0
  34. package/test/cypress/node_modules/@cypress/request/README.md +1038 -0
  35. package/test/cypress/node_modules/@cypress/xvfb/README.md +48 -0
  36. package/test/cypress/node_modules/@cypress/xvfb/node_modules/debug/README.md +437 -0
  37. package/test/cypress/node_modules/@types/node/README.md +16 -0
  38. package/test/cypress/node_modules/@types/sinonjs__fake-timers/README.md +16 -0
  39. package/test/cypress/node_modules/@types/sizzle/README.md +16 -0
  40. package/test/cypress/node_modules/@types/yauzl/README.md +16 -0
  41. package/test/cypress/node_modules/@types/yauzl/node_modules/@types/node/README.md +16 -0
  42. package/test/cypress/node_modules/aggregate-error/README.md +61 -0
  43. package/test/cypress/node_modules/ansi-colors/README.md +315 -0
  44. package/test/cypress/node_modules/ansi-escapes/README.md +245 -0
  45. package/test/cypress/node_modules/ansi-regex/README.md +78 -0
  46. package/test/cypress/node_modules/ansi-styles/README.md +152 -0
  47. package/test/cypress/node_modules/arch/README.md +71 -0
  48. package/test/cypress/node_modules/asn1/README.md +50 -0
  49. package/test/cypress/node_modules/assert-plus/README.md +162 -0
  50. package/test/cypress/node_modules/astral-regex/README.md +46 -0
  51. package/test/cypress/node_modules/async/README.md +60 -0
  52. package/test/cypress/node_modules/asynckit/README.md +233 -0
  53. package/test/cypress/node_modules/at-least-node/README.md +25 -0
  54. package/test/cypress/node_modules/aws-sign2/README.md +4 -0
  55. package/test/cypress/node_modules/aws4/README.md +183 -0
  56. package/test/cypress/node_modules/balanced-match/README.md +91 -0
  57. package/test/cypress/node_modules/base64-js/README.md +34 -0
  58. package/test/cypress/node_modules/bcrypt-pbkdf/README.md +45 -0
  59. package/test/cypress/node_modules/blob-util/README.md +623 -0
  60. package/test/cypress/node_modules/bluebird/README.md +57 -0
  61. package/test/cypress/node_modules/brace-expansion/README.md +129 -0
  62. package/test/cypress/node_modules/buffer/README.md +410 -0
  63. package/test/cypress/node_modules/buffer-crc32/README.md +47 -0
  64. package/test/cypress/node_modules/cachedir/README.md +27 -0
  65. package/test/cypress/node_modules/caseless/README.md +45 -0
  66. package/test/cypress/node_modules/chalk/README.md +293 -0
  67. package/test/cypress/node_modules/chalk/node_modules/supports-color/README.md +76 -0
  68. package/test/cypress/node_modules/check-more-types/README.md +952 -0
  69. package/test/cypress/node_modules/ci-info/README.md +114 -0
  70. package/test/cypress/node_modules/clean-stack/README.md +76 -0
  71. package/test/cypress/node_modules/cli-cursor/README.md +55 -0
  72. package/test/cypress/node_modules/cli-table3/README.md +218 -0
  73. package/test/cypress/node_modules/cli-truncate/README.md +139 -0
  74. package/test/cypress/node_modules/color-convert/README.md +68 -0
  75. package/test/cypress/node_modules/color-name/README.md +11 -0
  76. package/test/cypress/node_modules/colorette/README.md +102 -0
  77. package/test/cypress/node_modules/colors/README.md +221 -0
  78. package/test/cypress/node_modules/combined-stream/README.md +138 -0
  79. package/test/cypress/node_modules/commander/README.md +737 -0
  80. package/test/cypress/node_modules/common-tags/README.md +687 -0
  81. package/test/cypress/node_modules/core-util-is/README.md +3 -0
  82. package/test/cypress/node_modules/cross-spawn/README.md +96 -0
  83. package/test/cypress/node_modules/cypress/README.md +25 -0
  84. package/test/cypress/node_modules/cypress/angular/README.md +10 -0
  85. package/test/cypress/node_modules/cypress/mount-utils/README.md +140 -0
  86. package/test/cypress/node_modules/cypress/react/README.md +14 -0
  87. package/test/cypress/node_modules/cypress/react18/README.md +7 -0
  88. package/test/cypress/node_modules/cypress/svelte/README.md +15 -0
  89. package/test/cypress/node_modules/cypress/vue/README.md +14 -0
  90. package/test/cypress/node_modules/cypress/vue2/README.md +7 -0
  91. package/test/cypress/node_modules/dashdash/README.md +574 -0
  92. package/test/cypress/node_modules/dayjs/README.md +128 -0
  93. package/test/cypress/node_modules/debug/README.md +455 -0
  94. package/test/cypress/node_modules/delayed-stream/README.md +141 -0
  95. package/test/cypress/node_modules/ecc-jsbn/README.md +8 -0
  96. package/test/cypress/node_modules/emoji-regex/README.md +73 -0
  97. package/test/cypress/node_modules/end-of-stream/README.md +54 -0
  98. package/test/cypress/node_modules/enquirer/README.md +1752 -0
  99. package/test/cypress/node_modules/escape-string-regexp/README.md +27 -0
  100. package/test/cypress/node_modules/eventemitter2/README.md +809 -0
  101. package/test/cypress/node_modules/execa/README.md +656 -0
  102. package/test/cypress/node_modules/executable/README.md +64 -0
  103. package/test/cypress/node_modules/extend/README.md +81 -0
  104. package/test/cypress/node_modules/extract-zip/README.md +57 -0
  105. package/test/cypress/node_modules/extract-zip/node_modules/debug/README.md +455 -0
  106. package/test/cypress/node_modules/extsprintf/README.md +46 -0
  107. package/test/cypress/node_modules/fd-slicer/README.md +199 -0
  108. package/test/cypress/node_modules/figures/README.md +139 -0
  109. package/test/cypress/node_modules/forever-agent/README.md +4 -0
  110. package/test/cypress/node_modules/form-data/README.md +234 -0
  111. package/test/cypress/node_modules/fs-extra/README.md +264 -0
  112. package/test/cypress/node_modules/fs.realpath/README.md +33 -0
  113. package/test/cypress/node_modules/get-stream/README.md +124 -0
  114. package/test/cypress/node_modules/getos/README.md +79 -0
  115. package/test/cypress/node_modules/getpass/README.md +32 -0
  116. package/test/cypress/node_modules/glob/README.md +375 -0
  117. package/test/cypress/node_modules/global-dirs/README.md +72 -0
  118. package/test/cypress/node_modules/graceful-fs/README.md +133 -0
  119. package/test/cypress/node_modules/has-flag/README.md +89 -0
  120. package/test/cypress/node_modules/http-signature/README.md +80 -0
  121. package/test/cypress/node_modules/human-signals/README.md +155 -0
  122. package/test/cypress/node_modules/ieee754/README.md +51 -0
  123. package/test/cypress/node_modules/indent-string/README.md +70 -0
  124. package/test/cypress/node_modules/inflight/README.md +37 -0
  125. package/test/cypress/node_modules/inherits/README.md +42 -0
  126. package/test/cypress/node_modules/ini/README.md +102 -0
  127. package/test/cypress/node_modules/is-ci/README.md +50 -0
  128. package/test/cypress/node_modules/is-fullwidth-code-point/README.md +39 -0
  129. package/test/cypress/node_modules/is-installed-globally/README.md +31 -0
  130. package/test/cypress/node_modules/is-path-inside/README.md +63 -0
  131. package/test/cypress/node_modules/is-stream/README.md +57 -0
  132. package/test/cypress/node_modules/is-typedarray/README.md +16 -0
  133. package/test/cypress/node_modules/isexe/README.md +51 -0
  134. package/test/cypress/node_modules/isstream/README.md +66 -0
  135. package/test/cypress/node_modules/jsbn/README.md +175 -0
  136. package/test/cypress/node_modules/json-schema/README.md +3 -0
  137. package/test/cypress/node_modules/json-stringify-safe/README.md +52 -0
  138. package/test/cypress/node_modules/jsonfile/README.md +205 -0
  139. package/test/cypress/node_modules/jsonfile/node_modules/universalify/README.md +76 -0
  140. package/test/cypress/node_modules/jsprim/README.md +287 -0
  141. package/test/cypress/node_modules/lazy-ass/README.md +269 -0
  142. package/test/cypress/node_modules/listr2/README.md +17 -0
  143. package/test/cypress/node_modules/lodash/README.md +39 -0
  144. package/test/cypress/node_modules/lodash.once/README.md +18 -0
  145. package/test/cypress/node_modules/log-symbols/README.md +51 -0
  146. package/test/cypress/node_modules/log-update/README.md +97 -0
  147. package/test/cypress/node_modules/log-update/node_modules/slice-ansi/README.md +66 -0
  148. package/test/cypress/node_modules/log-update/node_modules/wrap-ansi/README.md +97 -0
  149. package/test/cypress/node_modules/lru-cache/README.md +166 -0
  150. package/test/cypress/node_modules/merge-stream/README.md +78 -0
  151. package/test/cypress/node_modules/mime-db/README.md +102 -0
  152. package/test/cypress/node_modules/mime-types/README.md +123 -0
  153. package/test/cypress/node_modules/mimic-fn/README.md +69 -0
  154. package/test/cypress/node_modules/minimatch/README.md +209 -0
  155. package/test/cypress/node_modules/ms/README.md +60 -0
  156. package/test/cypress/node_modules/npm-run-path/README.md +115 -0
  157. package/test/cypress/node_modules/once/README.md +79 -0
  158. package/test/cypress/node_modules/onetime/README.md +94 -0
  159. package/test/cypress/node_modules/ospath/README.md +53 -0
  160. package/test/cypress/node_modules/p-map/README.md +89 -0
  161. package/test/cypress/node_modules/path-is-absolute/README.md +59 -0
  162. package/test/cypress/node_modules/path-key/README.md +61 -0
  163. package/test/cypress/node_modules/pend/README.md +41 -0
  164. package/test/cypress/node_modules/performance-now/README.md +30 -0
  165. package/test/cypress/node_modules/pify/README.md +119 -0
  166. package/test/cypress/node_modules/pretty-bytes/README.md +131 -0
  167. package/test/cypress/node_modules/proxy-from-env/README.md +131 -0
  168. package/test/cypress/node_modules/psl/README.md +215 -0
  169. package/test/cypress/node_modules/pump/README.md +65 -0
  170. package/test/cypress/node_modules/punycode/README.md +122 -0
  171. package/test/cypress/node_modules/qs/README.md +475 -0
  172. package/test/cypress/node_modules/request-progress/README.md +78 -0
  173. package/test/cypress/node_modules/restore-cursor/README.md +26 -0
  174. package/test/cypress/node_modules/rimraf/README.md +101 -0
  175. package/test/cypress/node_modules/rxjs/README.md +147 -0
  176. package/test/cypress/node_modules/rxjs/_esm2015/README.md +147 -0
  177. package/test/cypress/node_modules/rxjs/_esm5/README.md +147 -0
  178. package/test/cypress/node_modules/rxjs/src/README.md +147 -0
  179. package/test/cypress/node_modules/safe-buffer/README.md +584 -0
  180. package/test/cypress/node_modules/safer-buffer/README.md +156 -0
  181. package/test/cypress/node_modules/semver/README.md +566 -0
  182. package/test/cypress/node_modules/shebang-command/README.md +34 -0
  183. package/test/cypress/node_modules/shebang-regex/README.md +33 -0
  184. package/test/cypress/node_modules/signal-exit/README.md +39 -0
  185. package/test/cypress/node_modules/slice-ansi/README.md +72 -0
  186. package/test/cypress/node_modules/sshpk/README.md +804 -0
  187. package/test/cypress/node_modules/string-width/README.md +50 -0
  188. package/test/cypress/node_modules/strip-ansi/README.md +46 -0
  189. package/test/cypress/node_modules/strip-final-newline/README.md +30 -0
  190. package/test/cypress/node_modules/supports-color/README.md +77 -0
  191. package/test/cypress/node_modules/throttleit/README.md +32 -0
  192. package/test/cypress/node_modules/tmp/README.md +365 -0
  193. package/test/cypress/node_modules/tough-cookie/README.md +527 -0
  194. package/test/cypress/node_modules/tslib/README.md +142 -0
  195. package/test/cypress/node_modules/tunnel-agent/README.md +4 -0
  196. package/test/cypress/node_modules/tweetnacl/README.md +459 -0
  197. package/test/cypress/node_modules/type-fest/README.md +760 -0
  198. package/test/cypress/node_modules/universalify/README.md +76 -0
  199. package/test/cypress/node_modules/untildify/README.md +30 -0
  200. package/test/cypress/node_modules/uuid/README.md +505 -0
  201. package/test/cypress/node_modules/verror/README.md +528 -0
  202. package/test/cypress/node_modules/verror/node_modules/extsprintf/README.md +46 -0
  203. package/test/cypress/node_modules/which/README.md +54 -0
  204. package/test/cypress/node_modules/wrap-ansi/README.md +91 -0
  205. package/test/cypress/node_modules/wrappy/README.md +36 -0
  206. package/test/cypress/node_modules/yallist/README.md +204 -0
  207. package/test/cypress/node_modules/yauzl/README.md +658 -0
@@ -0,0 +1,96 @@
1
+ # cross-spawn
2
+
3
+ [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Coverage Status][codecov-image]][codecov-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url]
4
+
5
+ [npm-url]:https://npmjs.org/package/cross-spawn
6
+ [downloads-image]:https://img.shields.io/npm/dm/cross-spawn.svg
7
+ [npm-image]:https://img.shields.io/npm/v/cross-spawn.svg
8
+ [travis-url]:https://travis-ci.org/moxystudio/node-cross-spawn
9
+ [travis-image]:https://img.shields.io/travis/moxystudio/node-cross-spawn/master.svg
10
+ [appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn
11
+ [appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg
12
+ [codecov-url]:https://codecov.io/gh/moxystudio/node-cross-spawn
13
+ [codecov-image]:https://img.shields.io/codecov/c/github/moxystudio/node-cross-spawn/master.svg
14
+ [david-dm-url]:https://david-dm.org/moxystudio/node-cross-spawn
15
+ [david-dm-image]:https://img.shields.io/david/moxystudio/node-cross-spawn.svg
16
+ [david-dm-dev-url]:https://david-dm.org/moxystudio/node-cross-spawn?type=dev
17
+ [david-dm-dev-image]:https://img.shields.io/david/dev/moxystudio/node-cross-spawn.svg
18
+
19
+ A cross platform solution to node's spawn and spawnSync.
20
+
21
+
22
+ ## Installation
23
+
24
+ Node.js version 8 and up:
25
+ `$ npm install cross-spawn`
26
+
27
+ Node.js version 7 and under:
28
+ `$ npm install cross-spawn@6`
29
+
30
+ ## Why
31
+
32
+ Node has issues when using spawn on Windows:
33
+
34
+ - It ignores [PATHEXT](https://github.com/joyent/node/issues/2318)
35
+ - It does not support [shebangs](https://en.wikipedia.org/wiki/Shebang_(Unix))
36
+ - Has problems running commands with [spaces](https://github.com/nodejs/node/issues/7367)
37
+ - Has problems running commands with posix relative paths (e.g.: `./my-folder/my-executable`)
38
+ - Has an [issue](https://github.com/moxystudio/node-cross-spawn/issues/82) with command shims (files in `node_modules/.bin/`), where arguments with quotes and parenthesis would result in [invalid syntax error](https://github.com/moxystudio/node-cross-spawn/blob/e77b8f22a416db46b6196767bcd35601d7e11d54/test/index.test.js#L149)
39
+ - No `options.shell` support on node `<v4.8`
40
+
41
+ All these issues are handled correctly by `cross-spawn`.
42
+ There are some known modules, such as [win-spawn](https://github.com/ForbesLindesay/win-spawn), that try to solve this but they are either broken or provide faulty escaping of shell arguments.
43
+
44
+
45
+ ## Usage
46
+
47
+ Exactly the same way as node's [`spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) or [`spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options), so it's a drop in replacement.
48
+
49
+
50
+ ```js
51
+ const spawn = require('cross-spawn');
52
+
53
+ // Spawn NPM asynchronously
54
+ const child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
55
+
56
+ // Spawn NPM synchronously
57
+ const result = spawn.sync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
58
+ ```
59
+
60
+
61
+ ## Caveats
62
+
63
+ ### Using `options.shell` as an alternative to `cross-spawn`
64
+
65
+ Starting from node `v4.8`, `spawn` has a `shell` option that allows you run commands from within a shell. This new option solves
66
+ the [PATHEXT](https://github.com/joyent/node/issues/2318) issue but:
67
+
68
+ - It's not supported in node `<v4.8`
69
+ - You must manually escape the command and arguments which is very error prone, specially when passing user input
70
+ - There are a lot of other unresolved issues from the [Why](#why) section that you must take into account
71
+
72
+ If you are using the `shell` option to spawn a command in a cross platform way, consider using `cross-spawn` instead. You have been warned.
73
+
74
+ ### `options.shell` support
75
+
76
+ While `cross-spawn` adds support for `options.shell` in node `<v4.8`, all of its enhancements are disabled.
77
+
78
+ This mimics the Node.js behavior. More specifically, the command and its arguments will not be automatically escaped nor shebang support will be offered. This is by design because if you are using `options.shell` you are probably targeting a specific platform anyway and you don't want things to get into your way.
79
+
80
+ ### Shebangs support
81
+
82
+ While `cross-spawn` handles shebangs on Windows, its support is limited. More specifically, it just supports `#!/usr/bin/env <program>` where `<program>` must not contain any arguments.
83
+ If you would like to have the shebang support improved, feel free to contribute via a pull-request.
84
+
85
+ Remember to always test your code on Windows!
86
+
87
+
88
+ ## Tests
89
+
90
+ `$ npm test`
91
+ `$ npm test -- --watch` during development
92
+
93
+
94
+ ## License
95
+
96
+ Released under the [MIT License](https://www.opensource.org/licenses/mit-license.php).
@@ -0,0 +1,25 @@
1
+ # Cypress
2
+
3
+ Fast, easy and reliable testing for anything that runs in a browser.
4
+
5
+ ## What is this?
6
+
7
+ [Cypress](https://www.cypress.io/) comes packaged as an `npm` module, which is all you need to get started testing.
8
+
9
+ After installing you'll be able to:
10
+
11
+ - Open Cypress from the CLI
12
+ - Run Cypress from the CLI
13
+ - `require` Cypress as a module
14
+
15
+ ## Install
16
+
17
+ Please check our [system requirements](https://on.cypress.io/installing-cypress).
18
+
19
+ ```sh
20
+ npm install --save-dev cypress
21
+ ```
22
+
23
+ ## Documentation
24
+
25
+ Please [visit our documentation](https://on.cypress.io/cli) for a full list of commands and examples.
@@ -0,0 +1,10 @@
1
+ # @cypress/angular
2
+
3
+ Mount Angular components in the open source [Cypress.io](https://www.cypress.io/) test runner
4
+
5
+ > **Note:** This package is bundled with the `cypress` package and should not need to be installed separately. See the [Angular Component Testing Docs](https://docs.cypress.io/guides/component-testing/angular/overview) for mounting Angular components. Installing and importing `mount` from `@cypress/angular` should only be done for advanced use-cases.
6
+ ## Development
7
+
8
+ Run `yarn build` to compile and sync packages to the `cypress` cli package.
9
+
10
+ ## [Changelog](./CHANGELOG.md)
@@ -0,0 +1,140 @@
1
+ # @cypress/mount-utils
2
+
3
+ > **Note** this package is not meant to be used outside of cypress component testing.
4
+
5
+ This library exports some shared types and utility functions designed to build adapters for components frameworks.
6
+
7
+ It is used in:
8
+
9
+ - [`@cypress/react`](https://github.com/cypress-io/cypress/tree/develop/npm/react)
10
+ - [`@cypress/vue`](https://github.com/cypress-io/cypress/tree/develop/npm/vue)
11
+ - [`@cypress/svelte`](https://github.com/cypress-io/cypress/tree/develop/npm/svelte)
12
+ - [`@cypress/angular`](https://github.com/cypress-io/cypress/tree/develop/npm/angular)
13
+
14
+ ## What is a Mount Adapter?
15
+
16
+ All Component Tests require a component to be **mounted**. This is generally done with a custom command, `cy.mount` by default.
17
+
18
+
19
+ ### Requirements
20
+
21
+ All the functionality used to create the first party Mount adapters is available to support third parties adapters. At minimum, a Mount Adapter must:
22
+
23
+ - Receive a component as the first argument. This could be class, function etc - depends on the framework.
24
+ - Return a Cypress Chainable (for example using `cy.wrap`) that resolves whatever is idiomatic for your framework
25
+ - Call `getContainerEl` to access the root DOM element
26
+
27
+ In addition, we recommend that Mount Adapters:
28
+
29
+ - call `setupHooks` to register the required lifecycle hooks for `@cypress/mount-utils` to work
30
+
31
+ ### Example Mount Adapter: Web Components
32
+
33
+ Here's a simple yet realistic example of Mount Adapter targeting Web Components. It uses utilities from this package (`@cypress/mount-utils`) This is recommended, so your adapter behaves similar to the first party Mount Adapters.
34
+
35
+ ```ts
36
+ import {
37
+ ROOT_SELECTOR,
38
+ setupHooks,
39
+ getContainerEl
40
+ } from "@cypress/mount-utils";
41
+
42
+ Cypress.on("run:start", () => {
43
+ // Consider doing a check to ensure your adapter only runs in Component Testing mode.
44
+ if (Cypress.testingType !== "component") {
45
+ return;
46
+ }
47
+
48
+ Cypress.on("test:before:run", () => {
49
+ // Do some cleanup from previous test - for example, clear the DOM.
50
+ getContainerEl().innerHTML = "";
51
+ });
52
+ });
53
+
54
+ function maybeRegisterComponent<T extends CustomElementConstructor>(
55
+ name: string,
56
+ webComponent: T
57
+ ) {
58
+ // Avoid double-registering a Web Component.
59
+ if (window.customElements.get(name)) {
60
+ return;
61
+ }
62
+
63
+ window.customElements.define(name, webComponent);
64
+ }
65
+
66
+ export function mount(
67
+ webComponent: CustomElementConstructor
68
+ ): Cypress.Chainable {
69
+ // Get root selector defined in `cypress/support.component-index.html
70
+ const $root = document.querySelector(ROOT_SELECTOR)!;
71
+
72
+ // Change to kebab-case to comply with Web Component naming convention
73
+ const name = webComponent.name
74
+ .replace(/([a-z0–9])([A-Z])/g, "$1-$2")
75
+ .toLowerCase();
76
+
77
+ /// Register Web Component
78
+ maybeRegisterComponent(name, webComponent);
79
+
80
+ // Render HTML containing component.
81
+ $root.innerHTML = `<${name} id="root"></${name}>`;
82
+
83
+ // Log a messsage in the Command Log.
84
+ Cypress.log({
85
+ name: "mount",
86
+ message: [`<${name} ... />`],
87
+ });
88
+
89
+ // Return a `Cypress.Chainable` that returns whatever is idiomatic
90
+ // in the framework your mount adapter targets.
91
+ return cy.wrap(document.querySelector("#root"), { log: false });
92
+ }
93
+
94
+ // Setup Cypress lifecycle hooks.
95
+ setupHooks();
96
+ ```
97
+
98
+ Usage:
99
+
100
+ ```ts
101
+ // User will generally register a `cy.mount` command in `cypress/support/component.js`:
102
+
103
+ import { mount } from '@package/cypress-web-components'
104
+
105
+ Cypress.Commands.add('mount', mount)
106
+
107
+ // Test
108
+ export class WebCounter extends HTMLElement {
109
+ constructor() {
110
+ super();
111
+ }
112
+
113
+ connectedCallback() {
114
+ this.innerHTML = `
115
+ <div>
116
+ <button>Counter</button>
117
+ </div>`;
118
+ }
119
+ }
120
+
121
+
122
+ describe('web-component.cy.ts', () => {
123
+ it('playground', () => {
124
+ cy.mount(WebCounter)
125
+ })
126
+ })
127
+ ```
128
+
129
+ For more robust, production ready examples, check out our first party adapters.
130
+
131
+ ## Compatibility
132
+
133
+ | @cypress/mount-utils | cypress |
134
+ | -------------------- | ------- |
135
+ | <= v1 | <= v9 |
136
+ | >= v2 | >= v10 |
137
+
138
+ ## Changelog
139
+
140
+ [Changelog](./CHANGELOG.md)
@@ -0,0 +1,14 @@
1
+ # @cypress/react
2
+
3
+ Mount React components in the open source [Cypress.io](https://www.cypress.io/) test runner
4
+
5
+ > **Note:** This package is bundled with the `cypress` package and should not need to be installed separately. See the [React Component Testing Docs](https://docs.cypress.io/guides/component-testing/react/overview) for mounting React components. Installing and importing `mount` from `@cypress/react` should only be done for advanced use-cases.
6
+ ## Development
7
+
8
+ Run `yarn build` to compile and sync packages to the `cypress` cli package.
9
+
10
+ Run `yarn cy:open` to open Cypress component testing against real-world examples.
11
+
12
+ Run `yarn test` to execute headless Cypress tests.
13
+
14
+ ## [Changelog](./CHANGELOG.md)
@@ -0,0 +1,7 @@
1
+ # @cypress/react18
2
+
3
+ Mount React 18 components in the open source [Cypress.io](https://www.cypress.io/) test runner
4
+
5
+ > **Note:** This package is bundled with the `cypress` package and should not need to be installed separately. See the [React Component Testing Docs](https://docs.cypress.io/guides/component-testing/react/overview) for mounting React components. Installing and importing `mount` from `@cypress/react18` should only be done for advanced use-cases.
6
+
7
+ ## [Changelog](./CHANGELOG.md)
@@ -0,0 +1,15 @@
1
+ # @cypress/svelte
2
+
3
+ Mount Svelte components in the open source [Cypress.io](https://www.cypress.io/) test runner **v10.7.0+**
4
+
5
+ > **Note:** This package is bundled with the `cypress` package and should not need to be installed separately. See the [Svelte Component Testing Docs](https://docs.cypress.io/guides/component-testing/svelte/overview) for mounting Svelte components. Installing and importing `mount` from `@cypress/svelte` should only be done for advanced use-cases.
6
+
7
+ ## Development
8
+
9
+ Run `yarn build` to compile and sync packages to the `cypress` cli package.
10
+
11
+ Run `yarn cy:open` to open Cypress component testing against real-world examples.
12
+
13
+ Run `yarn test` to execute headless Cypress tests.
14
+
15
+ ## [Changelog](./CHANGELOG.md)
@@ -0,0 +1,14 @@
1
+ # @cypress/vue
2
+
3
+ Mount Vue 3 components in the open source [Cypress.io](https://www.cypress.io/) test runner
4
+
5
+ > **Note:** This package is bundled with the `cypress` package and should not need to be installed separately. See the [Vue Component Testing Docs](https://docs.cypress.io/guides/component-testing/vue/overview) for mounting Vue components. Installing and importing `mount` from `@cypress/vue` should only be done for advanced use-cases.
6
+ ## Development
7
+
8
+ Run `yarn build` to compile and sync packages to the `cypress` cli package.
9
+
10
+ Run `yarn cy:open` to open Cypress component testing against real-world examples.
11
+
12
+ Run `yarn test` to execute headless Cypress tests.
13
+
14
+ ## [Changelog](./CHANGELOG.md)
@@ -0,0 +1,7 @@
1
+ # @cypress/vue2
2
+
3
+ Mount Vue 2 components in the open source [Cypress.io](https://www.cypress.io/) test runner
4
+
5
+ > **Note:** This package is bundled with the `cypress` package and should not need to be installed separately. See the [Vue Component Testing Docs](https://docs.cypress.io/guides/component-testing/vue/overview) for mounting Vue components. Installing and importing `mount` from `@cypress/vue2` should only be done for advanced use-cases.
6
+
7
+ ## [Changelog](./CHANGELOG.md)