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

@EmilySun621 EmilySun621 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

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 #5601

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
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.25%. Comparing base (564ccdb) to head (9afbef9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5585      +/-   ##
============================================
+ Coverage     52.17%   52.25%   +0.07%     
  Complexity     2482     2482              
============================================
  Files          1068     1068              
  Lines         41311    41311              
  Branches       4439     4439              
============================================
+ Hits          21556    21588      +32     
+ Misses        18490    18455      -35     
- Partials       1265     1268       +3     
Flag Coverage Δ *Carryforward flag
access-control-service 64.61% <ø> (ø) Carriedforward from 564ccdb
agent-service 33.76% <ø> (ø) Carriedforward from 564ccdb
amber 53.28% <ø> (ø) Carriedforward from 564ccdb
computing-unit-managing-service 1.65% <ø> (ø) Carriedforward from 564ccdb
config-service 56.06% <ø> (ø) Carriedforward from 564ccdb
file-service 38.32% <ø> (ø) Carriedforward from 564ccdb
frontend 46.61% <ø> (+0.18%) ⬆️
pyamber 90.72% <ø> (ø) Carriedforward from 564ccdb
python 90.75% <ø> (ø) Carriedforward from 564ccdb
workflow-compiling-service 58.69% <ø> (ø) Carriedforward from 564ccdb

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xuang7 xuang7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Overall, it looks good to me. I'm not fully sure why this PR is linked to #5167, since I don't see related context there. Could you please open a separate issue for this PR?

@EmilySun621

Copy link
Copy Markdown
Contributor Author

@xuang7
Thanks for the review! You're right. I'll open a separate issue for it now and link it here.

Thanks for the PR. Overall, it looks good to me. I'm not fully sure why this PR is linked to #5167, since I don't see related context there. Could you please open a separate issue for this PR?

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.

3 participants