8
0
Просмотр исходного кода

Merge branch 'master' into t/ckeditor5-alignment/2

Maciej Gołaszewski 8 лет назад
Родитель
Сommit
53f235012e

+ 0 - 10
packages/ckeditor5-core/tests/_utils-tests/classictesteditorui.js

@@ -35,20 +35,10 @@ describe( 'ClassicTestEditorUI', () => {
 		} );
 	} );
 
-	describe( 'init()', () => {
-		it( 'initializes the #view', () => {
-			const spy = sinon.spy( view, 'init' );
-
-			ui.init();
-			sinon.assert.calledOnce( spy );
-		} );
-	} );
-
 	describe( 'destroy()', () => {
 		it( 'destroys the #view', () => {
 			const spy = sinon.spy( view, 'destroy' );
 
-			ui.init();
 			ui.destroy();
 			sinon.assert.calledOnce( spy );
 		} );

+ 2 - 2
packages/ckeditor5-core/tests/_utils/classictesteditor.js

@@ -56,9 +56,9 @@ export default class ClassicTestEditor extends StandardEditor {
 
 			resolve(
 				editor.initPlugins()
-					.then( () => editor._elementReplacer.replace( element, editor.ui.view.element ) )
+					.then( () => editor.ui.view.render() )
 					.then( () => {
-						editor.ui.init();
+						editor._elementReplacer.replace( element, editor.ui.view.element );
 						editor.fire( 'uiReady' );
 					} )
 					.then( () => editor.editing.view.attachDomRoot( editor.ui.view.editableElement ) )

+ 0 - 9
packages/ckeditor5-core/tests/_utils/classictesteditorui.js

@@ -52,15 +52,6 @@ export default class ClassicTestEditorUI {
 		this.focusTracker = new FocusTracker();
 	}
 
-	/**
-	 * Initializes the UI.
-	 *
-	 * @returns {Promise} A Promise resolved when the initialization process is finished.
-	 */
-	init() {
-		this.view.init();
-	}
-
 	/**
 	 * Destroys the UI.
 	 *

+ 3 - 0
packages/ckeditor5-core/tests/editor/standardeditor.js

@@ -345,6 +345,9 @@ describe( 'StandardEditor', () => {
 		} );
 
 		it( 'should not replace submit() method when one of the elements in a form is named "submit"', () => {
+			// Restore stub since we want to mask submit function with input with name="submit".
+			submitStub.restore();
+
 			const input = document.createElement( 'input' );
 			input.setAttribute( 'name', 'submit' );
 			form.appendChild( input );