Skip to content

Commit 9a4bdd6

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

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
@@ -63,9 +63,7 @@ test.describe( 'check accurate sizes', () => {
6363

6464
// Reload the page and wait for the image to load.
6565
await page.goto( `/?p=${ postId }` );
66-
const updatedImageElement = await page.waitForSelector(
67-
`img.wp-image-${ media.id }`
68-
);
66+
const updatedImageElement = await page.getByAltText( filename );
6967

7068
const updatedImageSizes =
7169
await updatedImageElement.getAttribute( 'sizes' );

0 commit comments

Comments
 (0)