Unify UI workflows and streamline fleet management

This commit is contained in:
2026-09-18 14:00:28 -04:00
parent 9cf0bd87f4
commit f54cac8c50
63 changed files with 1706 additions and 1286 deletions
+17
View File
@@ -0,0 +1,17 @@
import { describe, expect, it } from 'vitest';
import { serverIdentity } from '../../src/lib/ui/server-labels.js';
import { statusPresentation } from '../../src/lib/ui/status.js';
describe('operator-facing identities and states', () => {
it('preserves lobby numbers and distinguishes T6 variants sharing an engine map', () => {
expect(serverIdentity('t6_zombie_town_12')).toEqual({ map:'Town Survival', lobby:12, game:'Black Ops II' });
expect(serverIdentity('t6_zombie_towngrief_2')).toEqual({ map:'Town Grief', lobby:2, game:'Black Ops II' });
expect(serverIdentity('custom-server')).toEqual({ map:'custom-server', lobby:null, game:'' });
});
it('keeps normal waiting neutral and distinguishes test success from promotion', () => {
expect(statusPresentation('awaiting-empty').tone).toBe('neutral');
expect(statusPresentation('failed').tone).toBe('danger');
expect(statusPresentation('tested').label).toBe('Test passed');
expect(statusPresentation('promoted').label).toBe('Promoted');
});
});