|
@@ -9,6 +9,7 @@ import BoldEditing from '@ckeditor/ckeditor5-basic-styles/src/bold/boldediting';
|
|
|
import BlockQuoteEditing from '@ckeditor/ckeditor5-block-quote/src/blockquoteediting';
|
|
import BlockQuoteEditing from '@ckeditor/ckeditor5-block-quote/src/blockquoteediting';
|
|
|
import Typing from '@ckeditor/ckeditor5-typing/src/typing';
|
|
import Typing from '@ckeditor/ckeditor5-typing/src/typing';
|
|
|
import ListCommand from '../src/listcommand';
|
|
import ListCommand from '../src/listcommand';
|
|
|
|
|
+import TodoListCheckCommand from '../src/todolistcheckcommand';
|
|
|
import ModelElement from '@ckeditor/ckeditor5-engine/src/model/element';
|
|
import ModelElement from '@ckeditor/ckeditor5-engine/src/model/element';
|
|
|
|
|
|
|
|
import VirtualTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/virtualtesteditor';
|
|
import VirtualTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/virtualtesteditor';
|
|
@@ -66,7 +67,7 @@ describe( 'TodoListEditing', () => {
|
|
|
expect( model.schema.checkAttribute( [ '$root', paragraph ], 'todoListChecked' ) ).to.be.false;
|
|
expect( model.schema.checkAttribute( [ '$root', paragraph ], 'todoListChecked' ) ).to.be.false;
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
- describe( 'command', () => {
|
|
|
|
|
|
|
+ describe( 'commands', () => {
|
|
|
it( 'should register todoList list command', () => {
|
|
it( 'should register todoList list command', () => {
|
|
|
const command = editor.commands.get( 'todoList' );
|
|
const command = editor.commands.get( 'todoList' );
|
|
|
|
|
|
|
@@ -110,6 +111,10 @@ describe( 'TodoListEditing', () => {
|
|
|
expect( getModelData( model ) ).to.equal( '<paragraph>ab[]</paragraph>' );
|
|
expect( getModelData( model ) ).to.equal( '<paragraph>ab[]</paragraph>' );
|
|
|
expect( getViewData( view ) ).to.equal( '<p>ab{}</p>' );
|
|
expect( getViewData( view ) ).to.equal( '<p>ab{}</p>' );
|
|
|
} );
|
|
} );
|
|
|
|
|
+
|
|
|
|
|
+ it( 'should register todoListCheck command', () => {
|
|
|
|
|
+ expect( editor.commands.get( 'todoListCheck' ) ).to.be.instanceOf( TodoListCheckCommand );
|
|
|
|
|
+ } );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
describe( 'editing pipeline', () => {
|
|
describe( 'editing pipeline', () => {
|