Make WordPress Core

Changeset 51130


Ignore:
Timestamp:
06/09/2021 01:35:26 AM (4 years ago)
Author:
desrosj
Message:

Build/Test Tools: Silence jQuery Migrate console warnings when running E2E tests.

These warnings will still be visible in the browser console. The majority of the warnings are coming from jQuery UI, which is still waiting for a new update to be released that is jQuery >= 3.0 friendly.

This change makes the E2E test results more readable without having to tread through the large number of warnings.

Props isabel_brison.
Fixes #52860.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/e2e/config/bootstrap.js

    r46586 r51130  
    3333// The Jest timeout is increased because these tests are a bit slow
    3434jest.setTimeout( PUPPETEER_TIMEOUT || 100000 );
    35 
    3635
    3736/**
     
    7069        // which log regardless of whether a deprecated feature is in use.
    7170        if ( text.includes( 'This is a global warning' ) ) {
     71            return;
     72        }
     73
     74        // An exception is made for jQuery migrate console warnings output by
     75        // the unminified script loaded in development environments.
     76        if ( text.includes( 'JQMIGRATE' ) ) {
    7277            return;
    7378        }
Note: See TracChangeset for help on using the changeset viewer.