WordPress.org

Make WordPress Core

Changeset 46388


Ignore:
Timestamp:
10/04/2019 09:19:17 PM (2 weeks ago)
Author:
ocean90
Message:

QUnit: Include script dependencies for wp-a11y script to fix a TypeError.

Also, add missing message argument to Customizer notifications to ensure tests are passing.

Fixes #45066.

Location:
trunk/tests/qunit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/qunit/index.html

    r46375 r46388  
    2525        </script>
    2626        <script src="../../build/wp-includes/js/wp-util.js"></script>
     27        <script src="../../build/wp-includes/js/dist/vendor/wp-polyfill.js"></script>
     28        <script src="../../build/wp-includes/js/dist/dom-ready.js"></script>
    2729        <script src="../../build/wp-includes/js/dist/a11y.js"></script>
    2830        <script>
  • trunk/tests/qunit/wp-admin/js/customize-controls.js

    r42042 r46388  
    9595            container: container
    9696        });
    97         collection.add( 'mycode-1', new wp.customize.Notification( 'mycode-1' ) );
     97        collection.add( 'mycode-1', new wp.customize.Notification( 'mycode-1', { message: 'My message 1' } ) );
    9898        collection.render();
    9999        items = collection.container.find( 'li' );
     
    102102
    103103        collection.add( 'mycode-2', new wp.customize.Notification( 'mycode-2', {
     104            message: 'My message 2',
    104105            dismissible: true
    105106        } ) );
     
    188189            assert.equal( 0, notificationContainerElement.height() );
    189190
    190             settingNotification = new wp.customize.Notification( 'setting_invalidity', 'Invalid setting' );
    191             controlOnlyNotification = new wp.customize.Notification( 'control_invalidity', 'Invalid control' );
     191            settingNotification = new wp.customize.Notification( 'setting_invalidity', { message: 'Invalid setting' } );
     192            controlOnlyNotification = new wp.customize.Notification( 'control_invalidity', { message: 'Invalid control' } );
    192193            control.settings['default'].notifications.add( settingNotification.code, settingNotification );
    193194            control.notifications.add( controlOnlyNotification.code, controlOnlyNotification );
Note: See TracChangeset for help on using the changeset viewer.