test(pcbnew): assert collab add preserves each item's layer
Adds a layer-preservation check to the footprint/via/zone/text round-trip add tests, documenting + verifying that an item's own serialized layer is applied by makeItem and the peer editor's active layer is never consulted. 4 add tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2ee87889fa
commit
1bfa562a61
1 changed files with 3 additions and 0 deletions
|
|
@ -249,6 +249,9 @@ test.describe("pcbnew collab bridge — single page", () => {
|
|||
const snap = JSON.parse(window.Module.kicadCollabSnapshot());
|
||||
return snap.added.find((it: { id: string }) => it.id === i);
|
||||
}, id);
|
||||
// The item's own layer travels in the delta and is applied explicitly by makeItem — it does
|
||||
// NOT pick up the peer editor's active layer. (Footprint layer = which side it sits on.)
|
||||
expect(after.layer, `${label} layer preserved`).toBe(payload.layer);
|
||||
if (type === "PCB_TEXT") {
|
||||
expect(after.text, "text string preserved").toBe(payload.text);
|
||||
expect(after.hjust, "text horizontal justification preserved").toBe(payload.hjust);
|
||||
|
|
|
|||
Loading…
Reference in a new issue