-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat: add cypress/angular-zoneless testing harness for Angular 21 (also supports Angular 20)
#33025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/support_angular_21
Are you sure you want to change the base?
feat: add cypress/angular-zoneless testing harness for Angular 21 (also supports Angular 20)
#33025
Conversation
…ritable signals to an observable
5700a7b to
b3a6a49
Compare
cypress
|
||||||||||||||||||||||||||||||||||||||||
| Project |
cypress
|
| Branch Review |
feat/add_zoneless_angular_harness
|
| Run status |
|
| Run duration | 19m 52s |
| Commit |
|
| Committer | Bill Glesias |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
4
|
|
|
27
|
|
|
0
|
|
|
798
|
| View all changes introduced in this branch ↗︎ | |
UI Coverage
62.34%
|
|
|---|---|
|
|
27
|
|
|
48
|
Accessibility
99.02%
|
|
|---|---|
|
|
0 critical
3 serious
1 moderate
0 minor
|
|
|
19
|
6b71efe to
a1b2377
Compare
…se zoneless support FIRST before we can have the schematic support angular 21
a1b2377 to
15f446b
Compare
| }).subscribe((value) => { | ||
| component[expectedChangeKey]?.emit(value) | ||
| }) | ||
| activeInternalSubscriptions.push( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixing a bug here? don't think we need a changelog because nothing was reported but cursorbot did detect a possible memory leak here
| const cypressSchematicPackagePath = path.join(__dirname, '..') | ||
|
|
||
| const ANGULAR_PROJECTS: ProjectFixtureDir[] = ['angular-20', 'angular-21'] | ||
| const ANGULAR_PROJECTS: ProjectFixtureDir[] = ['angular-19', 'angular-20'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have to downgrade the test because the zoneless handler isn't supported within the binary yet (see the PR description)
| "jsdom": "^27.1.0", | ||
| "typescript": "~5.9.2", | ||
| "vitest": "^4.0.8", | ||
| "zone.js": "~0.15.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removes the zone.js dependency as promised
10e9b77 to
70ce43b
Compare
47d9a59 to
1e24ba1
Compare
Additional details
Adds a zoneless component testing harness for Angular 20 (experimental) and Angular 21. Angular 21 ships with zoneless and Cypress will scaffold
cypress/angular-zonelessfor Angular 21+ projects.Because this is likely going to be the
nexttarget forcypress/angularand the recommended pattern for data-binding is now signals, this testing harness will be removeautoDetectChangesas this happens naturally andautoSpyOutputsas@Outputdecorators are legacy and can be created manually viacreateSpyOutputs.NOTE: when we merge the changes upstream in #33007 we need to call this out as BREAKING CHANGES
Additionally, with the addition of the
zonelessmount handler, theangular-21system test project needs it's own set of fixtures, which will eventually be moved into the main fixture directory (as a replacement) once Angular 18 and 19 support are officially dropped from Cypress.After this releases, we need to update
@cypress/schematicto support Angular 21 as the scaffolded files via the schematic CLI are not correct. I have a WIP of this on #33027 and it must be done AFTER this feature is releasedSteps to test
How has the user experience changed?
PR Tasks
cypress-documentation?type definitions?Note
Introduces
@cypress/angular-zonelessfor Angular 21 (and 20 preview) and integrates it across the CLI, CI pipelines, scaffolding wizard, and system tests (adds an Angular 21 project).@cypress/angular-zonelesswithmount/createOutputSpy, zoneless TestBed viaprovideZonelessChangeDetection, and rollup/tsconfig.@angular/core/rxjs-interopto externals.cypress/angular-zoneless(exports, files, devDeps) and syncs in post-build; updates ESLint ignores; updates changelog.cypress/angular-zonelessfor Angular >=21; support file generation tests accept bothcypress/angularandcypress/angular-zoneless.npm-angular-zonelessbuild job to main and PR workflows; updates branch filters; bumps cache key.angular-21fixture using zoneless harness; updates configs/aliases, component-index, and specs; separates Angular 21 run; adjusts Angular handler test (styles.css); fixes provider key typo in an existing spec.Written by Cursor Bugbot for commit 1e24ba1. This will update automatically on new commits. Configure here.