dotCMS / dotCMS/core

block-editor: 17 test suites fail on main with Angular 22 standalone/declarations error

Open
#37,421 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Team : Modernization
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Not caused by any current work — reproduced on unmodified main.

nx test block-editor fails with 17 suites / 37 tests, all with:

Unexpected "TestComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call,
"TestComponent" is marked as standalone and can't be declared in any NgModule

Angular 22 makes components standalone by default, so specs that declare a local TestComponent in declarations: now fail. The affected specs date to 2024 and have not been migrated.

Repro: cd core-web && npx nx test block-editor

This surfaces on any PR that touches a global file (tsconfig.base.json, nx.json), because nx affected then pulls block-editor in and the failures look like they belong to that PR.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

From core-web, run npx nx test block-editor and use the 17 failing suites in the output as the work list. Read each failing spec's TestBed.configureTestingModule setup and migrate the local TestComponent declarations for Angular 22 standalone behavior; done when all 17 suites and 37 tests pass on unmodified main.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.