Skip to content

test(orchestrator): add frontend hook and status coverage#3578

Open
rostalan wants to merge 2 commits into
redhat-developer:mainfrom
rostalan:rhidp-9857-frontend-test-coverage
Open

test(orchestrator): add frontend hook and status coverage#3578
rostalan wants to merge 2 commits into
redhat-developer:mainfrom
rostalan:rhidp-9857-frontend-test-coverage

Conversation

@rostalan

@rostalan rostalan commented Jun 25, 2026

Copy link
Copy Markdown

Add targeted frontend unit tests for orchestrator frontend plugin to increase coverage and catch issues earlier.
Harden the status indicator fallback for unknown states so the covered behavior matches runtime behavior.

Hey, I just made a Pull Request!

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

Add targeted frontend tests for orchestrator hooks and status components so config and status regressions are caught earlier.

Harden the status indicator fallback for unknown states so the covered behavior matches runtime behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
@rhdh-gh-app

rhdh-gh-app Bot commented Jun 25, 2026

Copy link
Copy Markdown

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-orchestrator workspaces/orchestrator/plugins/orchestrator patch v5.8.1

Use real orchestrator basic permissions in the permission-array hook test so the fixture matches the hook contract, and add the required changeset for the plugin package.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.30%. Comparing base (381f36a) to head (3ee64c1).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3578      +/-   ##
==========================================
+ Coverage   54.19%   54.30%   +0.11%     
==========================================
  Files        2303     2303              
  Lines       88305    88340      +35     
  Branches    24590    24623      +33     
==========================================
+ Hits        47858    47977     +119     
+ Misses      40238    40151      -87     
- Partials      209      212       +3     
Flag Coverage Δ *Carryforward flag
adoption-insights 83.70% <ø> (ø) Carriedforward from 381f36a
ai-integrations 67.95% <ø> (ø) Carriedforward from 381f36a
app-defaults 69.79% <ø> (ø) Carriedforward from 381f36a
augment 46.39% <ø> (ø) Carriedforward from 381f36a
boost 74.05% <ø> (ø) Carriedforward from 381f36a
bulk-import 72.46% <ø> (ø) Carriedforward from 381f36a
cost-management 14.10% <ø> (ø) Carriedforward from 381f36a
dcm 61.79% <ø> (ø) Carriedforward from 381f36a
extensions 61.53% <ø> (ø) Carriedforward from 381f36a
global-floating-action-button 71.18% <ø> (ø) Carriedforward from 381f36a
global-header 59.71% <ø> (ø) Carriedforward from 381f36a
homepage 49.84% <ø> (ø) Carriedforward from 381f36a
install-dynamic-plugins 56.77% <ø> (ø) Carriedforward from 381f36a
konflux 91.49% <ø> (ø) Carriedforward from 381f36a
lightspeed 68.55% <ø> (ø) Carriedforward from 381f36a
mcp-integrations 85.46% <ø> (ø) Carriedforward from 381f36a
orchestrator 39.98% <ø> (+1.68%) ⬆️
quickstart 63.76% <ø> (ø) Carriedforward from 381f36a
sandbox 79.56% <ø> (ø) Carriedforward from 381f36a
scorecard 83.96% <ø> (ø) Carriedforward from 381f36a
theme 61.26% <ø> (ø) Carriedforward from 381f36a
translations 7.25% <ø> (ø) Carriedforward from 381f36a
x2a 78.68% <ø> (ø) Carriedforward from 381f36a

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


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 381f36a...3ee64c1. Read the comment docs.

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

@rostalan

Copy link
Copy Markdown
Author

/fs review

@rostalan

Copy link
Copy Markdown
Author

/fs-review

@fullsend-ai-review

fullsend-ai-review Bot commented Jun 25, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 2:15 PM UTC · Completed 2:25 PM UTC
Commit: 381f36a · View workflow run →

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Low

  • [edge-case] workspaces/orchestrator/plugins/orchestrator/src/components/ui/WorkflowInstanceStatusIndicator.tsx:75 — The production change from icon = VALUE_UNAVAILABLE; break; to return <>{VALUE_UNAVAILABLE}</> is a correct fix for a latent crash. In the old code, when an unknown status reached the default case, title remained '' and the subsequent call to capitalize('') would throw a runtime error because text[0] is undefined. The early return properly avoids this crash path and renders a cleaner fallback for unknown statuses.

Labels: PR is primarily adding unit test coverage for existing hooks and components.

@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge Tests labels Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge All reviewers approved — ready to merge Tests workspace/orchestrator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant