test: flush #40 debounce in Container padding seed test (still one undo step)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
shadowdaoandClaude Sonnet 5.5 committed 2026-10-07 11:31:51 -07:00
1 parent 136e3ce6ea
commit 705c602a67
1 file changed
+3 -1
@@ -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
});
});