fix: materialize empty wall catalog for new spaces

Issue: #324
User-Visible: yes
This commit is contained in:
Matysh
2026-08-27 17:26:26 +03:00
parent 39eda1e136
commit acc30c2da7
10 changed files with 105 additions and 24 deletions
+12
View File
@@ -2,11 +2,23 @@ import test from 'node:test';
import assert from 'node:assert/strict';
import {
createEmptySpaceConfig,
initialSpaceDisplayDraft,
switchSpacePlanSource,
touchSpaceDisplay,
} from '../test-build/space-dialog.js';
test('a fresh space is a complete empty v8/v9 wall-model document (#324)', () => {
assert.deepEqual(createEmptySpaceConfig('floor', 'Ground floor'), {
id: 'floor',
title: 'Ground floor',
plan_url: null,
view_box: [0, 0, 1, 1],
rooms: [],
wall_segments: [],
});
});
test('fresh create projects honest File and Draw display defaults', () => {
const file = initialSpaceDisplayDraft();
assert.deepEqual(file, {