Skip to content

Release: Angular 19 Upgrade & Test Suite Stabilization#171

Open
lordoliver wants to merge 206 commits intopazznetwork:masterfrom
lordoliver:fix/green-baseline-restore
Open

Release: Angular 19 Upgrade & Test Suite Stabilization#171
lordoliver wants to merge 206 commits intopazznetwork:masterfrom
lordoliver:fix/green-baseline-restore

Conversation

@lordoliver
Copy link
Member

Release: Angular 19 Upgrade & Test Suite Stabilization

Summary

This PR represents a major milestone for the project, delivering the Angular 19 / Nx 20 upgrade alongside a comprehensive stabilization of the E2E and Unit test suites.

It resolves long-standing flakiness in MUC (Multi-User Chat) tests, eliminates "zombie" processes and rooms, and introduces automated E2E testing into the CI pipeline.

All test suites (ngx-xmpp, ngx-chat-shared, xmpp-adapter, demo-e2e, ngx-chat-e2e-new) are now Passing Green ✅.


🚀 Upgrade Details

Angular 19 & Nx 20

  • Angular: 18.x -> 19.2.9.
  • Nx: 19.x -> 22.3.3.
  • TypeScript: ~5.6.2 (Strict compilation enabled).
  • Node.js: CI now runs on Node 22 (LTS).
  • Strictness: Fixed TS7053 (no implicit any) errors across strophe-ts, xmpp-adapter, and the demo app.

📦 Versioning

  • Unified Version: Root and all libraries are now synchronized to v1.19.0.
  • Dependencies: All libraries now explicitly require @angular/core@^19.0.0.

🤖 CI & Infrastructure Improvements

✅ Automated Testing in CI

We have enabled and integrated the following test suites into the GitHub Actions CI pipeline, ensuring they run automatically on every Pull Request:

  • demo-e2e: The legacy Playwright E2E suite is now fully active in CI (previously disabled/broken).
  • ngx-chat-e2e-new: The modern E2E suite is stabilized and enforcing regressions checks.
  • Unit Tests: All library unit tests are now running and passing in CI.

🛠 Pipeline Robustness

  • Cleanup: Added robust process termination to kill "zombie" Chrome/Node processes that previously hung the runner.
  • Logs: Removed excessive debug logging to prevent buffer overflows.
  • Budgets: Increased bundle size budgets for demo-new to match Angular 19 production builds.

🧪 Test Stabilization & Fixes

Multi-User Chat (MUC)

  • Zombie Room Fixes: Implemented robust cleanup using the Ejabberd Admin API to destroy rooms after tests, preventing state leakage between runs.
  • Race Conditions: Resolved timing issues in room joining (409 Conflict), leaving, and message history loading (MAM).
  • Optimization: Improved polling mechanisms and room discovery logic to prevent timeouts in CI.

E2E Fixes

  • demo-e2e: Verified 25/25 tests passing. Fixed selectors, timeouts, and server connectivity.
  • ngx-chat-e2e-new: Fixed flaky tests:
    • blocking.spec.ts: Fixed race conditions when asserting blocked messages.
    • message-status.spec.ts: Improved wait assertions for message receipts.
    • chatbox.spec.ts: Fixed rendering race conditions.

Unit Test Fixes

  • Node 20+ Compatibility: Fixed unread-message-count.service.spec.ts crash by migrating from setTimeout to Angular's fakeAsync/tick.
  • WebSocket: Configured insecure ws:// protocol correctly for test environments.

✅ Verification

  • Build: nx build ngx-chat / demo-new -> Success.
  • Unit Tests: nx test (All Libs) -> Success.
  • E2E Tests: nx e2e (All Apps) -> Success.

⚠️ Breaking Changes

  • Angular 19 IVY: Libraries are now built with Ivy for Angular 19. They are not backward compatible with Angular 18 or older.
  • Peer Dependencies: strictly require ^19.0.0.

oschiessl added 30 commits December 21, 2025 20:43
- Optimize ci.yml: remove duplicate lines, ensure correct caching
- Fix ejabberd.yml: disable TLS on 5280 to match test env proxy
- Fix proxy.conf.json: use http/127.0.0.1 for websocket proxy
- Fix E2E tests: update assertions (connected->online), use EjabberdAdminPage for user management, ensure proper test setup after reloads
- libs: Force message loading in ChatHistoryComponent on init to fix reload/state issues
- e2e: Update ChatWindowPage selectors to match auto-scroll DOM structure
- e2e: Improve infinite-scroll test robustness with ChatWindowPage and polling assertions
oschiessl added 30 commits January 14, 2026 22:23
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.

1 participant