Scopes: Redirect to redirectUrl on selection (#112721)
* Add redirectUrl frontend functionality * Add test * Add e2e test suite * Fix linting
This commit is contained in:
@@ -105,3 +105,24 @@ export const testScopes = (scopeBindingSetting?: { uid: string; title: string })
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
export const testScopesWithRedirect = (): TestScope[] => {
|
||||
return [
|
||||
{
|
||||
name: 'sn-redirect-custom',
|
||||
title: 'Custom Redirect',
|
||||
redirectUrl: '/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
|
||||
filters: [{ key: 'namespace', operator: 'equals', value: 'fallback-nav' }],
|
||||
dashboardUid: 'cuj-dashboard-2', // Use existing dashboard
|
||||
dashboardTitle: 'CUJ Dashboard 2',
|
||||
addLinks: true,
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user