From a4e6a226620dd82e9b4740cb49c9688002a3a0e0 Mon Sep 17 00:00:00 2001 From: Sergey Matyunin Date: Sat, 22 Aug 2026 22:32:51 +0300 Subject: [PATCH] test(golden): cover orphan-reference scenarios Issue: #244 User-Visible: no --- test/golden-matrix.test.mjs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/test/golden-matrix.test.mjs b/test/golden-matrix.test.mjs index 43806815..a4d5f3c8 100644 --- a/test/golden-matrix.test.mjs +++ b/test/golden-matrix.test.mjs @@ -321,7 +321,7 @@ test('sun-ray golden requires browser-painted light from a state-only sun entity assert.ok(scenario); const fixture = prepareGoldenFixture(scenario); const space = fixture.config.spaces.find((item) => item.id === scenario.space); - assert.equal(GOLDEN_MATRIX_VERSION, 37); + assert.equal(GOLDEN_MATRIX_VERSION, 38); assert.equal(space.settings.sun_rays, true); assert.equal(scenario.northDeg, 90, 'the sign-sensitive golden must keep a non-zero north direction'); @@ -339,6 +339,22 @@ test('sun-ray golden requires browser-painted light from a state-only sun entity assert.equal(scenario.sunRayPixels.minChannelDelta >= 4, true); }); +test('issue 244 golden matrix covers orphan repair and invalid default_floor themes', () => { + const optimize = GOLDEN_SCENARIOS.find( + (item) => item.id === 'optimize-orphan-references-dark-en', + ); + assert.ok(optimize); + assert.equal(optimize.dialog, 'optimize-orphan-references'); + assert.equal(optimize.markerOverrides[0].space, 'removed-floor'); + assert.equal(optimize.layoutOverrides['golden-light-one'].s, 'unresolved-floor'); + + const editors = GOLDEN_SCENARIOS.filter( + (item) => item.cardEditorInvalidDefaultFloor === 'removed-floor', + ); + assert.deepEqual(editors.map((item) => item.theme).sort(), ['dark', 'light']); + assert.deepEqual(editors.map((item) => item.language).sort(), ['en', 'ru']); +}); + test('issue #197 golden keeps the complete junction fixture in Plan and View', () => { const scenarios = GOLDEN_SCENARIOS.filter((item) => item.id.startsWith('junction-patch-resilience-'));