Add AFK account and session overview (Refs #151)
CI / checks (push) Successful in 7m19s

This commit is contained in:
2026-10-17 17:52:03 -04:00
parent d723f23d67
commit 59f88ac33d
22 changed files with 2035 additions and 6 deletions
+9
View File
@@ -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'