Unify retained operation history in Activity
This commit is contained in:
@@ -10,6 +10,13 @@ describe('navigation context', () => {
|
||||
expect(returnLabel('/collections?view=history&launches=30')).toBe('Back to launch history');
|
||||
});
|
||||
|
||||
it('retains Activity filters and a selected result when opening a detail', () => {
|
||||
const source = '/activity?source=maintenance&state=failed&offset=25#operation-12';
|
||||
const target = new URL(contextHref('/provisioning/12', source), 'http://localhost');
|
||||
expect(safeReturnHref(target.searchParams.get('returnTo'), '/')).toBe(source);
|
||||
expect(returnLabel(source)).toBe('Back to Activity');
|
||||
});
|
||||
|
||||
it('preserves the selected diagnostic tab on both sides of a contextual link', () => {
|
||||
const url = new URL(contextHref('/servers/t5_zombie_theater_1?tab=logs&log=console', '/maintenance/incident?returnTo=%2Fmaintenance%3Fview%3Dactivity'), 'http://localhost');
|
||||
expect(url.searchParams.get('tab')).toBe('logs');
|
||||
|
||||
Reference in New Issue
Block a user