diff --git a/tests/e2e/block-testimonial.spec.ts b/tests/e2e/block-testimonial.spec.ts index 80a917a6..58bc9e7e 100644 --- a/tests/e2e/block-testimonial.spec.ts +++ b/tests/e2e/block-testimonial.spec.ts @@ -278,9 +278,11 @@ test.describe( 'SCF Block > Testimonial', () => { await publishButton.click(); // Wait for the error notice to appear at the top of the editor - const errorNotice = page.locator( - '.components-notice.is-error .components-notice__content' - ); + const errorNotice = page + .getByLabel( 'Editor content' ) + .getByText( + 'An ACF Block on this page requires attention before you can save.' + ); await expect( errorNotice ).toBeVisible( { timeout: 1000 } ); } ); } ); diff --git a/tests/e2e/block-v3-features.spec.ts b/tests/e2e/block-v3-features.spec.ts index c5c6c935..732a1648 100644 --- a/tests/e2e/block-v3-features.spec.ts +++ b/tests/e2e/block-v3-features.spec.ts @@ -309,9 +309,11 @@ test.describe( 'SCF Block V3 Features', () => { await publishButton.click(); // Wait for the error notice to appear - const errorNotice = page.locator( - '.components-notice.is-error .components-notice__content' - ); + const errorNotice = page + .getByLabel( 'Editor content' ) + .getByText( + 'An ACF Block on this page requires attention before you can save.' + ); await expect( errorNotice ).toBeVisible( { timeout: 3000 } ); } );