diff --git a/CHANGES.md b/CHANGES.md index 91d33a7dcfd..cc78ea869c9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,6 +15,7 @@ New Features: * [#12416](http://dev.ckeditor.com/ticket/12416): Added [`widget.definition.upcastPriority`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.definition-property-upcastPriority) property which gives more control over widgets upcasting order to the widget author. * [#12448](http://dev.ckeditor.com/ticket/12448): Set of new methods, params and events giving the developer more control over HTML insertion. See the [`editable.insertHtml()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editable-method-insertHtml) param `range`, the [`editable.insertHtmlIntoRange()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editable-method-insertHtmlIntoRange) method and the [`editor.afterInsertHtml`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-afterInsertHtml) event. * [#12036](http://dev.ckeditor.com/ticket/12036): Initialize editor in [`readOnly`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-readOnly) mode when ` + + + \ No newline at end of file diff --git a/tests/plugins/resize/manual/firedimensions.md b/tests/plugins/resize/manual/firedimensions.md new file mode 100644 index 00000000000..72b6bf2cb97 --- /dev/null +++ b/tests/plugins/resize/manual/firedimensions.md @@ -0,0 +1,10 @@ +@bender-tags: 4.5.0, tc +@bender-ui: collapsed +@bender-ckeditor-plugins: wysiwygarea, toolbar, elementspath, resize + +This test checks whether resize event is fired with dimensions as a properties. If so, destroying and creating editor instances should save its size. + +1. Resize editor +2. Destroy and create editor. + +**Expected result:** After creating new editor instance dimensions should be saved. \ No newline at end of file diff --git a/tests/plugins/toolbar/basic.js b/tests/plugins/toolbar/basic.js index 022c66bcff2..db27964fc27 100644 --- a/tests/plugins/toolbar/basic.js +++ b/tests/plugins/toolbar/basic.js @@ -92,5 +92,33 @@ bender.test( { }, testToolbarExpanded ); + }, + + 'test toolbar collapse/expand fire resize event': function() { + bender.editorBot.create( { + name: 'editor4', + config: { + toolbarCanCollapse: true + } + }, + function( bot ) { + var resizeData = [], + editor = bot.editor; + + editor.on( 'resize', function( e ) { + resizeData.push( e.data ); + } ); + + editor.resize( 200, 400 ); + assert.areEqual( 200, resizeData[ 0 ].outerWidth, 'Width should be set properly.' ); + assert.areEqual( 400, resizeData[ 0 ].outerHeight, 'Height should be set properly.' ); + + editor.execCommand( 'toolbarCollapse' ); + assert.isTrue( resizeData[ 1 ].outerHeight < resizeData[ 0 ].outerHeight, 'Height after collapse should be less.' ); + + editor.execCommand( 'toolbarCollapse' ); + assert.areSame( resizeData[ 0 ].outerHeight, resizeData[ 2 ].outerHeight, 'Height should properly restore to same value.' ); + } + ); } } ); \ No newline at end of file