diff --git a/packages/block-library/src/buttons/test/edit.native.js b/packages/block-library/src/buttons/test/edit.native.js index e3038ea02588fd..cfee24e237fcfd 100644 --- a/packages/block-library/src/buttons/test/edit.native.js +++ b/packages/block-library/src/buttons/test/edit.native.js @@ -30,11 +30,11 @@ afterAll( () => { describe( 'when a button is shown', () => { it( 'adjusts the border radius', async () => { const initialHtml = ` -
-
Hello
+
+
`; - const { getByA11yLabel, getByTestId } = await initializeEditor( { + const { getByA11yLabel } = await initializeEditor( { initialHtml, } ); @@ -66,14 +66,18 @@ describe( 'when a button is shown', () => { ); fireEvent.press( settingsButton ); - const radiusSlider = await waitFor( () => - getByTestId( 'Slider Border Radius' ) + const radiusStepper = await waitFor( () => + getByA11yLabel( /Border Radius/ ) ); - fireEvent( radiusSlider, 'valueChange', '25' ); + + const incrementButton = await waitFor( () => + within( radiusStepper ).getByTestId( 'Increment' ) + ); + fireEvent( incrementButton, 'onPressIn' ); const expectedHtml = ` -
- + `; expect( getEditorHtml() ).toBe( expectedHtml ); diff --git a/packages/components/src/mobile/bottom-sheet/stepper-cell/stepper.android.js b/packages/components/src/mobile/bottom-sheet/stepper-cell/stepper.android.js index efa69f3892326f..37f72425640fe0 100644 --- a/packages/components/src/mobile/bottom-sheet/stepper-cell/stepper.android.js +++ b/packages/components/src/mobile/bottom-sheet/stepper-cell/stepper.android.js @@ -56,6 +56,7 @@ function Stepper( { ) } { children }