Skip to content

Commit 8a32760

Browse files
Use locators instead of waitForSelector
1 parent 9fa9829 commit 8a32760

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

plugins/auto-sizes/tests/e2e/specs/improve-calculate-sizes.spec.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ test.describe( 'check accurate sizes', () => {
5555

5656
// Navigate to the post and wait for the image to load.
5757
await page.goto( `/?p=${ postId }` );
58-
const imageElement = await page.waitForSelector(
59-
`img.wp-image-${ media.id }`
60-
);
58+
const imageElement = await page.getByAltText( filename );
6159
const imageSizes = await imageElement.getAttribute( 'sizes' );
6260

6361
// Activate the plugin.

0 commit comments

Comments
 (0)