Skip to content

Conversation

@AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented Nov 24, 2025

  • Closes N/A

Additional details

Adds support for Angular 21 within Cypress Component testing. Right now the Angular 21 projects needs zone.js as a devDependency as cypress/angular currently only supports zone.js. I will have a follow up PR that adds a zoneless mount handler and defaults the scaffolding to cypress/angular-zoneless for Angular 21 applications

As Angular 21's change detection is a bit different from the legacy implementations, I refactored some of the angular fixtures to use signals instead of observables as signals are fully supported as of angular 18+

Steps to test

use the prepublished binaries to make sure scaffolding works on a new angular 21 project

How has the user experience changed?

Users will now be able to use Angular 21 without Cypress scaffolding warnings. NOTE: this currently still requires the zone.js devDependency until the zoneless mount handler is merged down. The intent is for both of these two be shipped at the same time but the work is considered separate.

PR Tasks


Note

Adds Angular 21 component testing support, updates scaffolding/deps and tests, introduces an Angular 21 system-test fixture, and updates CI filters.

  • Features
    • Add Angular 21 support for component testing.
    • Changelog entry announcing Angular 21 support.
  • System Tests
    • New system-tests/projects/angular-21 fixture (with angular.json, cypress.config.ts, package.json, tsconfig.json).
    • Include Angular 21 in component_testing_spec.ts matrix and WDS e2e (angular.cy.ts).
    • Update reporter CT test to use angular-21.
  • Angular Fixtures & Specs
    • Refactor sample components/services to Angular signals/model API and async fetch; remove HttpClient/service where unnecessary.
    • Update specs to use componentRef.setInput and drop HttpClientModule imports; remove counter.service.
  • Webpack Dev Server
    • Adjust angularHandler tests for Angular 20/21 config shapes and tsconfig generation flag.
  • Scaffolding & Detection
    • Allow Angular 21 across wizard deps (@angular/* and DevKit) and detection tests.
    • Update supported frameworks table to list Angular 18–21.
    • Schematic tests now target angular-20 and angular-21.
  • CI
    • CircleCI workflow/filters updated to use branch feat/support_angular_21 and artifact persistence conditions.

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

@AtofStryker AtofStryker self-assigned this Nov 24, 2025
@AtofStryker AtofStryker force-pushed the feat/support_angular_21 branch from ea970e7 to 0f3772b Compare November 24, 2025 19:12
@cypress
Copy link

cypress bot commented Nov 24, 2025

cypress    Run #67601

Run Properties:  status check passed Passed #67601  •  git commit 5d5b79a095: fix issue with incorrect placement of tsconfig in angular config
Project cypress
Branch Review feat/support_angular_21
Run status status check passed Passed #67601
Run duration 19m 15s
Commit git commit 5d5b79a095: fix issue with incorrect placement of tsconfig in angular config
Committer Bill Glesias
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 2
Tests that did not run due to a developer annotating a test with .skip  Pending 27
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 798
View all changes introduced in this branch ↗︎
UI Coverage  62.34%
  Untested elements 27  
  Tested elements 48  
Accessibility  99.03%
  Failed rules  0 critical   3 serious   1 moderate   0 minor
  Failed elements 19  

@AtofStryker AtofStryker force-pushed the feat/support_angular_21 branch from 0f3772b to d8271ce Compare November 24, 2025 22:34
@AtofStryker AtofStryker force-pushed the feat/support_angular_21 branch from d8271ce to 050dc8a Compare November 25, 2025 14:52
@AtofStryker AtofStryker force-pushed the feat/support_angular_21 branch from 050dc8a to da19b3f Compare November 25, 2025 14:56
@AtofStryker AtofStryker force-pushed the feat/support_angular_21 branch from da19b3f to 0d85a78 Compare November 25, 2025 17:40
constructor (private counterService: CounterService) {
this.count$ = this.counterService.count$
}
count = model<number>(0)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Incorrect use of model signal for internal state

The model() function is used for count, but model() is specifically for two-way binding with parent components (input/output), not for internal component state. For internal state management, signal() should be used instead. This will cause the component to not work correctly as model() expects to be bound to a parent component property.

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