From b1263e7975e4360a1e0fd78b515451a815132096 Mon Sep 17 00:00:00 2001 From: saranshsinhaa Date: Wed, 11 Nov 2026 19:14:00 +0530 Subject: [PATCH] Block Editor: Forward UnitControl props in TextIndentControl with the slider --- .../components/text-indent-control/index.tsx | 1 + .../test/index.jsdom.test.tsx | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 packages/block-editor/src/components/text-indent-control/test/index.jsdom.test.tsx diff --git a/packages/block-editor/src/components/text-indent-control/index.tsx b/packages/block-editor/src/components/text-indent-control/index.tsx index 70134670749385..a33b92eebabe17 100644 --- a/packages/block-editor/src/components/text-indent-control/index.tsx +++ b/packages/block-editor/src/components/text-indent-control/index.tsx @@ -86,6 +86,7 @@ export default function TextIndentControl( { { + it.each( [ false, true ] )( + 'should forward UnitControl props to the input when withSlider is %s', + ( withSlider ) => { + render( + {} } + withSlider={ withSlider } + disabled + /> + ); + + expect( + screen.getByRole( 'spinbutton', { name: 'Line indent' } ) + ).toBeDisabled(); + } + ); +} );