Scopes: Change redirectUrl to redirectPath (#112783)

* Scopes: change redirectUrl to redirectPath

* Update e2e helpers
This commit is contained in:
Tobias Skarhed
2025-10-22 11:21:14 +02:00
committed by GitHub
parent 9b72973293
commit 2bbba880cd
8 changed files with 21 additions and 19 deletions
+3 -3
View File
@@ -19,7 +19,7 @@ export type TestScope = {
type?: string;
category?: string;
addLinks?: boolean;
redirectUrl?: string;
redirectPath?: string;
};
type ScopeDashboardBinding = Resource<ScopeDashboardBindingSpec, ScopeDashboardBindingStatus, 'ScopeDashboardBinding'>;
@@ -56,8 +56,8 @@ export async function scopeNodeChildrenRequest(
linkType: 'scope',
linkId: `scope-${scope.name}`,
}),
...(scope.redirectUrl && {
redirectUrl: scope.redirectUrl,
...(scope.redirectPath && {
redirectPath: scope.redirectPath,
}),
},
})),
+2 -2
View File
@@ -111,14 +111,14 @@ export const testScopesWithRedirect = (): TestScope[] => {
{
name: 'sn-redirect-custom',
title: 'Custom Redirect',
redirectUrl: '/d/cuj-dashboard-2', // Use existing dashboard
redirectPath: '/d/cuj-dashboard-2', // Use existing dashboard
filters: [{ key: 'namespace', operator: 'equals', value: 'custom-redirect' }],
addLinks: true,
},
{
name: 'sn-redirect-fallback',
title: 'Fallback Navigation',
// No redirectUrl - should fall back to scope navigation
// No redirectPath - should fall back to scope navigation
filters: [{ key: 'namespace', operator: 'equals', value: 'fallback-nav' }],
dashboardUid: 'cuj-dashboard-2', // Use existing dashboard
dashboardTitle: 'CUJ Dashboard 2',