瀏覽代碼

Merge remote-tracking branch 'origin/master' into t/54

Aleksander Nowodzinski 9 年之前
父節點
當前提交
9a585fb7af
共有 2 個文件被更改,包括 11 次插入4 次删除
  1. 5 3
      packages/ckeditor5-link/tests/link.js
  2. 6 1
      packages/ckeditor5-link/tests/manual/link.js

+ 5 - 3
packages/ckeditor5-link/tests/link.js

@@ -68,6 +68,7 @@ describe( 'Link', () => {
 			const model = linkButton.model;
 			const command = editor.commands.get( 'link' );
 
+			command.isEnabled = true;
 			expect( model.isEnabled ).to.be.true;
 
 			command.isEnabled = false;
@@ -128,10 +129,11 @@ describe( 'Link', () => {
 			const model = unlinkButton.model;
 			const command = editor.commands.get( 'unlink' );
 
-			expect( model.isEnabled ).to.false;
-
 			command.isEnabled = true;
-			expect( model.isEnabled ).to.true;
+			expect( model.isEnabled ).to.be.true;
+
+			command.isEnabled = false;
+			expect( model.isEnabled ).to.be.false;
 		} );
 
 		it( 'should execute unlink command on unlinkButton#model execute event', () => {

+ 6 - 1
packages/ckeditor5-link/tests/manual/link.js

@@ -6,9 +6,14 @@
 /* globals console:false, window, document */
 
 import ClassicEditor from '/ckeditor5/editor-classic/classic.js';
+import Enter from '/ckeditor5/enter/enter.js';
+import Typing from '/ckeditor5/typing/typing.js';
+import Link from '/ckeditor5/link/link.js';
+import Paragraph from '/ckeditor5/paragraph/paragraph.js';
+import Undo from '/ckeditor5/undo/undo.js';
 
 ClassicEditor.create( document.querySelector( '#editor' ), {
-	features: [ 'link', 'typing', 'paragraph', 'undo', 'enter' ],
+	features: [ Link, Typing, Paragraph, Undo, Enter ],
 	toolbar: [ 'link', 'unlink', 'undo', 'redo' ]
 } )
 .then( editor => {