This commit is contained in:
@@ -8,6 +8,15 @@ describe('navigation context', () => {
|
||||
expect(safeReturnHref(target.searchParams.get('returnTo'), '/')).toBe(source);
|
||||
expect(returnLabel(source)).toBe('Back to Bank');
|
||||
});
|
||||
it('restores AFK history filters and pagination after opening a player or match', () => {
|
||||
const source =
|
||||
'/afk?view=sessions&game=t6&server=town&state=unresolved&from=2026-10-01&offset=25';
|
||||
for (const destination of ['/leaderboard/players/00042', '/matches/17']) {
|
||||
const target = new URL(contextHref(destination, source), 'http://localhost');
|
||||
expect(safeReturnHref(target.searchParams.get('returnTo'), '/')).toBe(source);
|
||||
expect(returnLabel(source)).toBe('Back to AFK');
|
||||
}
|
||||
});
|
||||
it('retains nested origins, list scope, loaded results and anchors', () => {
|
||||
const source = new URL(
|
||||
'http://localhost/leaderboard/players/42?game=t5&offset=25&returnTo=%2Fleaderboard%3Fq%3DAce#history-title'
|
||||
|
||||
Reference in New Issue
Block a user