From f3ac0ac0618f42a2e9ece8dde5bccba22e6985c4 Mon Sep 17 00:00:00 2001 From: Matysh Date: Mon, 31 Aug 2026 00:59:37 +0300 Subject: [PATCH] Update free-walls smoke for shared confirmation User-Visible: no Issue: #32 --- demo/smoke_free_walls.mjs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/demo/smoke_free_walls.mjs b/demo/smoke_free_walls.mjs index ab206331..0031a6fe 100644 --- a/demo/smoke_free_walls.mjs +++ b/demo/smoke_free_walls.mjs @@ -10,7 +10,10 @@ const out = await page.evaluate(async () => { const o = {}; const c = window.__card; const PITCH = 1000 / 240; - window.confirm = () => true; + // The product owns dangerous confirmations through hp-confirm now. This + // smoke covers geometry transactions, while smoke_danger_confirmation + // exercises the real dialog; keep the decision deterministic here. + c._confirmDanger = async () => true; // Exercise hp-dialog's HA branch without depending on the Home Assistant // frontend in the standalone demo. The fixed one-line fallback below // reproduces ha-dialog-header's public custom-property contract: Houseplan @@ -188,12 +191,12 @@ const out = await page.evaluate(async () => { await c.updateComplete; c._physicalSel = { kind: 'partition', id: sp.partitions[0].id }; - c._deletePhysicalSelection(); + await c._deletePhysicalSelection(); o.deleteRemovesPartition = !c._serverCfg.spaces[0].partitions; const draftId = c._serverCfg.spaces[0].room_drafts[0].id; c._physicalSel = { kind: 'draft', id: draftId, segment: 0 }; - c._deletePhysicalSelection(); + await c._deletePhysicalSelection(); o.deleteOnDraftRemovesWholeOutline = !c._serverCfg.spaces[0].room_drafts; drawAndFinish([400, 100], [500, 100], 120);