spuru9 opened a new pull request, #29135:
URL: https://github.com/apache/flink/pull/29135
## What is the purpose of the change
FLINK-40117 added Vitest specs for most of the web dashboard views, but
`pages/application/overview` and `pages/application/exceptions` still had none.
Some of the added specs also only checked that the mocked data was loaded, not
what the component derived from it: the timeline spec didn't assert the
computed vertex and subtask ranges, the job overview spec never fed a plan into
`ngOnInit`, the cluster overview spec didn't assert the derived statistics, and
`TaskManagerService` only had tests for `loadManagers` and `loadManager`. The
`HumanizeDatePipe` test for format `'B'` relied on Angular throwing for missing
locale data, which an Angular upgrade could change.
This adds the two missing specs and tightens the existing ones so they fail
when the derived values change.
## Brief change log
- Added `application-overview.component.spec.ts` and
`application-exceptions.component.spec.ts`.
- Tightened `job-timeline.component.spec.ts` to assert the computed vertex
ranges (including the duration-derived end-time branch and filtering of
not-yet-started vertices) and the per-subtask timeline ranges, instead of just
checking counts/names.
- Tightened `job-overview.component.spec.ts` with a new spec that feeds an
actual plan into `ngOnInit` and asserts the derived
`pendingNodes`/`pendingLinks` and the resulting `dagreComponent.flush` call.
- Tightened `overview.component.spec.ts` (cluster overview) to assert the
exact derived cluster-statistics object instead of just checking for static
label text.
- Expanded `task-manager.service.spec.ts` from covering only
`loadManagers`/`loadManager` to covering all public methods.
- Replaced the `humanize-date.pipe.spec.ts` test that relied on Angular
throwing for format `'B'` with one driven by an unregistered locale, which is a
stable part of Angular's i18n contract rather than a version-dependent
implementation detail.
## Verifying this change
This change added tests and can be verified as follows:
- `npx ng test --watch=false` in `flink-runtime-web/web-dashboard`: 35
spec files / 158 tests pass (up from the prior baseline of 33 files / 139
tests).
- `npm run lint` and `npx prettier --check` are clean on all changed/added
files.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Generated-by: Claude Code (claude-sonnet-5)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]