mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
test: golden scene for the legacy sharp apex (#329 AC6)
The owner's spike room (≈9.9°, 15 cm walls) is extracted into test/fixtures/329-sharp-apex.json and rendered on its own so a returning trident, a flat chamfer or a jagged edge fails the pixel gate. Baseline follows from the CI candidate, as the process requires. Issue: #329 User-Visible: no
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -5,6 +5,9 @@ import { readFileSync } from 'node:fs';
|
||||
const junctionArtifactsFixture = JSON.parse(readFileSync(
|
||||
new URL('../../test/fixtures/302-junction-artifacts.json', import.meta.url), 'utf8',
|
||||
));
|
||||
const sharpApexFixture = JSON.parse(readFileSync(
|
||||
new URL('../../test/fixtures/329-sharp-apex.json', import.meta.url), 'utf8',
|
||||
));
|
||||
const junctionTeethFixture = JSON.parse(readFileSync(
|
||||
new URL('../../test/fixtures/309-junction-teeth.json', import.meta.url), 'utf8',
|
||||
));
|
||||
@@ -311,6 +314,23 @@ export function prepareGoldenFixture(scenario) {
|
||||
settings: { fill_mode: 'none', show_borders: true, show_names: false },
|
||||
});
|
||||
}
|
||||
if (scenario.sharpApex) {
|
||||
// #329 §4: легаси-план, где вершина ≈9.9° раньше распадалась на
|
||||
// «трезубец». Сцена смотрит вплотную на остриё — фаска, складка-«бабочка»
|
||||
// и микро-ступеньки на гранях обязаны быть видимы как регресс.
|
||||
fixture.config.spaces.push({
|
||||
id: scenario.space,
|
||||
title: 'Sharp apex (legacy)',
|
||||
cell_cm: sharpApexFixture.cell_cm,
|
||||
model_version: sharpApexFixture.model_version,
|
||||
rooms: structuredClone(sharpApexFixture.rooms),
|
||||
walls: structuredClone(sharpApexFixture.walls),
|
||||
wall_segments: structuredClone(sharpApexFixture.wall_segments),
|
||||
openings: [], room_drafts: [], partitions: [], wall_columns: [],
|
||||
view_box: [3.58, 0.20, 0.40, 0.40],
|
||||
settings: { fill_mode: 'none', show_borders: true, show_names: false },
|
||||
});
|
||||
}
|
||||
if (scenario.junctionTeeth) {
|
||||
fixture.config.spaces.push({
|
||||
id: scenario.space,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { fixtureWallKey } from '../fixtures/visual-matrix.mjs';
|
||||
|
||||
/** Data-only HP-QA-01 capture matrix. Bump when framing or scenarios change. */
|
||||
export const GOLDEN_MATRIX_VERSION = 47;
|
||||
export const GOLDEN_MATRIX_VERSION = 48;
|
||||
|
||||
const stage = { capture: 'stage', threshold: { maxChannelDelta: 10, maxDiffRatio: 0.0005 } };
|
||||
const page = { capture: 'page', threshold: { maxChannelDelta: 10, maxDiffRatio: 0.0008 } };
|
||||
@@ -630,6 +630,10 @@ export const GOLDEN_SCENARIOS = Object.freeze([
|
||||
id, fixture: 'visual', space: `golden-${id}`, mode: 'view', junctionTeeth: true,
|
||||
zoom, zoomCenter, theme: 'dark', viewport: { width: 900, height: 900 }, ...stage,
|
||||
})),
|
||||
{ id: 'sharp-apex-legacy-dark', fixture: 'visual',
|
||||
space: 'golden-sharp-apex', mode: 'view', sharpApex: true,
|
||||
theme: 'dark',
|
||||
viewport: { width: 900, height: 900 }, ...stage },
|
||||
{ id: 'junction-owner-repro-dark', fixture: 'visual',
|
||||
space: 'golden-junction-owner-repro', mode: 'view', junctionArtifacts: true,
|
||||
zoom: 6, zoomCenter: [329.17, 141.67], theme: 'dark',
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+110
@@ -0,0 +1,110 @@
|
||||
{
|
||||
"_source": "owner fixture houseplan-space-test2-2026-08-27_16-14-48.json, room rmtbq3k5e-0 (#329)",
|
||||
"cell_cm": 1,
|
||||
"model_version": 9,
|
||||
"rooms": [
|
||||
{
|
||||
"id": "rmtbq3k5e-0",
|
||||
"name": "а",
|
||||
"poly": [
|
||||
[
|
||||
3.6416666666666666,
|
||||
1.8333333333333333
|
||||
],
|
||||
[
|
||||
3.716666666666667,
|
||||
0.24166666666666667
|
||||
],
|
||||
[
|
||||
3.908333333333333,
|
||||
1.7666666666666666
|
||||
]
|
||||
],
|
||||
"wall_ids": [
|
||||
"wall-6645e585-ece0-4a2b-a2ff-9ac532a46d8e",
|
||||
"wall-97b7ec47-06d7-4cfb-a2b8-0e3f2b10b196",
|
||||
"wall-04aa8503-1142-4af1-a594-581f625b97a6"
|
||||
]
|
||||
}
|
||||
],
|
||||
"walls": [
|
||||
{
|
||||
"key": "3.679167,1.037500@1.6178",
|
||||
"cm": 15,
|
||||
"a": [
|
||||
3.6416666666666666,
|
||||
1.8333333333333333
|
||||
],
|
||||
"b": [
|
||||
3.716666666666667,
|
||||
0.24166666666666667
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "3.775000,1.800000@2.8967",
|
||||
"cm": 15,
|
||||
"a": [
|
||||
3.6416666666666666,
|
||||
1.8333333333333333
|
||||
],
|
||||
"b": [
|
||||
3.908333333333333,
|
||||
1.7666666666666666
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "3.812500,1.004167@1.4456",
|
||||
"cm": 15,
|
||||
"a": [
|
||||
3.716666666666667,
|
||||
0.24166666666666667
|
||||
],
|
||||
"b": [
|
||||
3.908333333333333,
|
||||
1.7666666666666666
|
||||
]
|
||||
}
|
||||
],
|
||||
"wall_segments": [
|
||||
{
|
||||
"id": "wall-6645e585-ece0-4a2b-a2ff-9ac532a46d8e",
|
||||
"a": [
|
||||
3.6416666666666666,
|
||||
1.8333333333333333
|
||||
],
|
||||
"b": [
|
||||
3.716666666666667,
|
||||
0.24166666666666667
|
||||
],
|
||||
"cm": 15
|
||||
},
|
||||
{
|
||||
"id": "wall-04aa8503-1142-4af1-a594-581f625b97a6",
|
||||
"a": [
|
||||
3.6416666666666666,
|
||||
1.8333333333333333
|
||||
],
|
||||
"b": [
|
||||
3.908333333333333,
|
||||
1.7666666666666666
|
||||
],
|
||||
"cm": 15
|
||||
},
|
||||
{
|
||||
"id": "wall-97b7ec47-06d7-4cfb-a2b8-0e3f2b10b196",
|
||||
"a": [
|
||||
3.716666666666667,
|
||||
0.24166666666666667
|
||||
],
|
||||
"b": [
|
||||
3.908333333333333,
|
||||
1.7666666666666666
|
||||
],
|
||||
"cm": 15
|
||||
}
|
||||
],
|
||||
"openings": [],
|
||||
"room_drafts": [],
|
||||
"partitions": [],
|
||||
"wall_columns": []
|
||||
}
|
||||
Reference in New Issue
Block a user