Skip to content

test(frontend): cover isSink and isPythonUdf helpers#6675

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

test(frontend): cover isSink and isPythonUdf helpers#6675
Ma77Ball wants to merge 7 commits into
apache:mainfrom
Ma77Ball:test/workflow-graph-helpers-spec

Conversation

@Ma77Ball

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

  • Add unit tests for the isSink helper covering substring matching, case-insensitivity, and non-matches.
  • Add unit tests for the isPythonUdf helper covering each of the three Python UDF operator types and non-matches.

Any related issues, documentation, discussions?

Closes: #6674

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/model/workflow-graph.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

This PR adds frontend unit test coverage for two helper functions (isSink and isPythonUdf) in the workflow graph model, improving confidence in operator-type classification behavior used by the workflow editor.

Changes:

  • Added unit tests for isSink covering substring matching, case-insensitivity, and non-matching operator types.
  • Added unit tests for isPythonUdf covering all supported Python UDF v2 operator types plus negative cases.
  • Updated imports in workflow-graph.spec.ts to reference the helper functions and related operator-type constants.

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

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aglinxinyuan

Copy link
Copy Markdown
Contributor

Merged main to trigger coverage report.

@codecov-commenter

codecov-commenter commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.65%. Comparing base (429be11) to head (cd47f5c).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6675      +/-   ##
============================================
- Coverage     77.31%   76.65%   -0.66%     
+ Complexity     3524     3452      -72     
============================================
  Files          1161     1161              
  Lines         45920    45916       -4     
  Branches       5099     5098       -1     
============================================
- Hits          35501    35198     -303     
- Misses         8839     9183     +344     
+ Partials       1580     1535      -45     
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø) Carriedforward from e2e4418
agent-service 76.76% <ø> (ø) Carriedforward from e2e4418
amber 67.33% <ø> (-1.77%) ⬇️ Carriedforward from e2e4418
computing-unit-managing-service 20.49% <ø> (ø) Carriedforward from e2e4418
config-service 66.66% <ø> (ø) Carriedforward from e2e4418
file-service 67.21% <ø> (ø) Carriedforward from e2e4418
frontend 82.57% <100.00%> (-0.01%) ⬇️
notebook-migration-service 78.94% <ø> (ø) Carriedforward from e2e4418
pyamber 92.15% <ø> (ø) Carriedforward from e2e4418
workflow-compiling-service 55.14% <ø> (ø) Carriedforward from e2e4418

*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.

@aglinxinyuan

Copy link
Copy Markdown
Contributor

Closing as it doesn't increase coverage: #6675 (comment)

@aglinxinyuan

Copy link
Copy Markdown
Contributor

Will reevaluate after fixing the Codecov Report.

@aglinxinyuan aglinxinyuan reopened this Jul 23, 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.

Add unit test coverage for isSink and isPythonUdf

4 participants