diff --git a/packages/e2e-test-utils-playwright/src/test.ts b/packages/e2e-test-utils-playwright/src/test.ts index 677eff31955bd1..6ef614024d7d97 100644 --- a/packages/e2e-test-utils-playwright/src/test.ts +++ b/packages/e2e-test-utils-playwright/src/test.ts @@ -60,7 +60,12 @@ function observeConsoleLogging( message: ConsoleMessage ) { // See: https://core.trac.wordpress.org/ticket/37000 // See: https://www.chromestatus.com/feature/5088147346030592 // See: https://www.chromestatus.com/feature/5633521622188032 - if ( text.includes( 'A cookie associated with a cross-site resource' ) ) { + if ( + text.includes( 'A cookie associated with a cross-site resource' ) || + text.includes( + 'https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite' + ) + ) { return; } @@ -93,6 +98,18 @@ function observeConsoleLogging( message: ConsoleMessage ) { return; } + // https://bugzilla.mozilla.org/show_bug.cgi?id=1404468 + if ( + text.includes( 'Layout was forced before the page was fully loaded' ) + ) { + return; + } + + // Deprecated warnings coming from the third-party libraries. + if ( text.includes( 'MouseEvent.moz' ) ) { + return; + } + const logFunction = type as ( typeof OBSERVED_CONSOLE_MESSAGE_TYPES )[ number ]; @@ -100,7 +117,6 @@ function observeConsoleLogging( message: ConsoleMessage ) { // which, unless the test explicitly anticipates the logging via // @wordpress/jest-console matchers, will cause the intended test // failure. - // eslint-disable-next-line no-console console[ logFunction ]( text ); }