Skip to content

Add direct tests for floorplan export scope filtering at both collection sites #635

Description

@SomSamantray

Problem

isFloorplanNodeInExportScope is exhaustively unit-tested, but the two production filter sites in collectFloorplanGeometry (module-private) — the level-subtree walk (line 768) and the linked-level-nodes walk (line 783) — are not exercised end-to-end with scope 'routing', including the undefined-definition arm against production guards (isFloorplanNodeVisible + def?.floorplan). R4 (scope filter applies identically in both collection paths) is proven only at predicate level.

Suggested fix

Export collectFloorplanGeometry (or a thin testable wrapper) and add tests asserting that under 'structure' a utility node is excluded from the subtree walk while a utility node returned by collectFloorplanLinkedLevelNodes is excluded from the linked-level walk, and that 'full'/'structure' output is unchanged by the predicate refactor.

Evidence

packages/editor/src/lib/floorplan/floorplan-export.tsx:768 -- isFloorplanNodeInExportScope(def, scope)

Source

Branch feat/floorplan-export-routing-scope (head f2d3051) — planned PR for #619.

Metadata

Severity: P2 | Confidence: 75 | Reviewer(s): testing | Finding ID: floorplan-export-tsx-768-filter-sites-untested

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions