feat: alive UI wave, galaxy presence, spread and fleet enhancements
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Dashboard ambient layer, comrade presence, Mission Deck and War Room, Emberwake supply chain, spread/docs publishing, fleet policy and modules API, CI docker mining, and refreshed USB pack.
This commit is contained in:
45
server/web/src/help/pageWeather.test.ts
Normal file
45
server/web/src/help/pageWeather.test.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { resolvePageWeather, PAGE_WEATHER, DEFAULT_PAGE_WEATHER } from './pageWeather';
|
||||
|
||||
describe('pageWeather', () => {
|
||||
it('resolves forge and mission deck to full glow', () => {
|
||||
expect(resolvePageWeather('/forge').vibe).toBe('forge-glow');
|
||||
expect(resolvePageWeather('/forge').intensity).toBe(1);
|
||||
expect(resolvePageWeather('/mission-deck').vibe).toBe('forge-glow');
|
||||
});
|
||||
|
||||
it('resolves crucible to slower embers', () => {
|
||||
const w = resolvePageWeather('/crucible');
|
||||
expect(w.vibe).toBe('crucible-embers');
|
||||
expect(w.speed).toBeLessThan(0.5);
|
||||
expect(w.palette).toBe('crucible');
|
||||
});
|
||||
|
||||
it('resolves emberwake with campaign pulse', () => {
|
||||
const w = resolvePageWeather('/emberwake');
|
||||
expect(w.vibe).toBe('emberwake-pulse');
|
||||
expect(w.energyPulse).toBe(true);
|
||||
expect(w.palette).toBe('campaign');
|
||||
});
|
||||
|
||||
it('resolves settings to dim starfield', () => {
|
||||
const w = resolvePageWeather('/settings');
|
||||
expect(w.vibe).toBe('starfield-dim');
|
||||
expect(w.intensity).toBeLessThan(0.3);
|
||||
expect(w.palette).toBe('dim');
|
||||
});
|
||||
|
||||
it('resolves fleet and dashboard to medium drift', () => {
|
||||
expect(resolvePageWeather('/agents').vibe).toBe('medium-drift');
|
||||
expect(resolvePageWeather('/dashboard').vibe).toBe('medium-drift');
|
||||
});
|
||||
|
||||
it('strips trailing slash and query', () => {
|
||||
expect(resolvePageWeather('/crucible/')).toEqual(PAGE_WEATHER['/crucible']);
|
||||
expect(resolvePageWeather('/dashboard?tab=fleet')).toEqual(PAGE_WEATHER['/dashboard']);
|
||||
});
|
||||
|
||||
it('falls back to default for unknown routes', () => {
|
||||
expect(resolvePageWeather('/unknown')).toEqual(DEFAULT_PAGE_WEATHER);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user