Standardize UI typography, charts and empty states

This commit is contained in:
2026-10-07 19:40:02 -04:00
parent 05bdeaf624
commit 0ed3cd6b47
57 changed files with 417 additions and 382 deletions
+12
View File
@@ -35,6 +35,18 @@ async function setup() {
}
describe('fleet event refreshes', () => {
it('hydrates and refreshes the all-host attention count without an additional request', async () => {
const store = await import('../../src/lib/ui/stores/fleet.js');
const integrations = { rcon: true, rconTimeoutMs: 2000, defaultRconHost: '' };
store.hydrateFleet({ servers: [], operations: [], integrations, serverNow: Date.now(), hostAttention: 2 });
expect(get(store.fleet).hostAttention).toBe(2);
vi.mocked(fetch).mockImplementation(async url => Response.json(String(url) === '/api/servers'
? { serverNow: Date.now(), servers: [], integrations, hostAttention: 0 } : { operations: [] }));
await store.refreshFleet();
expect(get(store.fleet).hostAttention).toBe(0);
expect(fetch).toHaveBeenCalledTimes(2);
expect(vi.mocked(fetch).mock.calls.map(([url]) => url).sort()).toEqual(['/api/fleet', '/api/servers']);
});
it('refreshes server history through one scoped request without replacing the fleet snapshot', async () => {
const store = await import('../../src/lib/ui/stores/fleet.js');
const integrations = { rcon: true, rconTimeoutMs: 2000, defaultRconHost: '' };