Files
NODEDC_MISSION_CORE/apps/control-station/test/planningLiveHeightSlice.test.mjs
T
DCCONSTRUCTIONS 7878937691 feat(viewer): unify spatial clipping, planning and observation surfaces
Share spatial clipping and height slices across live planning and recorded observations. Refine scene navigation, report serialization and viewer presentation.
2026-10-29 09:10:01 +03:00

18 lines
1.0 KiB
JavaScript

import assert from 'node:assert/strict';
import {test} from 'node:test';
import {readFileSync} from 'node:fs';
test('planning live scene reuses the canonical vertical height range inside the existing stage',()=>{
const source=readFileSync(new URL('../src/components/missions/PlanningLiveScene.tsx',import.meta.url),'utf8');
assert.match(source,/RangeControl orientation="vertical" limitSide="left" label="Срез"/);
assert.match(source,/className="session-overview__height"/);
assert.match(source,/ceiling_m:ceilingRef\.current/);
assert.match(source,/formatLimit=\{value=>value\.toFixed\(1\)\.replace\('\.',','\)\}/);
assert.match(source,/heightBounds=null/);
assert.match(source,/const CLIP_CEILING_M=80/);
assert.match(source,/max:Math\.max\(CLIP_CEILING_M,sourceBounds\.max,ceiling\?\?-Infinity\)/);
assert.match(source,/floor_m:floorRef\.current/);
assert.match(source,/value=\{\[floor\?\?rangeBounds\.min,ceiling\?\?rangeBounds\.max\]\}/);
assert.match(source,/floorRef\.current=null;setCeiling\(null\);setFloor\(null\);\s*\},\[runId\]\)/);
});