fix: resolve 6 E2E failures — cluster URL prefix + settings registration (#51)
Two root causes for the remaining 6 E2E failures after PR #50: 1. AppBarScoreBadge: Router.createRouteURL('polaris') was called without the cluster parameter, producing '/polaris' instead of '/c/main/polaris'. Now uses K8s.useCluster() to pass the active cluster. (appbar.spec.ts:18) 2. Plugin settings: registerPluginSettings was called with 'polaris' but the package.json name is 'headlamp-polaris'. Headlamp matches settings registrations to the package name, so the component never rendered. (settings.spec.ts — all 5 tests) Co-authored-by: gandalf-the-greybeard[bot] <gandalf-the-greybeard[bot]@users.noreply.github.com> Co-authored-by: Paperclip <noreply@paperclip.ing>
This commit was merged in pull request #51.
This commit is contained in:
committed by
GitHub
parent
fb3d262eb7
commit
40b0a2d220
@@ -7,8 +7,12 @@ import { makeAuditData, makeResult } from '../test-utils';
|
||||
// Mock Headlamp lib
|
||||
vi.mock('@kinvolk/headlamp-plugin/lib', () => ({
|
||||
ApiProxy: { request: vi.fn() },
|
||||
K8s: {
|
||||
useCluster: () => 'test-cluster',
|
||||
},
|
||||
Router: {
|
||||
createRouteURL: (name: string) => `/c/test-cluster/${name}`,
|
||||
createRouteURL: (name: string, params?: { cluster?: string }) =>
|
||||
`/c/${params?.cluster ?? 'default'}/${name}`,
|
||||
},
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user