You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To make spying on event emitters easier, there is a utility function called
@@ -179,7 +198,13 @@ it('clicking + fires a change event with the incremented value', () => {
179
198
})
180
199
```
181
200
182
-
### Using autoSpyOutputs
201
+
### Using autoSpyOutputs (deprecated)
202
+
203
+
:::caution
204
+
205
+
The `autoSpyOutputs` flag is deprecated and not supported in `cypress/angular-zoneless` and will be removed in a future version.
206
+
207
+
:::
183
208
184
209
You might find yourself repeatedly creating a `cy.spy()` for each of your
185
210
component outputs. Because of this, we created an easy mechanism to handle this
@@ -208,17 +233,8 @@ function. It currently does not work with the template syntax.
208
233
209
234
:::
210
235
211
-
:::caution
212
-
213
-
`autoSpyOutput` is an **experimental feature** and could be removed or changed
214
-
in the future
215
-
216
-
:::
217
-
218
236
### Signals
219
237
220
-
With the releases of Angular versions [17.1](https://github.com/angular/angular/blob/main/CHANGELOG.md#1710-2024-01-17) and [17.2](https://github.com/angular/angular/blob/main/CHANGELOG.md#1720-2024-02-14), [input](https://github.com/angular/angular/pull/53521) and [model](https://github.com/angular/angular/pull/54252) signals were introduced into the `@angular/core` API. Though basic signals were introduced in Angular `16`, using all signals requires Angular `17.2` and above.
221
-
222
238
:::info
223
239
224
240
With Cypress 14, signal support is directly included in the `cypress/angular` testing harness.
@@ -434,7 +450,13 @@ This custom mount command will allow you to skip manually passing in the
434
450
`ButtonComponent` and `CardComponent` as declarations into each `cy.mount()`
435
451
call.
436
452
437
-
### autoSpyOutputs
453
+
### autoSpyOutputs (deprecated)
454
+
455
+
:::caution
456
+
457
+
The `autoSpyOutputs` flag is deprecated and not supported in `cypress/angular-zoneless` and will be removed in a future version.
458
+
459
+
:::
438
460
439
461
Here is an example of defaulting `autoSpyOutputs` for every mounted component:
Copy file name to clipboardExpand all lines: docs/app/component-testing/angular/overview.mdx
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,11 +20,12 @@ sidebar_label: Overview
20
20
21
21
## Framework Support
22
22
23
-
Cypress Component Testing supports Angular `^18.0.0`, `^19.0.0`, and `^20.0.0`.
23
+
Cypress Component Testing supports Angular `^18.0.0`, `^19.0.0`, `^20.0.0`, and `^21.0.0`.
24
24
25
25
:::info
26
26
27
27
Our testing harness, `cypress/angular`, still requires `zone.js` and `@angular-devkit/build-angular` to be installed in your project, even if your project is zoneless or is built with `@angular/build`.
28
+
If you wish to use the zoneless configuration, which is the default in Angular 21, you can use `cypress/angular-zoneless` testing harness instead as of Cypress `15.8.0`.
0 commit comments