Changeset 37024
- Timestamp:
- 03/17/2016 12:46:26 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/qunit/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js
r36719 r37024 280 280 } ); 281 281 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 314 282 QUnit.test( 'Horizontal Rule', function( assert ) { 315 type( ' ---\n', function() {283 type( '---\n', function() { 316 284 assert.equal( editor.getContent(), '<hr />\n<p> </p>' ); 317 285 }, assert.async() );
Note: See TracChangeset
for help on using the changeset viewer.