Skip to content

Commit abf75a4

Browse files
t-hamanoMamadukaellatrixSantosGuillamotyouknowriad
authored andcommitted
e2e: fix Site Editor Styles test (WordPress#62111)
* e2e: fix Site Editor Styles test * Set a px value Co-authored-by: t-hamano <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: ellatrix <[email protected]> Co-authored-by: SantosGuillamot <[email protected]> Co-authored-by: youknowriad <[email protected]>
1 parent 92305bc commit abf75a4

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

test/e2e/specs/site-editor/styles.spec.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,14 @@ test.describe( 'Styles', () => {
4545
.getByRole( 'button', { name: 'Social Icons block styles' } )
4646
.click();
4747

48-
// find the second padding control
49-
const paddingControl = page
50-
.locator( '[aria-label="padding"]' )
51-
.nth( 1 );
52-
53-
// Change the padding value
54-
await paddingControl.fill( '2' );
48+
// Find the second padding control and change the padding value
49+
await page
50+
.getByRole( 'button', { name: 'Set custom size' } )
51+
.nth( 1 )
52+
.click();
53+
await page.getByRole( 'spinbutton', { name: 'padding' } ).fill( '35' );
5554

5655
// Check the padding value
57-
await expect( block ).toHaveCSS( 'padding-left', '35.4644px' );
56+
await expect( block ).toHaveCSS( 'padding-left', '35px' );
5857
} );
5958
} );

0 commit comments

Comments
 (0)