Skip to content

Conversation

@AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented Nov 26, 2025

  • Closes

Additional details

Steps to test

How has the user experience changed?

PR Tasks


Note

Introduces @cypress/angular-zoneless and integrates Angular 21 zoneless component testing across CLI, schematics, scaffolding, tests, and CI.

  • Angular Component Testing:
    • New package: Add @cypress/angular-zoneless with mount/createOutputSpy using zoneless change detection.
    • CLI integration: Export cypress/angular-zoneless, include in build copy, file lists, and ESLint ignores.
    • Adapter updates: Add @angular/core/rxjs-interop externals and subscription cleanup; minor event subscription fix in @cypress/angular.
  • Schematics (@cypress/schematic):
    • Detect Angular version via semver; for >=21 scaffold zoneless CT support files and use cypress/angular-zoneless in support.
    • Upgrade Angular devkit/CLI dev deps to v21; add semver dep; tests updated for Angular 20/21 and zoneless paths.
    • Temporarily pin cypress install URL in dependency writer.
  • Scaffolding:
    • Auto-select mount module: cypress/angular-zoneless for Angular >=21, otherwise cypress/angular.
  • System Tests:
    • Add full angular-21 fixture/project and specs using zoneless mount; adjust aliases and configs; separate Angular 21 run.
    • Update Angular handler tests (styles to styles.css).
  • CI:
    • Add npm-angular-zoneless job to workflows and ready-to-release deps; update branch filters; bump cache version.
  • Docs/Repo meta:
    • Link new changelog and list package in CONTRIBUTING.md.

Written by Cursor Bugbot for commit 9a38f7c. This will update automatically on new commits. Configure here.

@cypress
Copy link

cypress bot commented Nov 26, 2025

cypress    Run #67745

Run Properties:  status check passed Passed #67745  •  git commit 9a38f7ca87: WIP: support angular 21 inside cypress schematic
Project cypress
Branch Review chore/cypress-schematic-angular-21
Run status status check passed Passed #67745
Run duration 19m 02s
Commit git commit 9a38f7ca87: WIP: support angular 21 inside cypress schematic
Committer Bill Glesias
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 8
Tests that did not run due to a developer annotating a test with .skip  Pending 1097
Tests that did not run due to a failure in a mocha hook  Skipped 4
Tests that passed  Passing 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%
  Untested elements 188  
  Tested elements 161  
Accessibility  98%
  Failed rules  4 critical   8 serious   2 moderate   2 minor
  Failed elements 101  

@AtofStryker AtofStryker self-assigned this Dec 3, 2025
@AtofStryker AtofStryker force-pushed the chore/cypress-schematic-angular-21 branch from b3e5b6a to 9a38f7c Compare December 3, 2025 22:57
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')
Copy link

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)

Fix in Cursor Fix in Web

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'
Copy link

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.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants