Skip to content

🐛 Fix 25 ClusterHealth/ClusterDetailModal test failures#13754

Merged
kubestellar-hive[bot] merged 1 commit into
mainfrom
fix/13749
May 15, 2026
Merged

🐛 Fix 25 ClusterHealth/ClusterDetailModal test failures#13754
kubestellar-hive[bot] merged 1 commit into
mainfrom
fix/13749

Conversation

@kubestellar-hive
Copy link
Copy Markdown
Contributor

Fixes #13749

25 tests in ClusterHealth and ClusterDetailModal were failing after PR #13747 deduplicated getConsoleUrl. This PR fixes the test failures.

Root Cause

PR #13747 moved getConsoleUrl into CloudProviderIcon.tsx and updated both ClusterHealth.tsx and ClusterDetailModal.tsx to import it from there. However, the vi.mock('../../ui/CloudProviderIcon', ...) stubs in both test files were not updated to include getConsoleUrl in the mock object. The mocked module returned undefined for getConsoleUrl, causing the components to crash during tests.

Fix

Added getConsoleUrl: () => null to the CloudProviderIcon mock in:

  • src/components/cards/__tests__/ClusterHealth.test.tsx
  • src/components/clusters/__tests__/ClusterDetailModal.test.tsx
…oleUrl dedup

After PR #13747 moved getConsoleUrl into CloudProviderIcon and updated both
ClusterHealth.tsx and ClusterDetailModal.tsx to import it from there, the
vi.mock() stubs for CloudProviderIcon in the two test files were missing the
getConsoleUrl export. This caused the mocked module to return undefined for
getConsoleUrl, crashing the components under test.

Fix: add getConsoleUrl: () => null to both mocks so the import resolves
correctly during tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: kubestellar-hive <hive-bot@kubestellar.io>
Copilot AI review requested due to automatic review settings May 15, 2026 04:23
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label May 15, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@kubestellar-prow
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mikespreitzer for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify
Copy link
Copy Markdown

netlify Bot commented May 15, 2026

Deploy Preview for kubestellarconsole failed. Why did it fail? →

Name Link
🔨 Latest commit d63b304
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6a069fc68e7e200008d6a385
@github-actions
Copy link
Copy Markdown
Contributor

👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@github-actions github-actions Bot added the ai-generated Pull request generated by AI label May 15, 2026
@kubestellar-prow kubestellar-prow Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor

✅ Test Coverage Check

All new source files in this PR have corresponding test files.

Checked web/src/hooks/ and web/src/components/ against origin/main.

@kubestellar-hive kubestellar-hive Bot merged commit 68063e1 into main May 15, 2026
33 of 39 checks passed
@kubestellar-prow kubestellar-prow Bot deleted the fix/13749 branch May 15, 2026 04:52
@github-actions
Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

@github-actions
Copy link
Copy Markdown
Contributor

Post-merge build verification passed

Both Go and frontend builds compiled successfully against merge commit 68063e19cf9e6e20c9166b0a7c82f2872f588548.

@github-actions
Copy link
Copy Markdown
Contributor

✅ Post-Merge Verification: passed

Commit: 68063e19cf9e6e20c9166b0a7c82f2872f588548
Specs run: Clusters.spec.ts Dashboard.spec.ts smoke.spec.ts
Report: https://github.com/kubestellar/console/actions/runs/25900951113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated Pull request generated by AI copilot dco-signoff: yes Indicates the PR's author has signed the DCO. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. tier/1-lightweight

1 participant