Purushottam Sinha created FLINK-40117:
-----------------------------------------
Summary: Web dashboard: extend Vitest smoke-test coverage to
remaining high-traffic views
Key: FLINK-40117
URL: https://issues.apache.org/jira/browse/FLINK-40117
Project: Flink
Issue Type: Technical Debt
Components: Runtime / Web Frontend
Reporter: Purushottam Sinha
Problem
FLINK-40035 (PR apache/flink#28610) introduced the Vitest test infra for
flink-runtime-web/web-dashboard — jsdom, the @angular/build:unit-test builder,
tsconfig.spec.json, and src/test-setup.ts with the ng-zorro/CDK stubs
(matchMedia, ResizeObserver, IntersectionObserver). That PR only added smoke
specs for 3 components: the Overview statistic cards, the Task Manager list,
and the Job Exceptions view. Every other page in the dashboard — including the
main job detail page with the DAG graph, checkpoints, timeline, and the
application views — still has zero automated coverage. Today the only guardrail
for those views during framework upgrades (Angular, ng-zorro, monaco-editor,
etc.) is eslint + a successful production build + manual click-through, which
is exactly the gap FLINK-40035 was opened to close. Since the infra now exists,
extending coverage is low-effort per view and meaningfully reduces regression
risk on the next Angular/dependency bump.
Evidence
- Specs that exist today: src/app/pages/overview/statistic/*.spec.ts,
src/app/pages/task-manager/list/*.spec.ts,
src/app/pages/job/exceptions/*.spec.ts
- No *.spec.ts files exist under: job/overview (job detail + DAG graph),
job/checkpoints, job/timeline, job/dataskew, job/rescales, job/configuration,
task-manager/metrics, task-manager/logs, application/overview,
application/exceptions, job-manager/metrics, submit (job submission page)
- ci-check already runs test:ci as part of the Maven frontend build
(FLINK-40035), so any new spec here is automatically wired into CI with no
additional plumbing
Proposed fix
- Add smoke-level specs (component renders, key data bindings populate,
primary interaction like a tab switch or row click doesn't throw) for the
un-tested views listed above
- Prioritize by traffic/risk: job/overview (DAG graph rendering is the most
fragile part of past Angular upgrades) and job/checkpoints first, then
job/timeline and the application/* views, then the remaining
task-manager/job-manager sub-pages
- Follow the existing mocking pattern (TestBed.configureTestingModule with
stubbed services via useValue, vi.fn() for router/service calls) established in
the FLINK-40035 specs
- Where a view depends on lazy ng-zorro tab rendering, prefer testing the
component method directly (e.g. navigateTo(...)) over clicking through the DOM,
per the review feedback already applied on FLINK-40035
Acceptance
- npm run test:ci includes at least one passing smoke spec for each of the
prioritized views
- No increase in flakiness or runtime that would threaten ci-check's gating
of the Maven build
- New specs follow the same file-colocation and naming convention as the
existing *.component.spec.ts files
--
This message was sent by Atlassian Jira
(v8.20.10#820010)