mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
fix: reconcile hidden walls during Optimize
Issue: #296 User-Visible: yes
This commit is contained in:
committed by
claude[bot]
parent
033ad11bf7
commit
89ac96a8af
@@ -121,12 +121,12 @@ test('Optimize uses the exact max envelope for nested coincident thicknesses', (
|
||||
}
|
||||
});
|
||||
|
||||
test('Optimize leaves partial and ambiguous coincident partitions untouched', () => {
|
||||
test('Optimize reconciles fully hidden subspans but leaves ambiguous partitions untouched', () => {
|
||||
const partial = coincidentPartitionConfig({ partial: true });
|
||||
const partialResult = optimizePlans(partial, {});
|
||||
assert.equal(partialResult.report.partitionsReconciled, 0);
|
||||
assert.equal(partialResult.config.spaces[0].partitions.length, 1);
|
||||
assert.ok(partialResult.config.spaces[0].openings[0].host);
|
||||
assert.equal(partialResult.report.partitionsReconciled, 1);
|
||||
assert.equal(partialResult.config.spaces[0].partitions, undefined);
|
||||
assert.equal(partialResult.config.spaces[0].openings[0].host, undefined);
|
||||
|
||||
const ambiguous = coincidentPartitionConfig();
|
||||
ambiguous.spaces[0].partitions.push({
|
||||
@@ -818,5 +818,7 @@ test('issue 229 a node on the side of a room survives the sweep', () => {
|
||||
};
|
||||
const result = optimizePlans(config, {});
|
||||
assert.equal(result.report.partitionsMerged, 0, 'the room side holds the node');
|
||||
assert.equal(result.config.spaces[0].partitions.length, 2);
|
||||
assert.equal(result.report.partitionsReconciled, 2,
|
||||
'the two node-bounded records are then independently absorbed by #296');
|
||||
assert.equal(result.config.spaces[0].partitions, undefined);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user