Make WordPress Core

Changeset 37024


Ignore:
Timestamp:
03/17/2016 12:46:26 AM (11 years ago)
Author:
SergeyBiryukov
Message:

TinyMCE: Adjust textpattern tests for the changes in [37023].

See #33300.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/qunit/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js

    r36719 r37024  
    280280        } );
    281281
    282         QUnit.test( 'Inline: single.', function( assert ) {
    283                 type( '*test*', function() {
    284                         assert.equal( editor.getContent(), '<p><em>test</em></p>' );
    285                         assert.equal( editor.selection.getRng().startOffset, 1 );
    286                 }, assert.async() );
    287         } );
    288 
    289         QUnit.test( 'Inline: double.', function( assert ) {
    290                 type( '**test**', function() {
    291                         assert.equal( editor.getContent(), '<p><strong>test</strong></p>' );
    292                         assert.equal( editor.selection.getRng().startOffset, 1 );
    293                 }, assert.async() );
    294         } );
    295 
    296         QUnit.test( 'Inline: after typing.', function( assert ) {
    297                 editor.setContent( '<p>test test test</p>' );
    298                 editor.selection.setCursorLocation( editor.$( 'p' )[0].firstChild, 5 );
    299 
    300                 type( '**', function() {
    301                         editor.selection.setCursorLocation( editor.$( 'p' )[0].firstChild, 11 );
    302                 }, '**', function() {
    303                         assert.equal( editor.getContent(), '<p>test <strong>test</strong> test</p>' );
    304                         assert.equal( editor.selection.getRng().startOffset, 1 );
    305                 }, assert.async() );
    306         } );
    307 
    308         QUnit.test( 'Inline: no change.', function( assert ) {
    309                 type( 'test ******', function() {
    310                         assert.equal( editor.getContent(), '<p>test ******</p>' );
    311                 }, assert.async() );
    312         } );
    313 
    314282        QUnit.test( 'Horizontal Rule', function( assert ) {
    315                 type( '   ---   \n', function() {
     283                type( '---\n', function() {
    316284                        assert.equal( editor.getContent(), '<hr />\n<p>&nbsp;</p>' );
    317285                }, assert.async() );
Note: See TracChangeset for help on using the changeset viewer.