You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Purushottam Sinha (Jira)" <ji...@apache.org> on 2026/07/10 14:59:00 UTC
[jira] [Updated] (FLINK-40117) Web dashboard: extend Vitest smoke-test coverage to remaining high-traffic views
[ https://issues.apache.org/jira/browse/FLINK-40117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Purushottam Sinha updated FLINK-40117:
--------------------------------------
Description:
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 still has zero automated coverage and relies on manual click-through during framework upgrades.
Evidence
- Specs exist only for: overview/statistic, task-manager/list, job/exceptions
- 11 sibling views have no *.spec.ts: job/overview, job/checkpoints, job/timeline, job/dataskew, job/rescales, job/configuration, task-manager/metrics, task-manager/logs, application/overview,
application/exceptions, job-manager/metrics
- ci-check already runs test:ci in the Maven build, so a new spec needs no extra CI wiring
Proposed fix
- Add one smoke spec per view above: component renders, key bindings populate from a mocked service response
- Order: job/overview (DAG graph) and job/checkpoints first, then job/timeline + application/*, then the remaining task-manager/job-manager sub-pages
- Reuse the TestBed.configureTestingModule + useValue + vi.fn() mocking pattern from the 3 existing specs
- For lazy ng-zorro tabs, call the component method directly (e.g. navigateTo(...)) instead of clicking through the DOM, per FLINK-40035's review fix
Acceptance
- npm run test:ci gains one passing spec per prioritized view, starting with job/overview and job/checkpoints
- Suite runtime stays low enough not to threaten ci-check's gate on the Maven build
- New specs are colocated and named *.component.spec.ts, matching FLINK-40035
was:
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
> 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
> Priority: Minor
>
> 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 still has zero automated coverage and relies on manual click-through during framework upgrades.
>
> Evidence
> - Specs exist only for: overview/statistic, task-manager/list, job/exceptions
> - 11 sibling views have no *.spec.ts: job/overview, job/checkpoints, job/timeline, job/dataskew, job/rescales, job/configuration, task-manager/metrics, task-manager/logs, application/overview,
> application/exceptions, job-manager/metrics
> - ci-check already runs test:ci in the Maven build, so a new spec needs no extra CI wiring
>
> Proposed fix
> - Add one smoke spec per view above: component renders, key bindings populate from a mocked service response
> - Order: job/overview (DAG graph) and job/checkpoints first, then job/timeline + application/*, then the remaining task-manager/job-manager sub-pages
> - Reuse the TestBed.configureTestingModule + useValue + vi.fn() mocking pattern from the 3 existing specs
> - For lazy ng-zorro tabs, call the component method directly (e.g. navigateTo(...)) instead of clicking through the DOM, per FLINK-40035's review fix
>
> Acceptance
> - npm run test:ci gains one passing spec per prioritized view, starting with job/overview and job/checkpoints
> - Suite runtime stays low enough not to threaten ci-check's gate on the Maven build
> - New specs are colocated and named *.component.spec.ts, matching FLINK-40035
--
This message was sent by Atlassian Jira
(v8.20.10#820010)