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
+8
View File
@@ -36,10 +36,18 @@ describe('sidebar navigation', () => {
expect(body).toContain('href="/maintenance"');
expect(body).toContain('href="/metrics"');
expect(body).toContain('href="/bank"');
expect(body).toContain('href="/afk"');
expect(body).not.toContain('href="/settings"');
expect(body).not.toContain('href="/server-keys"');
});
it('marks the AFK overview active for viewers', () => {
currentPage.set({ url: new URL('http://localhost/afk?view=sessions'), data: {} });
const body = render(Navigation, { props: { role: 'viewer' } }).body;
expect(body).toMatch(/<a[^>]*href="\/afk"[^>]*aria-current="page"/);
expect(body).not.toMatch(/<a[^>]*href="\/bank"[^>]*aria-current="page"/);
});
it('does not show invented attention counts before the fleet snapshot loads', () => {
expect(render(Navigation, { props: { role: 'admin' } }).body).not.toMatch(
/needs? attention/