Skip to content

test(frontend): add spec for VisualizationFrameContentComponent#5585

Open
EmilySun621 wants to merge 1 commit into
apache:mainfrom
EmilySun621:test/visualization-frame-content
Open

test(frontend): add spec for VisualizationFrameContentComponent#5585
EmilySun621 wants to merge 1 commit into
apache:mainfrom
EmilySun621:test/visualization-frame-content

Conversation

@EmilySun621

Copy link
Copy Markdown

What changes were proposed in this PR?

Adds a behavior-focused unit test spec for VisualizationFrameContentComponent. Tests cover:

  • drawChart() guard clauses (no-op when data is missing)
  • Render path through DomSanitizer to iframe srcdoc
  • auditTime-throttled subscription (tested with fakeAsync/tick)

Any related issues, documentation, discussions?

Related to #5167

How was this PR tested?

Spec verified with npx ng test --watch=false --include='**/visualization-frame-content.component.spec.ts'. 7 tests passing.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Anthropic)

Covers drawChart() guard clauses (no-op when operatorId is undefined, when
the result service is missing, or when the snapshot is empty), the rendering
path (renders the latest entry's html-content through DomSanitizer into the
iframe srcdoc), and the auditTime-throttled result-update subscription
(redraws after UPDATE_INTERVAL_MS for matching ids, ignores other ids and
undefined operatorId).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the frontend Changes related to the frontend GUI label Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant