Unify retained operation history in Activity

This commit is contained in:
2026-10-07 19:30:38 -04:00
parent c39563daef
commit 05bdeaf624
35 changed files with 1008 additions and 120 deletions
+7
View File
@@ -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');