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
Copy file name to clipboardExpand all lines: docs/app/component-testing/angular/api.mdx
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,11 @@ sidebar_label: API
13
13
14
14
### mount
15
15
16
+
```js
17
+
// for Angular 20 and 21 using zoneless configuration
18
+
import { mount } from'cypress/angular-zoneless'
19
+
```
20
+
16
21
```js
17
22
import { mount } from'cypress/angular'
18
23
```
@@ -142,18 +147,18 @@ providers, declarations, imports and even component @Inputs()
142
147
<td>Description</td>
143
148
</thead>
144
149
<tr>
145
-
<td>autoSpyOutputs</td>
150
+
<td>autoSpyOutputs (deprecated)</td>
146
151
<td>boolean (optional)</td>
147
152
<td>
148
153
flag to automatically create a cy.spy() for every component @Output()
149
-
property
154
+
property. This is deprecated and not supported in `cypress/angular-zoneless` and will be removed in a future version
150
155
</td>
151
156
</tr>
152
157
<tr>
153
-
<td>autoDetectChanges</td>
158
+
<td>autoDetectChanges (deprecated)</td>
154
159
<td>boolean (optional)</td>
155
160
<td>
156
-
flag defaulted to true to automatically detect changes in your components
161
+
flag defaulted to true to automatically detect changes in your components. This is deprecated and not supported in `cypress/angular-zoneless` and will be removed in a future version as it is not needed with zoneless configuration
To make spying on event emitters easier, there is a utility function called
@@ -179,7 +196,13 @@ it('clicking + fires a change event with the incremented value', () => {
179
196
})
180
197
```
181
198
182
-
### Using autoSpyOutputs
199
+
### Using autoSpyOutputs (deprecated)
200
+
201
+
:::caution
202
+
203
+
The `autoSpyOutputs` flag is deprecated and not supported in `cypress/angular-zoneless` and will be removed in a future version.
204
+
205
+
:::
183
206
184
207
You might find yourself repeatedly creating a `cy.spy()` for each of your
185
208
component outputs. Because of this, we created an easy mechanism to handle this
@@ -208,17 +231,8 @@ function. It currently does not work with the template syntax.
208
231
209
232
:::
210
233
211
-
:::caution
212
-
213
-
`autoSpyOutput` is an **experimental feature** and could be removed or changed
214
-
in the future
215
-
216
-
:::
217
-
218
234
### Signals
219
235
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
236
:::info
223
237
224
238
With Cypress 14, signal support is directly included in the `cypress/angular` testing harness.
@@ -434,7 +448,13 @@ This custom mount command will allow you to skip manually passing in the
434
448
`ButtonComponent` and `CardComponent` as declarations into each `cy.mount()`
435
449
call.
436
450
437
-
### autoSpyOutputs
451
+
### autoSpyOutputs (deprecated)
452
+
453
+
:::caution
454
+
455
+
The `autoSpyOutputs` flag is deprecated and not supported in `cypress/angular-zoneless` and will be removed in a future version.
456
+
457
+
:::
438
458
439
459
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