Skip to content

Commit

Permalink
Adds a test for the preview title
Browse files Browse the repository at this point in the history
  • Loading branch information
Elyasin committed Oct 1, 2021
1 parent fe019d2 commit 6f1c110
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/plugins/preview/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ bender.editor = {
};

bender.test( {
'test title of preview': function() {
'test title of preview': function() {
var tc = this,
editor = tc.editor;

editor.title = 'Test title';
editor.once('contentPreview', function( event ) {
tc.resume( function() {
assert.isArray( event.data.dataValue.match( '<title>' + editor.title + '</title>'), 'Preview title is editor\'s title.');
} );
editor.title = 'Test title';
editor.once( 'contentPreview', function( event ) {
tc.resume( function() {
assert.isArray( event.data.dataValue.match( '<title>' + editor.title + '</title>' ), 'Preview title is editor\'s title.' );
} );

event.cancel();
}, null, null, 1);
event.cancel();
}, null, null, 1 );

editor.execCommand( 'preview' );
editor.execCommand( 'preview' );

tc.wait();
},
tc.wait();
},

'test processing of data on contentPreview': function() {
var tc = this,
Expand Down

0 comments on commit 6f1c110

Please sign in to comment.