-
Notifications
You must be signed in to change notification settings - Fork 3.4k
WIP: support Angular 21 inside @cypress/schematic
#33027
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: develop
Are you sure you want to change the base?
Conversation
cypress
|
||||||||||||||||||||||||||||||||||||||||
| Project |
cypress
|
| Branch Review |
chore/cypress-schematic-angular-21
|
| Run status |
|
| Run duration | 19m 02s |
| Commit |
|
| Committer | Bill Glesias |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
8
|
|
|
1097
|
|
|
4
|
|
|
26703
|
| View all changes introduced in this branch ↗︎ | |
Warning
Partial Report: The results for the Application Quality reports may be incomplete.
UI Coverage
45.48%
|
|
|---|---|
|
|
188
|
|
|
161
|
Accessibility
98%
|
|
|---|---|
|
|
4 critical
8 serious
2 moderate
2 minor
|
|
|
101
|
b3e5b6a to
9a38f7c
Compare
| if (overwrite || !json.get(path)) { | ||
| json.modify(path, version) | ||
| // mock the correct binary here for now | ||
| json.modify(path, 'https://cdn.cypress.io/beta/npm/15.8.0/darwin-arm64/feat/add_zoneless_angular_harness-d64f6cf48ca1d64475a53a44e83c2d58cc627dd9/cypress.tgz') |
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.
Bug: Hardcoded beta binary URL replaces actual Cypress version
The addPackageJsonDependency function ignores the version parameter passed from the caller and hardcodes a specific beta CDN URL instead. When users run ng add @cypress/schematic, this causes Cypress to be installed from a specific feature branch beta build rather than the latest stable version from npm. The version variable is destructured but never used, as indicated by the @ts-expect-error comment acknowledging this should be removed. This appears to be debug code that was accidentally committed.
Additional Locations (1)
| const { projects } = angularJsonValue | ||
|
|
||
| // if using Angular 21 or greater, we need to use the cypress/angular-zoneless mount function | ||
| const applyPath = isSemverGte(options.__version__, '21.0.0') ? './files-ct-zoneless' : './files-ct' |
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.
Bug: Null version causes semver comparison to throw error
The isSemverGte(options.__version__, '21.0.0') call can throw a TypeError when options.__version__ is null. The getAngularSemverVersion function returns null when it can't parse the Angular version or when @angular/core isn't found in dependencies. The semver gte function throws when given null as the first argument rather than returning false. This would cause the schematic to crash for projects with unusual or missing Angular version specifications.
Additional details
Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation?type definitions?Note
Introduces
@cypress/angular-zonelessand integrates Angular 21 zoneless component testing across CLI, schematics, scaffolding, tests, and CI.@cypress/angular-zonelesswithmount/createOutputSpyusing zoneless change detection.cypress/angular-zoneless, include in build copy, file lists, and ESLint ignores.@angular/core/rxjs-interopexternals and subscription cleanup; minor event subscription fix in@cypress/angular.@cypress/schematic):>=21scaffold zoneless CT support files and usecypress/angular-zonelessin support.semverdep; tests updated for Angular 20/21 and zoneless paths.cypressinstall URL in dependency writer.cypress/angular-zonelessfor Angular>=21, otherwisecypress/angular.angular-21fixture/project and specs using zoneless mount; adjust aliases and configs; separate Angular 21 run.styles.css).npm-angular-zonelessjob to workflows and ready-to-release deps; update branch filters; bump cache version.CONTRIBUTING.md.Written by Cursor Bugbot for commit 9a38f7c. This will update automatically on new commits. Configure here.