Files
Danila KhodjaefandCursor 13f6f088b6 Polish movement hall interiors: clear doors and bay columns, tone floors and windows.
Document hang keep-outs and period-module fixes; leave columns fixed while packing frames into gaps.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 12:02:10 +03:00

35 lines
1.3 KiB
JavaScript

/**
* Baroque upper-wall field panels must be framed velvet, not solid gilt slabs
* that wash out beside windows.
* node --test server/__tests__/baroque-panels.test.js
*/
const { describe, it } = require('node:test');
const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const ROOT = path.join(__dirname, '..', '..');
const DETAILS = fs.readFileSync(path.join(ROOT, 'client/src/components/hall-details/courtly.tsx'), 'utf8');
function baroqueBlock() {
const start = DETAILS.indexOf('export function BaroqueStateDetails');
assert.ok(start >= 0, 'BaroqueStateDetails must exist');
const next = DETAILS.indexOf('export function ', start + 1);
return DETAILS.slice(start, next > start ? next : undefined);
}
describe('Baroque field panels beside windows', () => {
it('does not draw a solid gilt slab covering the velvet field', () => {
const block = baroqueBlock();
assert.doesNotMatch(block, /boxGeometry args=\{\[0\.04, 1\.12, w \+ 0\.12\]\}/);
assert.match(block, /velvet|field/i);
assert.match(block, /frame|rail|moulding/i);
});
it('keeps a generous clearance around window openings', () => {
const block = baroqueBlock();
assert.match(block, /halfClear = fieldW \/ 2 \+ rail \+ 0\.35/);
assert.match(block, /\(mid, halfClear\)/);
});
});