Scopes: Change redirectUrl to redirectPath (#112783)
* Scopes: change redirectUrl to redirectPath * Update e2e helpers
This commit is contained in:
@@ -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,
|
||||
}),
|
||||
},
|
||||
})),
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user