diff --git a/test/e2e/specs/site-editor/styles.spec.js b/test/e2e/specs/site-editor/styles.spec.js index 66ddf0b7faa1b5..8da9aa95c67567 100644 --- a/test/e2e/specs/site-editor/styles.spec.js +++ b/test/e2e/specs/site-editor/styles.spec.js @@ -45,15 +45,14 @@ test.describe( 'Styles', () => { .getByRole( 'button', { name: 'Social Icons block styles' } ) .click(); - // find the second padding control - const paddingControl = page - .locator( '[aria-label="padding"]' ) - .nth( 1 ); - - // Change the padding value - await paddingControl.fill( '2' ); + // Find the second padding control and change the padding value + await page + .getByRole( 'button', { name: 'Set custom size' } ) + .nth( 1 ) + .click(); + await page.getByRole( 'spinbutton', { name: 'padding' } ).fill( '35' ); // Check the padding value - await expect( block ).toHaveCSS( 'padding-left', '35.4644px' ); + await expect( block ).toHaveCSS( 'padding-left', '35px' ); } ); } );