Skip to content

Commit

Permalink
e2e: fix Site Editor Styles test (#62111)
Browse files Browse the repository at this point in the history
* e2e: fix Site Editor Styles test

* Set a px value

Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
Co-authored-by: SantosGuillamot <santosguillamot@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
  • Loading branch information
6 people committed May 30, 2024
1 parent fec4160 commit 1c328e8
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions test/e2e/specs/site-editor/styles.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
} );
} );

0 comments on commit 1c328e8

Please sign in to comment.