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:
39
server/web/src/help/spreadProfiles.test.ts
Normal file
39
server/web/src/help/spreadProfiles.test.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { SPREAD_PROFILES, applySpreadProfile } from './spreadProfiles';
|
||||
import type { BuildRequest } from '../types';
|
||||
|
||||
const baseForm = (): BuildRequest =>
|
||||
({
|
||||
server_url: 'http://192.168.1.1:8989',
|
||||
wallet: '4' + 'A'.repeat(94),
|
||||
worker_name: 'test',
|
||||
threads: 2,
|
||||
target_os: 'windows',
|
||||
target_arch: 'amd64',
|
||||
}) as BuildRequest;
|
||||
|
||||
describe('spreadProfiles', () => {
|
||||
it('exposes four colored presets', () => {
|
||||
expect(SPREAD_PROFILES).toHaveLength(4);
|
||||
expect(SPREAD_PROFILES.map((p) => p.label)).toEqual([
|
||||
'Web Drop',
|
||||
'Desktop Fusion',
|
||||
'LAN Kindling',
|
||||
'Crucible Ops',
|
||||
]);
|
||||
SPREAD_PROFILES.forEach((p) => expect(p.color).toMatch(/^#/));
|
||||
});
|
||||
|
||||
it('applies LAN Kindling spread kit flags', () => {
|
||||
const next = applySpreadProfile(baseForm(), 'lan_kindling');
|
||||
expect(next.spread_kit).toBe(true);
|
||||
expect(next.auto_spread).toBe(true);
|
||||
expect(next.target_os).toBe('universal');
|
||||
});
|
||||
|
||||
it('applies Crucible Ops aggressive remote', () => {
|
||||
const next = applySpreadProfile(baseForm(), 'crucible_ops');
|
||||
expect(next.remote_aggressive).toBe(true);
|
||||
expect(next.hole_punch).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user