[ 
https://issues.apache.org/jira/browse/FLINK-40035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18093218#comment-18093218
 ] 

Purushottam Sinha edited comment on FLINK-40035 at 7/2/26 11:20 AM:
--------------------------------------------------------------------

Going with **Vitest** for the test framework instead of Karma, Jest, or Web 
Test Runner.

The issue predates Angular 21: Karma is now deprecated, and **Vitest is Angular 
21's default unit test runner** via `@angular/build:unit-test`, making it the 
framework most closely aligned with Angular's current build tooling and future 
direction.

Why Vitest here:

* Runs in `jsdom` by default, so it fits `flink-runtime-web`'s browserless npm 
CI without requiring additional browser infrastructure.
* Aligns with Angular's roadmap and should remain well-supported through future 
Angular and ng-zorro upgrades, whereas Karma is effectively EOL.
* Provides a real-browser escape hatch via **Vitest Browser Mode** (backed by 
Playwright) for any ng-zorro components that require browser-specific behavior, 
while keeping the same test framework and test APIs.

Scope of this JIRA:

* Wire up the Vitest test target and required ng-zorro/jsdom mocks.
* Integrate `npm run test` into CI.
* Add smoke-level component specs for the initial high-traffic views 
(`Overview`, `Job List`, and `Exceptions`) covering rendering and basic 
interactions.



was (Author: JIRAUSER310845):
  Going with *Vitest* for the test framework rather than 
Karma/Jest/web-test-runner.                                                     
                                                                        
                                                                                
                                                                                
                                                 
  The issue predates Angular 21: Karma is now deprecated, and *Vitest is 
Angular 21's                                                                    
                                                        
  official default runner* ({{@angular/build:unit-test}}), i.e. the "framework 
supported                                                                       
                                                  
  by Angular's build tools" the description asks for.                           
                                                                                
                                                 
                                                                                
                                                                                
                                                 
  Why Vitest here:                                                              
                                                                                
                                                 
  * Runs in jsdom, so it fits flink-runtime-web's browserless npm CI with no 
new infra                                                                       
                                                    
  (Karma/web-test-runner would need a browser in the image).                    
                                                                                
                                                 
  * On Angular's roadmap, so it stays maintained through future 
Angular/ng-zorro upgrades                                                       
                                                                 
  (Karma is EOL).                                                               
                                                                                
                                                 
  * jsdom by default, with a real-browser escape hatch (Vitest browser mode via 
Playwright)                                                                     
                                                 
  for any ng-zorro view that needs it — same specs, no framework switch.        
                                                                                
                                                 
                                                                                
                                                                                
                                                 
  Scope: wire the Vitest test target + ng-zorro jsdom mocks, hook {{npm run 
test}} into CI,                                                                 
                                                     
  and add smoke specs for the first high-traffic views (Overview, Job List, 
Exceptions). 

> Add smoke-level component specs for the web-dashboard
> -----------------------------------------------------
>
>                 Key: FLINK-40035
>                 URL: https://issues.apache.org/jira/browse/FLINK-40035
>             Project: Flink
>          Issue Type: Technical Debt
>          Components: Runtime / Web Frontend
>            Reporter: Martijn Visser
>            Priority: Major
>
> The web-dashboard ships no *.spec.ts files, so the only safety net for 
> framework upgrades (e.g. the Angular 21 bump in FLINK-40028) is the lint + 
> production-build gate plus manual click-through. Add smoke-level component 
> specs (render + basic interaction) for the high-traffic, ng-zorro-heavy views 
> so future Angular/ng-zorro bumps catch runtime regressions in CI. Requires 
> wiring a test target (karma/jest, or the web-test-runner the new Angular 
> builders support).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to