feat: finalize corrected-route planning and Rerun recording review

This commit is contained in:
DCCONSTRUCTIONS
2026-09-22 10:10:03 +03:00
parent c804d89b18
commit 2e5d52521f
132 changed files with 14141 additions and 898 deletions
@@ -13,7 +13,8 @@ before(async () => {
after(async () => { await server?.close(); });
const render = (focused = false) => renderToStaticMarkup(createElement(SpatialScene, {
viewportRef: { current: null }, primaryFocused: focused, toolbar: null, renderer: null,
viewportRef: { current: null }, primaryFocused: focused, toolbar: null,
renderer: createElement('div', { 'data-testid': 'renderer' }, 'RENDERER'),
sourceControls: createElement('div', { className: focused ? 'scene-focus-exit' : 'scene-source-controls' }, 'SOURCE_CONTROLS'),
status: { label: 'Накопление данных', tone: 'neutral', message: 'Сканер неподвижен.' },
metrics: createElement('div', null, 'METRICS'),
@@ -37,6 +38,18 @@ test('focus exit remains viewport-owned outside the hidden information stack', (
assert.equal((markup.match(/SOURCE_CONTROLS/g) ?? []).length, 1);
});
test('normal and expanded scenes retain the renderer without mouse-navigation copy', async () => {
for (const focused of [false, true]) {
const markup = render(focused);
assert.match(markup, /data-testid="renderer">RENDERER/);
assert.doesNotMatch(markup, /scene-navigation-hint|Навигация по 3D-сцене|ЛКМ|ПКМ|Колесо/);
}
const source = await readFile(new URL('../../../packages/spatial-ui/src/SpatialScene.tsx', import.meta.url), 'utf8');
const css = await readFile(new URL('../../../packages/spatial-ui/src/observation.css', import.meta.url), 'utf8');
assert.doesNotMatch(source, /navigationReady|scene-navigation-hint/);
assert.doesNotMatch(css, /scene-navigation-hint/);
});
test('scene layout uses flow, retains compact metrics and removes only the calibration perimeter', async () => {
const css = await readFile(new URL('../../../packages/spatial-ui/src/spatial.css', import.meta.url), 'utf8');
const responsive = await readFile(new URL('../src/styles/responsive.css', import.meta.url), 'utf8');
@@ -48,3 +61,13 @@ test('scene layout uses flow, retains compact metrics and removes only the calib
assert.doesNotMatch(responsive, /\.scene-metrics\s*\{\s*display: none/);
assert.match(calibration, /\.xgrids-k1-spatial-controls \{[^}]*border: 0;/);
});
test('preparation status shares the source controls top axis on the opposite side', async () => {
const css = await readFile(new URL('../../../packages/spatial-ui/src/spatial.css', import.meta.url), 'utf8');
const stack = css.match(/\.scene-operation-status-stack \{[^}]*\}/)?.[0] ?? '';
assert.match(stack, /top: 0\.85rem/);
assert.match(stack, /right: 0\.85rem/);
assert.match(stack, /min-height: 2\.75rem/);
assert.match(stack, /align-content: center/);
assert.doesNotMatch(stack, /left:|bottom:/);
});