From 705c602a67b8476e6cdad2e9f0bdcbcbca448e3e Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Wed, 7 Oct 2026 11:31:51 -0700 Subject: [PATCH] test: flush #40 debounce in Container padding seed test (still one undo step) Co-Authored-By: Claude Sonnet 5.5 --- craft/src/panels/right/styles/collapsible.test.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/craft/src/panels/right/styles/collapsible.test.tsx b/craft/src/panels/right/styles/collapsible.test.tsx index ae4285d..9b007ce 100644 --- a/craft/src/panels/right/styles/collapsible.test.tsx +++ b/craft/src/panels/right/styles/collapsible.test.tsx @@ -117,12 +117,14 @@ describe('Container padding is a single control', () => { setter.call(top, '20'); top.dispatchEvent(new Event('input', { bubbles: true })); }); + // number commits are debounced (#40): flush via blur + harness.act(() => { top.dispatchEvent(new FocusEvent('blur', { bubbles: true })); top.dispatchEvent(new FocusEvent('focusout', { bubbles: true })); }); const style = JSON.parse(harness.getSerialized()).sec.props.style; expect([style.paddingTop, style.paddingRight, style.paddingBottom, style.paddingLeft]).toEqual(['20px', '0', '40px', '0']); expect(style.padding).toBe(''); harness.act(() => { harness!.actions.history.undo(); }); expect(JSON.parse(harness.getSerialized()).sec.props.style.padding).toBe('40px 0'); - expect(harness.query.history.canUndo()).toBe(false); + expect(harness.query.history.canUndo()).toBe(false); // exactly one undo step }); });