mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
test(golden): отделить стресс лестниц от кадров (#663)
Performance fixture по умолчанию сохраняет максимум 250 лестниц, а визуальные large-house сцены исключают стрессовую коллекцию, уже покрытую четырьмя отдельными кадрами. Issue: #663 User-Visible: no
This commit is contained in:
@@ -18,6 +18,8 @@ test('large-house fixture meets the HP-PERF-01 reference counts', () => {
|
||||
assert.equal(Object.keys(fixture.entities).length, LARGE_HOUSE_COUNTS.devices);
|
||||
assert.equal(fixture.config.markers.length > 0, true);
|
||||
assert.equal(fixture.config.markers.every((marker) => marker.is_light === true), true);
|
||||
assert.equal(makeLargeHouseFixture({ includeStairs: false }).config.spaces
|
||||
.some((space) => space.stairs?.length), false, 'visual goldens can omit the stress-only collection');
|
||||
});
|
||||
|
||||
test('large-house fixture is deterministic and geometry ids are unique per space', () => {
|
||||
@@ -26,8 +28,8 @@ test('large-house fixture is deterministic and geometry ids are unique per space
|
||||
assert.deepEqual(first, second);
|
||||
|
||||
for (const space of first.config.spaces) {
|
||||
const ids = ['rooms', 'openings', 'partitions', 'wall_columns', 'decor']
|
||||
.flatMap((field) => space[field].map((item) => item.id));
|
||||
const ids = ['rooms', 'openings', 'partitions', 'wall_columns', 'decor', 'stairs']
|
||||
.flatMap((field) => (space[field] || []).map((item) => item.id));
|
||||
assert.equal(new Set(ids).size, ids.length, space.id);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user