Skip to content

Commit 0f215f3

Browse files
authored
feat: add cypress/angular-zoneless testing harness for Angular 21 (also supports Angular 20) (#33025)
* feat: add cypress/angular-zoneless mount handler and auto scaffold for angular 21 zoneless * make active fixture sync and update angular-21 examples to signals where applicable
1 parent d57db87 commit 0f215f3

File tree

81 files changed

+1752
-27
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1752
-27
lines changed

.circleci/cache-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Bump this version to force CI to re-create the cache from scratch.
2-
11-25-2025
2+
12-02-2025

.circleci/src/pipeline/@pipeline.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ commands:
121121
name: Set environment variable to determine whether or not to persist artifacts
122122
command: |
123123
echo "Setting SHOULD_PERSIST_ARTIFACTS variable"
124-
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "feat/support_angular_21" ]]; then
124+
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "feat/add_zoneless_angular_harness" ]]; then
125125
export SHOULD_PERSIST_ARTIFACTS=true
126126
fi' >> "$BASH_ENV"
127127
# You must run `setup_should_persist_artifacts` command and be using bash before running this command
@@ -2301,6 +2301,14 @@ jobs:
23012301
name: Build
23022302
command: yarn lerna run build --scope=@cypress/angular
23032303

2304+
npm-angular-zoneless:
2305+
<<: *defaults
2306+
steps:
2307+
- restore_cached_workspace
2308+
- run:
2309+
name: Build
2310+
command: yarn lerna run build --scope @cypress/angular-zoneless
2311+
23042312
npm-puppeteer-unit-tests:
23052313
<<: *defaults
23062314
steps:

.circleci/src/pipeline/workflows/@main.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ linux-x64:
44
- equal: [ develop, << pipeline.git.branch >> ]
55
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
66
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
7-
- equal: [ 'feat/support_angular_21', << pipeline.git.branch >> ]
7+
- equal: [ 'feat/add_zoneless_angular_harness', << pipeline.git.branch >> ]
88
- matches:
99
pattern: /^release\/\d+\.\d+\.\d+$/
1010
value: << pipeline.git.branch >>
@@ -236,6 +236,9 @@ linux-x64:
236236
- npm-angular:
237237
requires:
238238
- build
239+
- npm-angular-zoneless:
240+
requires:
241+
- build
239242
- npm-mount-utils:
240243
requires:
241244
- build
@@ -258,6 +261,7 @@ linux-x64:
258261
- check-ts
259262
- health-check
260263
- npm-angular
264+
- npm-angular-zoneless
261265
- npm-eslint-plugin-dev
262266
- npm-puppeteer-unit-tests
263267
- npm-puppeteer-cypress-tests

.circleci/src/pipeline/workflows/pull-request.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,11 @@ jobs:
290290
- internal-pr-build
291291
- external-pr-build
292292
- approve-contributor-pr
293+
- npm-angular-zoneless:
294+
requires:
295+
- internal-pr-build
296+
- external-pr-build
297+
- approve-contributor-pr
293298
- npm-mount-utils:
294299
requires:
295300
- internal-pr-build

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
- [Cypress App](https://on.cypress.io/changelog)
44
- [`@cypress/angular`](https://github.com/cypress-io/cypress/blob/develop/npm/angular/CHANGELOG.md)
5+
- [`@cypress/angular-zoneless`](https://github.com/cypress-io/cypress/blob/develop/npm/angular-zoneless/CHANGELOG.md)
56
- [`@cypress/eslint-plugin-dev`](https://github.com/cypress-io/cypress/blob/develop/npm/eslint-plugin-dev/CHANGELOG.md)
67
- [`@cypress/mount-utils`](https://github.com/cypress-io/cypress/blob/develop/npm/mount-utils/CHANGELOG.md)
78
- [`@cypress/react`](https://github.com/cypress-io/cypress/blob/develop/npm/react/CHANGELOG.md)

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ Here is a list of the npm packages in this repository:
215215
| Folder Name | Package Name | Purpose |
216216
| :----------------------------------------------------- | :--------------------------------- | :--------------------------------------------------------------------------- |
217217
| [angular](./npm/angular) | `@cypress/angular` | Cypress component testing for Angular. |
218+
| [angular-zoneless](./npm/angular-zoneless) | `@cypress/angular-zoneless` | Cypress component testing for Angular using zoneless change detection. |
218219
| [eslint-plugin-dev](./npm/eslint-plugin-dev) | `@cypress/eslint-plugin-dev` | Eslint plugin for internal development. |
219220
| [grep](./npm/grep) | `@cypress/grep` | Filter tests using substring |
220221
| [mount-utils](./npm/mount-utils) | `@cypress/mount-utils` | Common functionality for Vue/React/Angular adapters. |

cli/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ vue
1919
react*
2020
mount-utils
2121
angular
22+
angular-zoneless
2223
svelte
2324
index.js
2425
lib/**/*.js

cli/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ _Released 12/16/2025 (PENDING)_
66
**Features:**
77

88
- `Angular` version 21 is now supported within component testing. Addressed in [#33004](https://github.com/cypress-io/cypress/pull/33004).
9+
- Adds zoneless support for `Angular` Component Testing through the `angular-zoneless` mount function. Addresses [#31504](https://github.com/cypress-io/cypress/issues/31504) and [#30070](https://github.com/cypress-io/cypress/issues/30070).
910

1011
**Bugfixes:**
1112

cli/eslint.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export default [
3636
'**/build/**/*',
3737
'package.json',
3838
'**/angular/**/*',
39+
'**/angular-zoneless/**/*',
3940
'**/react/**/*',
4041
'**/vue/**/*',
4142
'**/svelte/**/*',

cli/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
},
6363
"devDependencies": {
6464
"@cypress/angular": "0.0.0-development",
65+
"@cypress/angular-zoneless": "0.0.0-development",
6566
"@cypress/grep": "0.0.0-development",
6667
"@cypress/mount-utils": "0.0.0-development",
6768
"@cypress/react": "0.0.0-development",
@@ -102,6 +103,7 @@
102103
"vue",
103104
"react",
104105
"angular",
106+
"angular-zoneless",
105107
"svelte"
106108
],
107109
"bin": {
@@ -143,6 +145,11 @@
143145
"import": "./angular/dist/index.js",
144146
"require": "./angular/dist/index.js"
145147
},
148+
"./angular-zoneless": {
149+
"types": "./angular-zoneless/dist/index.d.ts",
150+
"import": "./angular-zoneless/dist/index.js",
151+
"require": "./angular-zoneless/dist/index.js"
152+
},
146153
"./svelte": {
147154
"types": "./svelte/dist/index.d.ts",
148155
"import": "./svelte/dist/cypress-svelte.esm-bundler.js",

0 commit comments

Comments
 (0)