Skip to content

test(frontend): cover WorkflowUtilService untested helpers#6689

Open
Ma77Ball wants to merge 2 commits into
apache:mainfrom
Ma77Ball:test/workflow-util-helpers-spec
Open

test(frontend): cover WorkflowUtilService untested helpers#6689
Ma77Ball wants to merge 2 commits into
apache:mainfrom
Ma77Ball:test/workflow-util-helpers-spec

Conversation

@Ma77Ball

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

  • Add unit tests for updateOperatorVersion covering port rebuild, port preservation, and the unknown-type error.
  • Add unit tests for the static parseWorkflowInfo string parsing and object passthrough, and for getNewCommentBox default position and unique ids.

Any related issues, documentation, discussions?

Closes: #6688

How was this PR tested?

  • Run: cd frontend && node --max-old-space-size=8192 ./node_modules/nx/dist/bin/nx.js test gui --watch=false --include=src/app/workspace/service/workflow-graph/util/workflow-util.service.spec.ts, expect the suite passing.
  • Test-only change; no production code is modified.

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

Co-authored with Claude Opus 4.8 in compliance with ASF

@github-actions github-actions Bot added the frontend Changes related to the frontend GUI label Jul 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @aglinxinyuan
    You can notify them by mentioning @aglinxinyuan in a comment.

Copilot AI 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.

Pull request overview

Adds missing frontend unit test coverage for WorkflowUtilService helper methods, improving confidence in workflow graph utility behavior without changing production code.

Changes:

  • Add unit tests for updateOperatorVersion covering port regeneration, port preservation, and unknown-operator error handling.
  • Add unit tests for WorkflowUtilService.parseWorkflowInfo for JSON string parsing vs. object passthrough.
  • Add unit tests for getNewCommentBox default position and unique ID generation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

Add unit test coverage for WorkflowUtilService helpers

2 participants